e2e/fix: enable skipped tests in playbooks (#23102)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fc50bd450e
Коммит
0147a1e781
13
e2e-tests/cypress/package-lock.json
сгенерированный
13
e2e-tests/cypress/package-lock.json
сгенерированный
@@ -12,7 +12,6 @@
|
|||||||
"@babel/eslint-parser": "7.19.1",
|
"@babel/eslint-parser": "7.19.1",
|
||||||
"@babel/eslint-plugin": "7.19.1",
|
"@babel/eslint-plugin": "7.19.1",
|
||||||
"@cypress/request": "2.88.11",
|
"@cypress/request": "2.88.11",
|
||||||
"@cypress/skip-test": "2.6.1",
|
|
||||||
"@mattermost/types": "7.4.0",
|
"@mattermost/types": "7.4.0",
|
||||||
"@testing-library/cypress": "9.0.0",
|
"@testing-library/cypress": "9.0.0",
|
||||||
"@types/async": "3.2.16",
|
"@types/async": "3.2.16",
|
||||||
@@ -2250,12 +2249,6 @@
|
|||||||
"uuid": "dist/bin/uuid"
|
"uuid": "dist/bin/uuid"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@cypress/skip-test": {
|
|
||||||
"version": "2.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@cypress/skip-test/-/skip-test-2.6.1.tgz",
|
|
||||||
"integrity": "sha512-X+ibefBiuOmC5gKG91wRIT0/OqXeETYvu7zXktjZ3yLeO186Y8ia0K7/gQUpAwuUi28DuqMd1+7tBQVtPkzbPA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@cypress/xvfb": {
|
"node_modules/@cypress/xvfb": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz",
|
||||||
@@ -19062,12 +19055,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@cypress/skip-test": {
|
|
||||||
"version": "2.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@cypress/skip-test/-/skip-test-2.6.1.tgz",
|
|
||||||
"integrity": "sha512-X+ibefBiuOmC5gKG91wRIT0/OqXeETYvu7zXktjZ3yLeO186Y8ia0K7/gQUpAwuUi28DuqMd1+7tBQVtPkzbPA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"@cypress/xvfb": {
|
"@cypress/xvfb": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz",
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
"@babel/eslint-parser": "7.19.1",
|
"@babel/eslint-parser": "7.19.1",
|
||||||
"@babel/eslint-plugin": "7.19.1",
|
"@babel/eslint-plugin": "7.19.1",
|
||||||
"@cypress/request": "2.88.11",
|
"@cypress/request": "2.88.11",
|
||||||
"@cypress/skip-test": "2.6.1",
|
|
||||||
"@mattermost/types": "7.4.0",
|
"@mattermost/types": "7.4.0",
|
||||||
"@testing-library/cypress": "9.0.0",
|
"@testing-library/cypress": "9.0.0",
|
||||||
"@types/async": "3.2.16",
|
"@types/async": "3.2.16",
|
||||||
|
|||||||
@@ -9,71 +9,45 @@
|
|||||||
// Stage: @prod
|
// Stage: @prod
|
||||||
// Group: @playbooks
|
// Group: @playbooks
|
||||||
|
|
||||||
import {onlyOn} from '@cypress/skip-test';
|
|
||||||
|
|
||||||
describe('channels > App Bar', {testIsolation: true}, () => {
|
describe('channels > App Bar', {testIsolation: true}, () => {
|
||||||
let testTeam;
|
let testTeam;
|
||||||
let testUser;
|
let testUser;
|
||||||
let testPlaybook;
|
|
||||||
let appBarEnabled;
|
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.apiInitSetup().then(({team, user}) => {
|
cy.apiInitSetup().then(({team, user}) => {
|
||||||
testTeam = team;
|
testTeam = team;
|
||||||
testUser = user;
|
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(() => {
|
beforeEach(() => {
|
||||||
// # Size the viewport to show the RHS without covering posts.
|
cy.apiAdminLogin();
|
||||||
cy.viewport('macbook-13');
|
|
||||||
|
|
||||||
// # Login as testUser
|
|
||||||
cy.apiLogin(testUser);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('App Bar disabled', () => {
|
describe('App Bar disabled', () => {
|
||||||
it('should not show the Playbook App Bar icon', () => {
|
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
|
// # Navigate directly to a non-playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||||
|
|
||||||
// * Verify App Bar icon is not showing
|
// * Verify App Bar icon is not showing
|
||||||
cy.get('#channel_view').within(() => {
|
cy.get('.app-bar').should('not.exist');
|
||||||
cy.getPlaybooksAppBarIcon().should('not.exist');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('App Bar enabled', () => {
|
describe('App Bar enabled', () => {
|
||||||
it('should show the Playbook App Bar icon', () => {
|
beforeEach(() => {
|
||||||
onlyOn(appBarEnabled);
|
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
|
// # Navigate directly to a non-playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
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', () => {
|
it('should show "Playbooks" tooltip for Playbook App Bar icon', () => {
|
||||||
onlyOn(appBarEnabled);
|
|
||||||
|
|
||||||
// # Navigate directly to a non-playbook run channel
|
// # Navigate directly to a non-playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,11 @@
|
|||||||
// Stage: @prod
|
// Stage: @prod
|
||||||
// Group: @playbooks
|
// Group: @playbooks
|
||||||
|
|
||||||
import {onlyOn} from '@cypress/skip-test';
|
|
||||||
|
|
||||||
describe('channels > channel header', {testIsolation: true}, () => {
|
describe('channels > channel header', {testIsolation: true}, () => {
|
||||||
let testTeam;
|
let testTeam;
|
||||||
let testUser;
|
let testUser;
|
||||||
let testPlaybook;
|
let testPlaybook;
|
||||||
let testPlaybookRun;
|
let testPlaybookRun;
|
||||||
let appBarEnabled;
|
|
||||||
|
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.apiInitSetup().then(({team, user}) => {
|
cy.apiInitSetup().then(({team, user}) => {
|
||||||
@@ -44,24 +41,16 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
|||||||
testPlaybookRun = run;
|
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', () => {
|
describe('App Bar enabled', () => {
|
||||||
it('webapp should hide the Playbook channel header button', () => {
|
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
|
// # Navigate directly to a non-playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||||
@@ -74,9 +63,15 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('App Bar disabled', () => {
|
describe('App Bar disabled', () => {
|
||||||
it('webapp should show the Playbook channel header button', () => {
|
beforeEach(() => {
|
||||||
onlyOn(!appBarEnabled);
|
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
|
// # Navigate directly to a non-playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
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', () => {
|
it('tooltip text should show "Playbooks" for Playbook channel header button', () => {
|
||||||
onlyOn(!appBarEnabled);
|
|
||||||
|
|
||||||
// # Navigate directly to a non-playbook run channel
|
// # Navigate directly to a non-playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/town-square`);
|
cy.visit(`/${testTeam.name}/channels/town-square`);
|
||||||
|
|
||||||
@@ -103,6 +96,11 @@ describe('channels > channel header', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('description text', () => {
|
describe('description text', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
// # Login as testUser
|
||||||
|
cy.apiLogin(testUser);
|
||||||
|
});
|
||||||
|
|
||||||
it('should contain a link to the playbook', () => {
|
it('should contain a link to the playbook', () => {
|
||||||
// # Navigate directly to a playbook run channel
|
// # Navigate directly to a playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/playbook-run`);
|
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}`);
|
expect(href).to.equals(`/playbooks/playbooks/${testPlaybook.id}`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain a link to the overview page', () => {
|
it('should contain a link to the overview page', () => {
|
||||||
// # Navigate directly to a playbook run channel
|
// # Navigate directly to a playbook run channel
|
||||||
cy.visit(`/${testTeam.name}/channels/playbook-run`);
|
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.
|
// # Run the `/playbook update` slash command.
|
||||||
cy.uiPostMessageQuickly('/playbook update');
|
cy.uiPostMessageQuickly('/playbook update');
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ describe('lhs', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('dropdownmenu').should('be.visible');
|
cy.findByTestId('dropdownmenu').should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('can copy link', () => {
|
it('can copy link', () => {
|
||||||
// # Visit the playbook run
|
// # Visit the playbook run
|
||||||
cy.visit(`/playbooks/runs/${playbookRun.id}`);
|
cy.visit(`/playbooks/runs/${playbookRun.id}`);
|
||||||
stubClipboard().as('clipboard');
|
stubClipboard().as('clipboard');
|
||||||
@@ -295,7 +295,7 @@ describe('lhs', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('leave run, when on rdp of the same run', () => {
|
it('leave run, when on rdp of the same run', () => {
|
||||||
// # Click on leave menu item
|
// # Click on leave menu item
|
||||||
getRunDropdownItemByText('Runs', playbookRun.name, 'Leave and unfollow run').click();
|
getRunDropdownItemByText('Runs', playbookRun.name, 'Leave and unfollow run').click();
|
||||||
|
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ describe('playbooks > edit_metrics', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('delete metric', () => {
|
describe('delete metric', () => {
|
||||||
it.skip('verifies when clicking delete button; saved metrics have different confirmation text; deleted metrics are deleted', () => {
|
it('verifies when clicking delete button; saved metrics have different confirmation text; deleted metrics are deleted', () => {
|
||||||
// # Visit the selected playbook
|
// # Visit the selected playbook
|
||||||
cy.visit(`/playbooks/playbooks/${testPlaybook.id}`);
|
cy.visit(`/playbooks/playbooks/${testPlaybook.id}`);
|
||||||
|
|
||||||
|
|||||||
@@ -160,9 +160,7 @@ describe('runs > permissions', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('should be visible', () => {
|
describe('should be visible', () => {
|
||||||
// XXX: Skipping this test, since public playbooks currently have no members. This will
|
it('to playbook members', () => {
|
||||||
// likely change in the future, so keeping the skeleton.
|
|
||||||
it.skip('to playbook members', () => {
|
|
||||||
assertRunIsVisible(run, playbookMember);
|
assertRunIsVisible(run, playbookMember);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -242,9 +240,7 @@ describe('runs > permissions', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('should be visible', () => {
|
describe('should be visible', () => {
|
||||||
// XXX: Skipping this test, since public playbooks currently have no members. This will
|
it('to playbook members', () => {
|
||||||
// likely change in the future.
|
|
||||||
it.skip('to playbook members', () => {
|
|
||||||
assertRunIsVisible(run, playbookMember);
|
assertRunIsVisible(run, playbookMember);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -332,10 +328,9 @@ describe('runs > permissions', {testIsolation: true}, () => {
|
|||||||
assertRunIsVisible(run, runParticipant);
|
assertRunIsVisible(run, runParticipant);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Skipping this test, since followers cannot follow a run with a private channel from
|
// Followers cannot follow a run with a private channel from a private playbook
|
||||||
// a private playbook. (But leaving it for clarity in the code.)
|
it('to run followers', () => {
|
||||||
it.skip('to run followers', () => {
|
assertRunIsNotVisible(run, runFollower);
|
||||||
assertRunIsVisible(run, runFollower);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('to admins in the team', () => {
|
it('to admins in the team', () => {
|
||||||
@@ -414,10 +409,9 @@ describe('runs > permissions', {testIsolation: true}, () => {
|
|||||||
assertRunIsVisible(run, runParticipant);
|
assertRunIsVisible(run, runParticipant);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Skipping this test, since followers cannot follow a run with a private channel from
|
// Followers cannot follow a run with a private channel from a private playbook
|
||||||
// a private playbook. (But leaving it for clarity in the code.)
|
it('to run followers', () => {
|
||||||
it.skip('to run followers', () => {
|
assertRunIsNotVisible(run, runFollower);
|
||||||
assertRunIsVisible(run, runFollower);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('to admins in the team', () => {
|
it('to admins in the team', () => {
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ describe('runs > run details page > header', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe.skip('Join action disabled', () => {
|
describe('Join action disabled', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.apiLogin(testUser);
|
cy.apiLogin(testUser);
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ describe('runs > run details page > status update', {testIsolation: true}, () =>
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('requests an update and confirm', () => {
|
it('requests an update and confirm', () => {
|
||||||
// # Click on request update
|
// # Click on request update
|
||||||
cy.findByTestId('run-statusupdate-section').
|
cy.findByTestId('run-statusupdate-section').
|
||||||
should('be.visible').
|
should('be.visible').
|
||||||
@@ -281,11 +281,11 @@ describe('runs > run details page > status update', {testIsolation: true}, () =>
|
|||||||
cy.visit(`${testTeam.name}/channels/${playbookRunChannelName}`);
|
cy.visit(`${testTeam.name}/channels/${playbookRunChannelName}`);
|
||||||
|
|
||||||
// * Assert that message has been sent
|
// * Assert that message has been sent
|
||||||
cy.getLastPost().contains(`${testUser.username} requested a status update for ${testPublicPlaybook.name}.`);
|
cy.getLastPost().contains(`${testViewerUser.username} requested a status update for ${testRun.name}.`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('requests an update and cancel', () => {
|
it('requests an update and cancel', () => {
|
||||||
// # Click request update
|
// # Click request update
|
||||||
cy.findByTestId('run-statusupdate-section').
|
cy.findByTestId('run-statusupdate-section').
|
||||||
should('be.visible').
|
should('be.visible').
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user