Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

[MM-28411] Archive channels should not have options to manage users #6570

Merged
merged 2 commits into from
Oct 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

// ***************************************************************
// - [#] indicates a test step (e.g. # Go to a page)
// - [*] indicates an assertion (e.g. * Check the title)
// - Use element ID when selecting an element. Create one if none.
// ***************************************************************

// Group: @channel

describe('Archive channel members spec', () => {
before(() => {
cy.apiUpdateConfig({
TeamSettings: {
ExperimentalViewArchivedChannels: true,
},
});

// # Login as test user and visit create channel
cy.apiInitSetup({loginAfter: true}).then(({team, channel}) => {
cy.visit(`/${team.name}/channels/${channel.name}`);
});
});

it('MM-T1719 Archived channel members cannot be managed', () => {
// # click on channel drop-down menu
cy.get('#channelHeaderTitle').click();

// * View members menu option should not be visible;
cy.get('#channelViewMembers').should('not.be.visible');

// * Manage members menu option should be visible;
cy.get('#channelManageMembers').should('be.visible');

// # Close the channel dropdown menu
cy.get('#channelHeaderTitle').click();

// # Archive the channel
cy.uiArchiveChannel();

// # click on channel drop-down menu
cy.get('#channelHeaderTitle').click();

// * Manage members menu option should not be visible;
cy.get('#channelManageMembers').should('be.not.visible');

// # click on view members menu option;
cy.get('#channelViewMembers button').should('be.visible').click();

// * Ensure there are no options to change channel roles or membership
cy.findAllByTestId('userListItemActions').within(() => {
cy.get('.MenuWrapper').should('be.not.visible');
});
});
});