diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2ac5f4d3c..c1527690ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,11 +81,11 @@ jobs: - name: yarn test:integration run: yarn test:integration working-directory: Composer - continue-on-error: true env: CYPRESS_COMPOSER_URL: http://localhost:5000 - name: Archive E2E Failures uses: actions/upload-artifact@v1 + if: failure() with: name: cypress path: Composer/cypress/screenshots diff --git a/Composer/cypress/integration/Breadcrumb.spec.js b/Composer/cypress/integration/Breadcrumb.spec.js index 85bec2a021..82ef8fe672 100644 --- a/Composer/cypress/integration/Breadcrumb.spec.js +++ b/Composer/cypress/integration/Breadcrumb.spec.js @@ -1,17 +1,16 @@ /// context('breadcrumb', () => { - before(() => { - cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoBot'); - cy.wait(100); - }); beforeEach(() => { + cy.visit(Cypress.env('COMPOSER_URL')); + cy.createBot('TodoSample'); + cy.wait(100); + // Return to Main.dialog cy.get('[data-testid="ProjectTree"]').within(() => { cy.wait(1000); - cy.getByText('__TestToDoBot.Main').click(); + cy.getByText('__TestTodoSample.Main').click(); cy.wait(1000); }); }); @@ -20,7 +19,7 @@ context('breadcrumb', () => { // Should path = main dialog at first render cy.getByTestId('Breadcrumb') .invoke('text') - .should('contain', '__TestToDoBot.Main'); + .should('contain', '__TestTodoSample.Main'); // Click on AddToDo dialog cy.get('[data-testid="ProjectTree"]').within(() => { @@ -32,13 +31,13 @@ context('breadcrumb', () => { cy.wait(1000); // Return to Main.dialog cy.get('[data-testid="ProjectTree"]').within(() => { - cy.getByText('__TestToDoBot.Main').click(); + cy.getByText('__TestTodoSample.Main').click(); cy.wait(100); }); cy.getByTestId('Breadcrumb') .invoke('text') - .should('contain', '__TestToDoBot'); + .should('contain', '__TestTodoSample'); }); it('can show event name in breadcrumb', () => { @@ -51,7 +50,7 @@ context('breadcrumb', () => { cy.getByTestId('Breadcrumb') .invoke('text') - .should('match', /AddToDo.*Event received.*/); + .should('match', /AddToDo.*Dialog started (BeginDialog)*/); }); it('can show action name in breadcrumb', () => { @@ -64,13 +63,13 @@ context('breadcrumb', () => { // Click on an action cy.withinEditor('VisualEditor', () => { cy.getByTestId('RuleEditor').within(() => { - cy.getByText('Set a Property').click(); + cy.getByText('Send a response').click(); cy.wait(500); }); }); cy.getByTestId('Breadcrumb') .invoke('text') - .should('match', /ToDoBot.+Set a Property/); + .should('match', /__TestTodoSample.Main.*Conversation started \(ConversationUpdate\).*Send a response/); }); }); diff --git a/Composer/cypress/integration/CreateNewBot.spec.js b/Composer/cypress/integration/CreateNewBot.spec.js index 98336733e4..dff154be2a 100644 --- a/Composer/cypress/integration/CreateNewBot.spec.js +++ b/Composer/cypress/integration/CreateNewBot.spec.js @@ -27,7 +27,7 @@ context('Creating a new bot', () => { it('can create a bot from the ToDo template', () => { cy.get('input[data-testid="Create from template"]').click({ force: true }); cy.wait(100); - cy.get('[data-testid="ToDoBot"]').click(); + cy.get('[data-testid="TodoSample"]').click(); cy.wait(100); cy.get('button[data-testid="NextStepButton"]').click(); cy.wait(100); diff --git a/Composer/cypress/integration/LGPage.spec.js b/Composer/cypress/integration/LGPage.spec.js index 5520c9339d..67f29b6bca 100644 --- a/Composer/cypress/integration/LGPage.spec.js +++ b/Composer/cypress/integration/LGPage.spec.js @@ -3,13 +3,13 @@ context('check language generation page', () => { beforeEach(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoBot'); + cy.createBot('TodoSample'); }); it('can open language generation page', () => { cy.get('[data-testid="LeftNav-CommandBarButtonBot Responses"]').click(); // left nav tree - cy.contains('ToDoBot.Main'); + cy.contains('TodoSample.Main'); cy.contains('All'); cy.get('.toggleEditMode button').as('switchButton'); @@ -24,7 +24,7 @@ context('check language generation page', () => { cy.get('@switchButton').click(); // nav to Main dialog - cy.get('.dialogNavTree button[title="__TestToDoBot.Main"]').click(); + cy.get('.dialogNavTree button[title="__TestTodoSample.Main"]').click(); cy.wait(300); // dialog filter, edit mode button is disabled. diff --git a/Composer/cypress/integration/LUPage.spec.js b/Composer/cypress/integration/LUPage.spec.js index a8dd7c4839..c10e15bc76 100644 --- a/Composer/cypress/integration/LUPage.spec.js +++ b/Composer/cypress/integration/LUPage.spec.js @@ -3,14 +3,14 @@ context('check language understanding page', () => { before(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoLuisBot'); + cy.createBot('ToDoBotWithLuisSample'); }); it('can open language understanding page', () => { cy.get('[data-testid="LeftNav-CommandBarButtonUser Input"]').click(); // left nav tree - cy.contains('ToDoLuisBot.Main'); + cy.contains('ToDoBotWithLuisSample.Main'); cy.contains('All'); cy.get('.toggleEditMode button').as('switchButton'); @@ -21,8 +21,8 @@ context('check language understanding page', () => { // by default is table view cy.get('[data-testid="LUEditor"] [data-testid="table-view"]').should('exist'); - // nav to ToDoLuisBot.main dialog - cy.get('.dialogNavTree button[title="__TestToDoLuisBot.Main"]').click({ multiple: true }); + // nav to ToDoBotWithLuisSample.main dialog + cy.get('.dialogNavTree button[title="__TestToDoBotWithLuisSample.Main"]').click({ multiple: true }); cy.wait(300); // goto edit-mode diff --git a/Composer/cypress/integration/LeftNavBar.spec.js b/Composer/cypress/integration/LeftNavBar.spec.js index 905b797fe0..130c66ead2 100644 --- a/Composer/cypress/integration/LeftNavBar.spec.js +++ b/Composer/cypress/integration/LeftNavBar.spec.js @@ -2,7 +2,7 @@ context('check Nav Expandion ', () => { beforeEach(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoBot'); + cy.createBot('TodoSample'); }); it('can expand left Nav Bar', () => { diff --git a/Composer/cypress/integration/LuisDeploy.spec.js b/Composer/cypress/integration/LuisDeploy.spec.js index ec0a728bb0..d6c3172d06 100644 --- a/Composer/cypress/integration/LuisDeploy.spec.js +++ b/Composer/cypress/integration/LuisDeploy.spec.js @@ -7,7 +7,7 @@ context('Luis Deploy', () => { cy.route('POST', '/api/launcher/sync', 'OK'); cy.route('POST', 'api/projects/opened/settings', 'OK'); cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoLuisBot'); + cy.createBot('ToDoBotWithLuisSample'); }); it('can deploy luis success', () => { @@ -33,7 +33,7 @@ context('Luis Deploy', () => { .type('0d4991873f334685a9686d1b48e0ff48'); // wait for the debounce interval of sync settings cy.wait(1000); - cy.getByText('Publish').click(); + cy.getByText('OK').click(); cy.wait(1000); cy.getByText('Restart Bot').should('exist'); cy.getByText('Test in Emulator').should('exist'); @@ -49,6 +49,6 @@ context('Luis Deploy', () => { cy.getByText('Try again').click(); cy.wait(1000); cy.get('[data-testid="AuthoringKeyInput"]').type('no-id'); - cy.getByText('Publish').click(); + cy.getByText('OK').click(); }); }); diff --git a/Composer/cypress/integration/NewDialog.spec.js b/Composer/cypress/integration/NewDialog.spec.js index 382f103f40..dedb0be001 100644 --- a/Composer/cypress/integration/NewDialog.spec.js +++ b/Composer/cypress/integration/NewDialog.spec.js @@ -3,7 +3,7 @@ context('Creating a new Dialog', () => { beforeEach(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.copyBot('ToDoBot', 'ToDoBotCopy'); + cy.copyBot('TodoSample', 'ToDoBotCopy'); cy.get('[data-testid="LeftNav-CommandBarButtonDesign Flow"]').click(); }); diff --git a/Composer/cypress/integration/RemoveDialog.spec.js b/Composer/cypress/integration/RemoveDialog.spec.js index 1fc4c24dbe..16f8faa26a 100644 --- a/Composer/cypress/integration/RemoveDialog.spec.js +++ b/Composer/cypress/integration/RemoveDialog.spec.js @@ -3,24 +3,24 @@ context('RemoveDialog', () => { beforeEach(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.copyBot('ToDoLuisBot', 'ToDoLuisBotSpec'); + cy.copyBot('ToDoBotWithLuisSample', 'ToDoBotWithLuisSampleSpec'); }); it('can remove dialog', () => { - cy.get('[data-testid="ProjectTree"]').within(() => { - cy.get('[data-testid="DialogTreeItemAddItem"]') - .click() - .trigger('mousedown'); - cy.get('[data-testid="dialogMoreButton"]') - .first() - .invoke('attr', 'style', 'visibility: visible') - .click(); - }); + cy.getByTestId('ProjectTree').within(() => { + cy.getByTestId('DialogTreeItemtriggers[4]').within(() => { + cy.getByTestId('dialogMoreButton') + .first() + .invoke('attr', 'style', 'visibility: visible') + .click(); + }); + }); + cy.get('.ms-ContextualMenu-linkContent > .ms-ContextualMenu-itemText').within(() => { cy.getByText('Delete').click(); }); - cy.getByText('Yes').click(); - cy.get('[data-testid="ProjectTree"]').within(() => { + + cy.getByTestId('ProjectTree').within(() => { cy.get('[title="AddItem"]').should('not.exist'); }); }); diff --git a/Composer/cypress/integration/SaveAs.spec.js b/Composer/cypress/integration/SaveAs.spec.js index 76a0a802f1..bd71d8a748 100644 --- a/Composer/cypress/integration/SaveAs.spec.js +++ b/Composer/cypress/integration/SaveAs.spec.js @@ -6,16 +6,17 @@ context('Saving As', () => { }); it('can create a new bot from an existing bot', () => { - cy.createBot('ToDoLuisBot'); + cy.createBot('ToDoBotWithLuisSample'); cy.get('[data-testid="LeftNav-CommandBarButtonHome"]').click(); cy.getByText('Save as').click(); cy.get('input[data-testid="NewDialogName"]').type('__TestSaveAs'); cy.get('input[data-testid="NewDialogName"]').type('{enter}'); + cy.wait(1000); cy.get('[data-testid="ProjectTree"]').within(() => { cy.getByText('__TestSaveAs.Main').should('exist'); - cy.getByText('ShowItems').should('exist'); + cy.getByText('ViewCollection').should('exist'); }); }); }); diff --git a/Composer/cypress/integration/ToDoBot.spec.js b/Composer/cypress/integration/ToDoBot.spec.js index df9d58aced..13d349d89d 100644 --- a/Composer/cypress/integration/ToDoBot.spec.js +++ b/Composer/cypress/integration/ToDoBot.spec.js @@ -1,18 +1,18 @@ /// context('ToDo Bot', () => { - before(() => { + beforeEach(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoBot'); + cy.createBot('TodoSample'); }); it('can open the main dialog', () => { cy.get('[data-testid="ProjectTree"]').within(() => { - cy.getByText('__TestToDoBot.Main').click(); + cy.getByText('__TestTodoSample.Main').click(); cy.wait(100); }); cy.withinEditor('FormEditor', () => { - cy.getByDisplayValue('__TestToDoBot').should('exist'); + cy.getByDisplayValue('__TestTodoSample').should('exist'); }); }); diff --git a/Composer/cypress/integration/VisualDesigner.spec.js b/Composer/cypress/integration/VisualDesigner.spec.js index f8699a5f30..db7960ef46 100644 --- a/Composer/cypress/integration/VisualDesigner.spec.js +++ b/Composer/cypress/integration/VisualDesigner.spec.js @@ -3,14 +3,14 @@ context('Visual Designer', () => { before(() => { cy.visit(Cypress.env('COMPOSER_URL')); - cy.createBot('ToDoBot'); + cy.createBot('TodoSample'); cy.wait(100); }); beforeEach(() => { // Return to Main.dialog cy.get('[data-testid="ProjectTree"]').within(() => { - cy.getByText('__TestToDoBot.Main').click(); + cy.getByText('__TestTodoSample.Main').click(); cy.wait(100); }); }); diff --git a/Composer/cypress/integration/homePage.spec.js b/Composer/cypress/integration/homePage.spec.js index d5024adad4..15fddc136b 100644 --- a/Composer/cypress/integration/homePage.spec.js +++ b/Composer/cypress/integration/homePage.spec.js @@ -14,6 +14,6 @@ context('check Nav Expandion ', () => { cy.getByText('Cancel').should('exist'); cy.getByText('Cancel').click(); cy.get('[data-testid="homePage-body-New"]').click(); - cy.getByText('Define conversation objective').should('exist'); + cy.getByText('Create from scratch?').should('exist'); }); }); diff --git a/Composer/package.json b/Composer/package.json index f23ec12e85..37096dafe5 100644 --- a/Composer/package.json +++ b/Composer/package.json @@ -67,7 +67,7 @@ "babel-jest": "24.0.0", "concurrently": "^4.1.0", "coveralls": "^3.0.7", - "cypress": "3.4.0", + "cypress": "^3.6.0", "cypress-plugin-tab": "^1.0.1", "cypress-testing-library": "^3.0.1", "eslint": "^5.15.1", diff --git a/Composer/yarn.lock b/Composer/yarn.lock index f1b63d5f61..9dd964dd8a 100644 --- a/Composer/yarn.lock +++ b/Composer/yarn.lock @@ -2458,6 +2458,11 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" +"@types/sizzle@2.3.2": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" + integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" @@ -3944,7 +3949,6 @@ botbuilder-expression-parser@^4.5.11: "botbuilder-lg@https://botbuilder.myget.org/F/botbuilder-declarative/npm/botbuilder-lg/-/4.7.0-preview2.tgz": version "4.7.0-preview2" - uid "2a3dd7d7991e0727fb88630501d2fb14d475537b" resolved "https://botbuilder.myget.org/F/botbuilder-declarative/npm/botbuilder-lg/-/4.7.0-preview2.tgz#2a3dd7d7991e0727fb88630501d2fb14d475537b" dependencies: antlr4ts "0.5.0-alpha.1" @@ -5516,13 +5520,14 @@ cypress-testing-library@^3.0.1: "@babel/runtime" "^7.4.3" dom-testing-library "^4.0.0" -cypress@3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.4.0.tgz#8053ee107eb6309f26abd57e882d05578bdc3391" - integrity sha512-vUE+sK3l23fhs5qTN3dKpveyP0fGr37VmK3FSYaTEjbqC/qh4DbA1Ych/3bLStUpHP4rpE5KAx7i1s/tpdD9vQ== +cypress@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.6.0.tgz#b7c88c169970aeb74a00182a1e8dc43a355d9eea" + integrity sha512-ODhbOrH1XZx0DUoYmJSvOSbEQjycNOpFYe7jOnHkT1+sdsn2+uqwAjZ1x982q3H4R/5iZjpSd50gd/iw2bofzg== dependencies: "@cypress/listr-verbose-renderer" "0.4.1" "@cypress/xvfb" "1.2.4" + "@types/sizzle" "2.3.2" arch "2.1.1" bluebird "3.5.0" cachedir "1.3.0" @@ -5536,12 +5541,11 @@ cypress@3.4.0: extract-zip "1.6.7" fs-extra "5.0.0" getos "3.1.1" - glob "7.1.3" is-ci "1.2.1" is-installed-globally "0.1.0" lazy-ass "1.6.0" listr "0.12.0" - lodash "4.17.11" + lodash "4.17.15" log-symbols "2.2.0" minimist "1.2.0" moment "2.24.0" @@ -5550,6 +5554,7 @@ cypress@3.4.0: request-progress "3.0.0" supports-color "5.5.0" tmp "0.1.0" + untildify "3.0.3" url "0.11.0" yauzl "2.10.0" @@ -7837,7 +7842,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.3, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -10469,16 +10474,16 @@ lodash.uniq@^4.5.0: resolved "https://botbuilder.myget.org/F/botbuilder-declarative/npm/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.17.11, lodash@>=2.4.0, "lodash@>=3.5 <5", lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== - -lodash@^4.17.14, lodash@^4.17.15: +lodash@4.17.15, lodash@^4.17.14, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +lodash@>=2.4.0, "lodash@>=3.5 <5", lodash@^4.16.4, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + log-driver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" @@ -15366,6 +15371,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +untildify@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-3.0.3.tgz#1e7b42b140bcfd922b22e70ca1265bfe3634c7c9" + integrity sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA== + unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97"