e2e: fix more channels tests
Этот коммит содержится в:
@@ -65,7 +65,7 @@ describe('Channels', () => {
|
|||||||
|
|
||||||
cy.get('#moreChannelsModal').should('be.visible').within(() => {
|
cy.get('#moreChannelsModal').should('be.visible').within(() => {
|
||||||
// * Dropdown should be visible, defaulting to "Public Channels"
|
// * Dropdown should be visible, defaulting to "Public Channels"
|
||||||
cy.get('#channelsMoreDropdown').should('be.visible').and('contain', 'Show: Public Channels').wait(TIMEOUTS.HALF_SEC);
|
cy.get('#channelsMoreDropdown').should('be.visible').and('contain', 'Channel Type: Public').wait(TIMEOUTS.HALF_SEC);
|
||||||
|
|
||||||
cy.get('#searchChannelsTextbox').should('be.visible').type(testChannel.display_name).wait(TIMEOUTS.HALF_SEC);
|
cy.get('#searchChannelsTextbox').should('be.visible').type(testChannel.display_name).wait(TIMEOUTS.HALF_SEC);
|
||||||
cy.get('#moreChannelsList').should('be.visible').children().should('have.length', 1).within(() => {
|
cy.get('#moreChannelsList').should('be.visible').children().should('have.length', 1).within(() => {
|
||||||
@@ -113,7 +113,7 @@ describe('Channels', () => {
|
|||||||
cy.findByText('Archived Channels').should('be.visible').click();
|
cy.findByText('Archived Channels').should('be.visible').click();
|
||||||
|
|
||||||
// * Channel test should be visible as an archived channel in the list
|
// * Channel test should be visible as an archived channel in the list
|
||||||
cy.wrap(el).should('contain', 'Show: Archived Channels');
|
cy.wrap(el).should('contain', 'Channel Type: Archived');
|
||||||
});
|
});
|
||||||
|
|
||||||
cy.get('#searchChannelsTextbox').should('be.visible').type(testChannel.display_name).wait(TIMEOUTS.HALF_SEC);
|
cy.get('#searchChannelsTextbox').should('be.visible').type(testChannel.display_name).wait(TIMEOUTS.HALF_SEC);
|
||||||
@@ -196,7 +196,7 @@ describe('Channels', () => {
|
|||||||
|
|
||||||
// * Dropdown should be visible, defaulting to "Public Channels"
|
// * Dropdown should be visible, defaulting to "Public Channels"
|
||||||
cy.get('#channelsMoreDropdown').should('be.visible').within((el) => {
|
cy.get('#channelsMoreDropdown').should('be.visible').within((el) => {
|
||||||
cy.wrap(el).should('contain', 'Show: Public Channels');
|
cy.wrap(el).should('contain', 'Channel Type: Public');
|
||||||
});
|
});
|
||||||
|
|
||||||
// * Users should be able to type and search
|
// * Users should be able to type and search
|
||||||
@@ -207,12 +207,12 @@ describe('Channels', () => {
|
|||||||
|
|
||||||
cy.get('#moreChannelsModal').should('be.visible').within(() => {
|
cy.get('#moreChannelsModal').should('be.visible').within(() => {
|
||||||
// * Users should be able to switch to "Archived Channels" list
|
// * Users should be able to switch to "Archived Channels" list
|
||||||
cy.get('#channelsMoreDropdown').should('be.visible').and('contain', 'Show: Public Channels').click().within((el) => {
|
cy.get('#channelsMoreDropdown').should('be.visible').and('contain', 'Channel Type: Public').click().within((el) => {
|
||||||
// # Click on archived channels item
|
// # Click on archived channels item
|
||||||
cy.findByText('Archived Channels').should('be.visible').click();
|
cy.findByText('Archived Channels').should('be.visible').click();
|
||||||
|
|
||||||
// * Modal should show the archived channels list
|
// * Modal should show the archived channels list
|
||||||
cy.wrap(el).should('contain', 'Show: Archived Channels');
|
cy.wrap(el).should('contain', 'Channel Type: Archived');
|
||||||
}).wait(TIMEOUTS.HALF_SEC);
|
}).wait(TIMEOUTS.HALF_SEC);
|
||||||
cy.get('#searchChannelsTextbox').clear();
|
cy.get('#searchChannelsTextbox').clear();
|
||||||
cy.get('#moreChannelsList').should('be.visible').children().should('have.length', 2);
|
cy.get('#moreChannelsList').should('be.visible').children().should('have.length', 2);
|
||||||
@@ -250,7 +250,7 @@ function verifyMoreChannelsModal(isEnabled) {
|
|||||||
// * Verify that the more channels modal is open and with or without option to view archived channels
|
// * Verify that the more channels modal is open and with or without option to view archived channels
|
||||||
cy.get('#moreChannelsModal').should('be.visible').within(() => {
|
cy.get('#moreChannelsModal').should('be.visible').within(() => {
|
||||||
if (isEnabled) {
|
if (isEnabled) {
|
||||||
cy.get('#channelsMoreDropdown').should('be.visible').and('have.text', 'Show: Public Channels');
|
cy.get('#channelsMoreDropdown').should('be.visible').and('have.text', 'Channel Type: Public');
|
||||||
} else {
|
} else {
|
||||||
cy.get('#channelsMoreDropdown').should('not.exist');
|
cy.get('#channelsMoreDropdown').should('not.exist');
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user