коммит произвёл
GitHub
родитель
f4e9221261
Коммит
37edbc8533
@@ -17,6 +17,20 @@ function verifyNoChannelToJoinMessage(isVisible) {
|
||||
cy.findByText('No public channels').should(isVisible ? 'be.visible' : 'not.exist');
|
||||
}
|
||||
|
||||
function ensureHideJoinedCheckboxEnabled(shouldBeChecked) {
|
||||
cy.get('#hideJoinedPreferenceCheckbox').then(($checkbox) => {
|
||||
cy.wrap($checkbox).findByText('Hide Joined').should('be.visible');
|
||||
cy.wrap($checkbox).find('button').invoke('attr', 'class').then(($classList) => {
|
||||
if ($classList.split(' ').includes('checked') ^ shouldBeChecked) {
|
||||
// We click on the button only when the XOR operands do not match
|
||||
// e.g. checkbox is checked, but should not be checked; and vice-versa
|
||||
cy.wrap($checkbox).click();
|
||||
cy.wrap($checkbox).find('button').should(`${shouldBeChecked ? '' : 'not.'}have.class`, 'checked');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
describe('browse public channels', () => {
|
||||
let testUser: UserProfile;
|
||||
let otherUser: UserProfile;
|
||||
@@ -63,11 +77,7 @@ describe('browse public channels', () => {
|
||||
cy.findByText('Public channels').should('be.visible').click();
|
||||
|
||||
// # Click hide joined checkbox if not already checked
|
||||
cy.findByText('Hide Joined').should('be.visible').then(($checkbox) => {
|
||||
if (!$checkbox.prop('checked')) {
|
||||
cy.wrap($checkbox).click();
|
||||
}
|
||||
});
|
||||
ensureHideJoinedCheckboxEnabled(true);
|
||||
|
||||
// * Assert that the moreChannelsList is visible and the number of channels is 31
|
||||
cy.get('#moreChannelsList').should('be.visible').children().should('have.length', 31);
|
||||
@@ -108,6 +118,9 @@ describe('browse public channels', () => {
|
||||
// # Click archived channels
|
||||
cy.findByText('Public channels').should('be.visible').click();
|
||||
|
||||
// # Click hide joined checkbox if not already checked
|
||||
ensureHideJoinedCheckboxEnabled(true);
|
||||
|
||||
// * Assert that the "No more channels to join" message is visible
|
||||
verifyNoChannelToJoinMessage(true);
|
||||
});
|
||||
|
||||
@@ -101,6 +101,7 @@ describe('Collapsed Reply Threads', () => {
|
||||
it('MM-T4843_2 should go to threads view when threads view is the penultimate view and leave the current channel', () => {
|
||||
// # Go to the ‘Threads’ view on Team A
|
||||
cy.uiGetSidebarThreadsButton().click();
|
||||
cy.url().should('include', `${teamA.name}/threads`);
|
||||
|
||||
// # Switch to Test Channel
|
||||
cy.uiClickSidebarItem(testChannel.name);
|
||||
|
||||
@@ -23,6 +23,7 @@ describe('Message Draft with attachment and Switch Channels', () => {
|
||||
testChannel2 = out.channel;
|
||||
});
|
||||
cy.visit(`/${team.name}/channels/town-square`);
|
||||
cy.get('#channelHeaderTitle').should('be.visible').should('contain', 'Town Square');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
// - Use element ID when selecting an element. Create one if none.
|
||||
// ***************************************************************
|
||||
|
||||
// Stage: @prod
|
||||
// Group: @channels @system_console @enterprise @cloud_only
|
||||
|
||||
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
||||
|
||||
Ссылка в новой задаче
Block a user