-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into liweitian/updateDefaultFolder
- Loading branch information
Showing
89 changed files
with
1,355 additions
and
1,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['../.eslintrc.js', 'plugin:cypress/recommended'], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
context('breadcrumb', () => { | ||
beforeEach(() => { | ||
cy.visit(Cypress.env('COMPOSER_URL')); | ||
cy.createBot('TodoSample'); | ||
|
||
// Return to Main.dialog | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('__TestTodoSample.Main').click(); | ||
}); | ||
}); | ||
|
||
function hasBreadcrumbItems(cy: Cypress.cy, items: (string | RegExp)[]) { | ||
cy.findByTestId('Breadcrumb') | ||
.get('li') | ||
.should($li => { | ||
items.forEach((item, idx) => { | ||
expect($li.eq(idx)).to.contain(item); | ||
}); | ||
}); | ||
} | ||
|
||
it('can show dialog name in breadcrumb', () => { | ||
// Should path = main dialog at first render | ||
hasBreadcrumbItems(cy, ['__TestTodoSample.Main']); | ||
|
||
// Click on AddToDo dialog | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('AddToDo').click(); | ||
}); | ||
hasBreadcrumbItems(cy, ['AddToDo']); | ||
|
||
// Return to Main.dialog | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('__TestTodoSample.Main').click(); | ||
}); | ||
|
||
hasBreadcrumbItems(cy, ['__TestTodoSample']); | ||
}); | ||
|
||
it('can show event name in breadcrumb', () => { | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('AddToDo').click(); | ||
cy.findByText('Dialog started (BeginDialog)').click(); | ||
}); | ||
|
||
hasBreadcrumbItems(cy, ['AddToDo', 'Dialog started (BeginDialog)']); | ||
}); | ||
|
||
it('can show action name in breadcrumb', () => { | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('Greeting (ConversationUpdate)').click(); | ||
}); | ||
|
||
// Click on an action | ||
cy.withinEditor('VisualEditor', () => { | ||
cy.findByTestId('RuleEditor').within(() => { | ||
cy.findByText('Send a response').click(); | ||
}); | ||
}); | ||
|
||
hasBreadcrumbItems(cy, ['__TestTodoSample.Main', 'Greeting (ConversationUpdate)', 'Send a response']); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
context('Creating a new bot', () => { | ||
beforeEach(() => { | ||
cy.visit(Cypress.env('COMPOSER_URL')); | ||
cy.findByTestId('LeftNav-CommandBarButtonHome').click(); | ||
cy.findByTestId('homePage-ToolBar-New').within(() => { | ||
cy.findByText('New').click(); | ||
}); | ||
}); | ||
|
||
it('can create a new bot', () => { | ||
cy.findByTestId('Create from scratch').click(); | ||
cy.findByTestId('NextStepButton').click(); | ||
cy.findByTestId('NewDialogName').type('{selectall}__TestNewProject{enter}'); | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('__TestNewProject.Main').should('exist'); | ||
}); | ||
}); | ||
|
||
it('can create a bot from the ToDo template', () => { | ||
cy.findByTestId('Create from template').click(); | ||
cy.findByTestId('TodoSample').click(); | ||
cy.findByTestId('NextStepButton').click(); | ||
cy.findByTestId('NewDialogName').type('{selectall}__TestNewProject{enter}'); | ||
cy.findByTestId('ProjectTree').within(() => { | ||
cy.findByText('__TestNewProject.Main').should('exist'); | ||
cy.findByText('AddToDo').should('exist'); | ||
cy.findByText('ClearToDos').should('exist'); | ||
cy.findByText('DeleteToDo').should('exist'); | ||
cy.findByText('ShowToDos').should('exist'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
context('Home Page ', () => { | ||
beforeEach(() => { | ||
cy.visit(Cypress.env('COMPOSER_URL')); | ||
}); | ||
|
||
it('can open buttons in home page', () => { | ||
cy.findByTestId('LeftNav-CommandBarButtonHome').click(); | ||
cy.findByTestId('homePage-ToolBar-New').click(); | ||
cy.findByText('Create from scratch?').should('exist'); | ||
cy.findByText('Cancel').should('exist'); | ||
cy.findByText('Cancel').click(); | ||
cy.findByTestId('homePage-ToolBar-Open').click(); | ||
cy.findByText('Select a Bot').should('exist'); | ||
cy.findByText('Cancel').should('exist'); | ||
cy.findByText('Cancel').click(); | ||
cy.findByTestId('homePage-body-New').click(); | ||
cy.findByText('Create from scratch?').should('exist'); | ||
}); | ||
}); |
17 changes: 11 additions & 6 deletions
17
Composer/cypress/integration/LGPage.spec.js → Composer/cypress/integration/LGPage.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.