e2e/fix: enable skipped tests in playbooks (#23102)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fc50bd450e
Коммит
0147a1e781
@@ -9,71 +9,45 @@
|
||||
// Stage: @prod
|
||||
// Group: @playbooks
|
||||
|
||||
import {onlyOn} from '@cypress/skip-test';
|
||||
|
||||
describe('channels > App Bar', {testIsolation: true}, () => {
|
||||
let testTeam;
|
||||
let testUser;
|
||||
let testPlaybook;
|
||||
let appBarEnabled;
|
||||
|
||||
before(() => {
|
||||
cy.apiInitSetup().then(({team, user}) => {
|
||||
testTeam = team;
|
||||
testUser = user;
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
|
||||
// # Create a playbook
|
||||
cy.apiCreateTestPlaybook({
|
||||
teamId: testTeam.id,
|
||||
title: 'Playbook',
|
||||
userId: testUser.id,
|
||||
}).then((playbook) => {
|
||||
testPlaybook = playbook;
|
||||
|
||||
// # Start a playbook run
|
||||
cy.apiRunPlaybook({
|
||||
teamId: testTeam.id,
|
||||
playbookId: testPlaybook.id,
|
||||
playbookRunName: 'Playbook Run',
|
||||
ownerUserId: testUser.id,
|
||||
});
|
||||
});
|
||||
|
||||
cy.apiGetConfig(true).then(({config}) => {
|
||||
appBarEnabled = config.EnableAppBar === 'true';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Size the viewport to show the RHS without covering posts.
|
||||
cy.viewport('macbook-13');
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
cy.apiAdminLogin();
|
||||
});
|
||||
|
||||
describe('App Bar disabled', () => {
|
||||
it('should not show the Playbook App Bar icon', () => {
|
||||
onlyOn(!appBarEnabled);
|
||||
cy.apiUpdateConfig({ExperimentalSettings: {EnableAppBar: false}});
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
|
||||
// # Navigate directly to a non-playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
// * Verify App Bar icon is not showing
|
||||
cy.get('#channel_view').within(() => {
|
||||
cy.getPlaybooksAppBarIcon().should('not.exist');
|
||||
});
|
||||
cy.get('.app-bar').should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
describe('App Bar enabled', () => {
|
||||
it('should show the Playbook App Bar icon', () => {
|
||||
onlyOn(appBarEnabled);
|
||||
beforeEach(() => {
|
||||
cy.apiUpdateConfig({ExperimentalSettings: {EnableAppBar: true}});
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
});
|
||||
|
||||
it('should show the Playbook App Bar icon', () => {
|
||||
// # Navigate directly to a non-playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
@@ -82,8 +56,6 @@ describe('channels > App Bar', {testIsolation: true}, () => {
|
||||
});
|
||||
|
||||
it('should show "Playbooks" tooltip for Playbook App Bar icon', () => {
|
||||
onlyOn(appBarEnabled);
|
||||
|
||||
// # Navigate directly to a non-playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
|
||||
@@ -9,14 +9,11 @@
|
||||
// Stage: @prod
|
||||
// Group: @playbooks
|
||||
|
||||
import {onlyOn} from '@cypress/skip-test';
|
||||
|
||||
describe('channels > channel header', {testIsolation: true}, () => {
|
||||
let testTeam;
|
||||
let testUser;
|
||||
let testPlaybook;
|
||||
let testPlaybookRun;
|
||||
let appBarEnabled;
|
||||
|
||||
before(() => {
|
||||
cy.apiInitSetup().then(({team, user}) => {
|
||||
@@ -44,24 +41,16 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
||||
testPlaybookRun = run;
|
||||
});
|
||||
});
|
||||
|
||||
cy.apiGetConfig(true).then(({config}) => {
|
||||
appBarEnabled = config.EnableAppBar === 'true';
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
// # Size the viewport to show the RHS without covering posts.
|
||||
cy.viewport('macbook-13');
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
});
|
||||
|
||||
describe('App Bar enabled', () => {
|
||||
it('webapp should hide the Playbook channel header button', () => {
|
||||
onlyOn(appBarEnabled);
|
||||
cy.apiAdminLogin();
|
||||
cy.apiUpdateConfig({ExperimentalSettings: {EnableAppBar: true}});
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
|
||||
// # Navigate directly to a non-playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
@@ -74,9 +63,15 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
||||
});
|
||||
|
||||
describe('App Bar disabled', () => {
|
||||
it('webapp should show the Playbook channel header button', () => {
|
||||
onlyOn(!appBarEnabled);
|
||||
beforeEach(() => {
|
||||
cy.apiAdminLogin();
|
||||
cy.apiUpdateConfig({ExperimentalSettings: {EnableAppBar: false}});
|
||||
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
});
|
||||
|
||||
it('webapp should show the Playbook channel header button', () => {
|
||||
// # Navigate directly to a non-playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
@@ -87,8 +82,6 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
||||
});
|
||||
|
||||
it('tooltip text should show "Playbooks" for Playbook channel header button', () => {
|
||||
onlyOn(!appBarEnabled);
|
||||
|
||||
// # Navigate directly to a non-playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||
|
||||
@@ -103,6 +96,11 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
||||
});
|
||||
|
||||
describe('description text', () => {
|
||||
beforeEach(() => {
|
||||
// # Login as testUser
|
||||
cy.apiLogin(testUser);
|
||||
});
|
||||
|
||||
it('should contain a link to the playbook', () => {
|
||||
// # Navigate directly to a playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/playbook-run`);
|
||||
@@ -112,6 +110,7 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
||||
expect(href).to.equals(`/playbooks/playbooks/${testPlaybook.id}`);
|
||||
});
|
||||
});
|
||||
|
||||
it('should contain a link to the overview page', () => {
|
||||
// # Navigate directly to a playbook run channel
|
||||
cy.visit(`/${testTeam.name}/channels/playbook-run`);
|
||||
|
||||
@@ -82,7 +82,7 @@ describe('channels > rhs > status update', {testIsolation: true}, () => {
|
||||
});
|
||||
});
|
||||
|
||||
it.skip('description link navigates to run overview', () => {
|
||||
it('description link navigates to run overview', () => {
|
||||
// # Run the `/playbook update` slash command.
|
||||
cy.uiPostMessageQuickly('/playbook update');
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user