-
Notifications
You must be signed in to change notification settings - Fork 378
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
221 changed files
with
3,586 additions
and
2,002 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/// <reference types="Cypress" /> | ||
|
||
context('check notifications page', () => { | ||
beforeEach(() => { | ||
cy.visit(Cypress.env('COMPOSER_URL')); | ||
cy.createBot('TodoSample'); | ||
}); | ||
|
||
it('can show lg syntax error ', () => { | ||
cy.visitPage("Bot Responses"); | ||
// left nav tree | ||
cy.contains('TodoSample.Main'); | ||
cy.contains('All'); | ||
|
||
cy.get('.toggleEditMode button').click(); | ||
cy.get('textarea').type('test lg syntax error'); | ||
|
||
cy.visitPage("Notifications"); | ||
|
||
cy.get('[data-testid="notifications-table-view"]').within(() => { | ||
cy.getByText('common.lg').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
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
23 changes: 23 additions & 0 deletions
23
Composer/packages/client/__tests__/components/notificationHeader.test.js
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,23 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import * as React from 'react'; | ||
import { fireEvent, render } from 'react-testing-library'; | ||
|
||
import { NotificationHeader } from '../../src/pages/notifications/NotificationHeader'; | ||
|
||
describe('<NotificationHeader/>', () => { | ||
const items = ['test1', 'test2', 'test3']; | ||
it('should render the NotificationHeader', () => { | ||
const mockOnChange = jest.fn(() => null); | ||
const { container } = render(<NotificationHeader items={items} onChange={mockOnChange} />); | ||
|
||
expect(container).toHaveTextContent('Notifications'); | ||
expect(container).toHaveTextContent('All'); | ||
const dropdown = container.querySelector('[data-testid="notifications-dropdown"]'); | ||
fireEvent.click(dropdown); | ||
const test = document.querySelector('.ms-Dropdown-callout'); | ||
expect(test).toHaveTextContent('test1'); | ||
expect(test).toHaveTextContent('test2'); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
Composer/packages/client/__tests__/components/notificationList.test.js
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. | ||
|
||
import * as React from 'react'; | ||
import { render } from 'react-testing-library'; | ||
|
||
import { NotificationList } from '../../src/pages/notifications/NotificationList'; | ||
|
||
describe('<NotificationList/>', () => { | ||
const items = [ | ||
{ type: 'Error', location: 'test1', message: 'error1' }, | ||
{ type: 'Warning', location: 'test2', message: 'error2' }, | ||
{ type: 'Error', location: 'test3', message: 'error3' }, | ||
]; | ||
it('should render the NotificationList', () => { | ||
const { container } = render(<NotificationList items={items} />); | ||
|
||
expect(container).toHaveTextContent('test1'); | ||
expect(container).toHaveTextContent('test2'); | ||
expect(container).toHaveTextContent('test3'); | ||
}); | ||
}); |
Oops, something went wrong.