Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove the unused lufiles in notifications #1760

Merged
merged 3 commits into from
Dec 11, 2019
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
12 changes: 6 additions & 6 deletions Composer/cypress/integration/NotificationPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
context('Notification Page', () => {
beforeEach(() => {
cy.visit(Cypress.env('COMPOSER_URL'));
cy.createBot('TodoSample');
cy.createBot('ToDoBotWithLuisSample');
cy.visitPage('Notifications');
});

Expand All @@ -31,7 +31,7 @@ context('Notification Page', () => {
it('can show lu syntax error ', () => {
cy.visitPage('User Input');

cy.get('.dialogNavTree button[title="__TestTodoSample.Main"]').click({ multiple: true });
cy.get('.dialogNavTree button[title="__TestToDoBotWithLuisSample.Main"]').click({ multiple: true });

cy.get('.toggleEditMode button').click();
cy.get('textarea').type('test lu syntax error');
Expand All @@ -45,18 +45,18 @@ context('Notification Page', () => {
.click();
});

cy.findAllByText('__TestTodoSample.Main').should('exist');
cy.findAllByText('__TestToDoBotWithLuisSample.Main').should('exist');
});

it('can show dialog expression error ', () => {
cy.visitPage('Design Flow');

cy.findByTestId('ProjectTree').within(() => {
cy.findByText('Greeting').click();
cy.findByText('WelcomeUser').click();
});

cy.withinEditor('VisualEditor', () => {
cy.findByText('Greeting').should('exist');
cy.findByText('WelcomeUser').should('exist');
});

cy.withinEditor('FormEditor', () => {
Expand All @@ -73,6 +73,6 @@ context('Notification Page', () => {
.click();
});

cy.findAllByText('Greeting').should('exist');
cy.findAllByText('WelcomeUser').should('exist');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { StoreContext } from '../../store';
import { replaceDialogDiagnosticLabel } from '../../utils';

import { INotification, DiagnosticSeverity } from './types';
import { getReferredFiles } from './../../utils/luUtil';

export default function useNotifications(filter?: string) {
const { state } = useContext(StoreContext);
Expand All @@ -28,7 +29,7 @@ export default function useNotifications(filter?: string) {
});
});
});
luFiles.forEach(lufile => {
getReferredFiles(luFiles, dialogs).forEach(lufile => {
lufile.diagnostics.map(diagnostic => {
const location = `${lufile.id}.lu`;
notifactions.push({
Expand Down