Files
Jesse HallamandGitHub d50ce34825 MM-52487: fix more playbooks tests (#23475)
* fix playbooks/channels/rhs/template_spec.js

* fix playbooks/channels/update_request_post_spec.js

* fix playbooks/runs/rdp_rhs_runinfo_spec.js

* fix playbooks/runs/rdp_rhs_statusupdates_spec.js

* remove enableexperimentalfeatures flag in e2e tests

* rdp_main_header_spec: simplify channel loaded assertion

* playbooks rhs participants: fix infinite fetch loop

* improved onboarding skipping

* simplify participants fetching
2023-06-07 16:28:47 -03:00

75 lines
2.6 KiB
JavaScript

// 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)
// ***************************************************************
// Stage: @prod
// Group: @playbooks
describe('channels > rhs > template', {testIsolation: true}, () => {
let team1;
let testUser;
beforeEach(() => {
cy.apiAdminLogin().then(() => {
cy.apiInitSetup().then(({team, user}) => {
team1 = team;
testUser = user;
// # Size the viewport to show the RHS without covering posts.
cy.viewport('macbook-13');
// # Login as testUser
cy.apiLogin(testUser);
});
});
});
describe('create playbook', () => {
describe('open new playbook creation modal and navigates to playbooks', () => {
it('after clicking on Use', () => {
// # Switch to playbooks DM channel
cy.visit(`/${team1.name}/messages/@playbooks`);
// # Open playbooks RHS.
cy.getPlaybooksAppBarIcon().should('be.visible').click();
// # Return first template (Blank)
cy.contains('Blank').click();
// * Assert playbooks creation modal is shown.
cy.get('#playbooks_create').should('exist');
// # Click create playbook button.
cy.get('button[data-testid=modal-confirm-button]').click();
// * Assert expected playbook template title in outline.
cy.findByTestId('playbook-editor-title').contains('Blank');
});
it('after clicking on title', () => {
// # Switch to playbooks DM channel
cy.visit(`/${team1.name}/messages/@playbooks`);
// # Open playbooks RHS.
cy.getPlaybooksAppBarIcon().should('be.visible').click();
// # Return first template (Blank)
cy.contains('Use').click();
// * Assert playbooks creation modal is shown.
cy.get('#playbooks_create').should('exist');
// # Click create playbook button.
cy.get('button[data-testid=modal-confirm-button]').click();
// * Assert expected playbook template title in outline.
cy.findByTestId('playbook-editor-title').contains('Blank');
});
});
});
});