From f5299cd193ff27d2932c7d0eb0d65e9a8118418b Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Thu, 5 Oct 2023 16:49:18 -0300 Subject: [PATCH] Update e2e tests from upstream repository. (#24708) Ideally, we'd eventually have a single source of truth for these. --- .../playbooks/channels/rhs/checklist_spec.js | 2 +- .../channels/slash_command/commands_spec.js | 14 +++++++------- e2e-tests/cypress/tests/support/ui/playbooks.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e2e-tests/cypress/tests/integration/playbooks/channels/rhs/checklist_spec.js b/e2e-tests/cypress/tests/integration/playbooks/channels/rhs/checklist_spec.js index 555f642c73..b4b2611caf 100644 --- a/e2e-tests/cypress/tests/integration/playbooks/channels/rhs/checklist_spec.js +++ b/e2e-tests/cypress/tests/integration/playbooks/channels/rhs/checklist_spec.js @@ -164,7 +164,7 @@ describe('channels > rhs > checklist', {testIsolation: true}, () => { }); // * 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', () => { diff --git a/e2e-tests/cypress/tests/integration/playbooks/channels/slash_command/commands_spec.js b/e2e-tests/cypress/tests/integration/playbooks/channels/slash_command/commands_spec.js index 65ded0b0c7..29f26641bf 100644 --- a/e2e-tests/cypress/tests/integration/playbooks/channels/slash_command/commands_spec.js +++ b/e2e-tests/cypress/tests/integration/playbooks/channels/slash_command/commands_spec.js @@ -84,7 +84,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook check '); // * 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 cy.findByTestId('post_textbox').clear(); @@ -295,7 +295,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook check '); // * 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 cy.findByTestId('post_textbox').clear(); @@ -337,7 +337,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook checkadd '); // * 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 cy.findByTestId('post_textbox').clear(); @@ -380,7 +380,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook checkremove '); // * 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 cy.findByTestId('post_textbox').clear(); @@ -423,7 +423,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook owner '); // * 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 cy.findByTestId('post_textbox').clear(); @@ -465,7 +465,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook finish '); // * 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 cy.findByTestId('post_textbox').clear(); @@ -528,7 +528,7 @@ describe('channels > slash command > owner', {testIsolation: true}, () => { cy.findByTestId('post_textbox').clear().type('/playbook update '); // * 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 cy.findByTestId('post_textbox').clear(); diff --git a/e2e-tests/cypress/tests/support/ui/playbooks.js b/e2e-tests/cypress/tests/support/ui/playbooks.js index 23d987841d..d9d9c44ce1 100644 --- a/e2e-tests/cypress/tests/support/ui/playbooks.js +++ b/e2e-tests/cypress/tests/support/ui/playbooks.js @@ -99,7 +99,7 @@ Cypress.Commands.add('createPlaybook', (teamName, playbookName) => { // Select the playbook from the dropdown menu Cypress.Commands.add('selectPlaybookFromDropdown', (playbookName) => { 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}); }); });