Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 11 additions & 12 deletions Composer/cypress/integration/Breadcrumb.spec.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
/// <reference types="Cypress" />

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);
});
});
Expand All @@ -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(() => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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/);
});
});
2 changes: 1 addition & 1 deletion Composer/cypress/integration/CreateNewBot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Composer/cypress/integration/LGPage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions Composer/cypress/integration/LUPage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Composer/cypress/integration/LeftNavBar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
6 changes: 3 additions & 3 deletions Composer/cypress/integration/LuisDeploy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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');
Expand All @@ -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();
});
});
2 changes: 1 addition & 1 deletion Composer/cypress/integration/NewDialog.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down
24 changes: 12 additions & 12 deletions Composer/cypress/integration/RemoveDialog.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
Expand Down
5 changes: 3 additions & 2 deletions Composer/cypress/integration/SaveAs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
});
8 changes: 4 additions & 4 deletions Composer/cypress/integration/ToDoBot.spec.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/// <reference types="Cypress" />

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');
});
});

Expand Down
4 changes: 2 additions & 2 deletions Composer/cypress/integration/VisualDesigner.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
Expand Down
2 changes: 1 addition & 1 deletion Composer/cypress/integration/homePage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
2 changes: 1 addition & 1 deletion Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading