Update e2e tests from upstream repository. (#24708)
Ideally, we'd eventually have a single source of truth for these.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
510136a192
Коммит
f5299cd193
@@ -164,7 +164,7 @@ describe('channels > rhs > checklist', {testIsolation: true}, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// * Verify the expected error message.
|
// * Verify the expected error message.
|
||||||
cy.verifyEphemeralMessage('Failed to find slash command /invalid');
|
cy.verifyEphemeralMessage('Failed to execute slash command /invalid');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully runs a valid slash command', () => {
|
it('successfully runs a valid slash command', () => {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook check ');
|
cy.findByTestId('post_textbox').clear().type('/playbook check ');
|
||||||
|
|
||||||
// * Verify suggestions number: a single run with 4 tasks + 1 title
|
// * Verify suggestions number: a single run with 4 tasks + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 5);
|
cy.get('.slash-command__info').should('have.length', 5);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
@@ -295,7 +295,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook check ');
|
cy.findByTestId('post_textbox').clear().type('/playbook check ');
|
||||||
|
|
||||||
// * Verify suggestions number: 2 runs * 4 tasks + 1 title
|
// * Verify suggestions number: 2 runs * 4 tasks + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 9);
|
cy.get('.slash-command__info').should('have.length', 9);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
@@ -337,7 +337,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook checkadd ');
|
cy.findByTestId('post_textbox').clear().type('/playbook checkadd ');
|
||||||
|
|
||||||
// * Verify suggestions number: 2 runs * 2 checklists + 1 title
|
// * Verify suggestions number: 2 runs * 2 checklists + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 5);
|
cy.get('.slash-command__info').should('have.length', 5);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
@@ -380,7 +380,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook checkremove ');
|
cy.findByTestId('post_textbox').clear().type('/playbook checkremove ');
|
||||||
|
|
||||||
// * Verify suggestions number: 2 runs * 4 tasks + 1 title
|
// * Verify suggestions number: 2 runs * 4 tasks + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 9);
|
cy.get('.slash-command__info').should('have.length', 9);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
@@ -423,7 +423,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook owner ');
|
cy.findByTestId('post_textbox').clear().type('/playbook owner ');
|
||||||
|
|
||||||
// * Verify suggestions number: 2 runs + 1 title
|
// * Verify suggestions number: 2 runs + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 3);
|
cy.get('.slash-command__info').should('have.length', 3);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
@@ -465,7 +465,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook finish ');
|
cy.findByTestId('post_textbox').clear().type('/playbook finish ');
|
||||||
|
|
||||||
// * Verify suggestions number: 2 runs + 1 title
|
// * Verify suggestions number: 2 runs + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 3);
|
cy.get('.slash-command__info').should('have.length', 3);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
@@ -528,7 +528,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => {
|
|||||||
cy.findByTestId('post_textbox').clear().type('/playbook update ');
|
cy.findByTestId('post_textbox').clear().type('/playbook update ');
|
||||||
|
|
||||||
// * Verify suggestions number: 2 runs + 1 title
|
// * Verify suggestions number: 2 runs + 1 title
|
||||||
cy.get('.slash-command').should('have.length', 3);
|
cy.get('.slash-command__info').should('have.length', 3);
|
||||||
|
|
||||||
// # Clear input
|
// # Clear input
|
||||||
cy.findByTestId('post_textbox').clear();
|
cy.findByTestId('post_textbox').clear();
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Cypress.Commands.add('createPlaybook', (teamName, playbookName) => {
|
|||||||
// Select the playbook from the dropdown menu
|
// Select the playbook from the dropdown menu
|
||||||
Cypress.Commands.add('selectPlaybookFromDropdown', (playbookName) => {
|
Cypress.Commands.add('selectPlaybookFromDropdown', (playbookName) => {
|
||||||
cy.findByTestId('autoCompleteSelector').should('exist').within(() => {
|
cy.findByTestId('autoCompleteSelector').should('exist').within(() => {
|
||||||
cy.get('input').click().type(playbookName.toLowerCase());
|
cy.get('input').click().type(playbookName.toLowerCase(), {force: true});
|
||||||
cy.get('#suggestionList').contains(playbookName).click({force: true});
|
cy.get('#suggestionList').contains(playbookName).click({force: true});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user