From d8e750597f6b0ff3aaabb5726b16639e012986b4 Mon Sep 17 00:00:00 2001 From: Ben Yackley <61990921+beyackle@users.noreply.github.com> Date: Thu, 5 Nov 2020 16:19:23 -0800 Subject: [PATCH 1/5] Update projectTemplates.ts --- .../client/src/recoilModel/selectors/projectTemplates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Composer/packages/client/src/recoilModel/selectors/projectTemplates.ts b/Composer/packages/client/src/recoilModel/selectors/projectTemplates.ts index 5567474c85..c3f7cfffa5 100644 --- a/Composer/packages/client/src/recoilModel/selectors/projectTemplates.ts +++ b/Composer/packages/client/src/recoilModel/selectors/projectTemplates.ts @@ -19,7 +19,7 @@ export const filteredTemplatesSelector = selector({ filteredTemplates.splice(vaTemplateIndex, 1); } } - if (!featureFlags.REMOTE_TEMPLATE_CREATION_EXPERIENCE.enabled) { + if (!featureFlags?.REMOTE_TEMPLATE_CREATION_EXPERIENCE?.enabled) { filteredTemplates = filteredTemplates.filter((template: BotTemplate) => { if (template.path) { return template; From 27e9bfd8c0e9b2d6f629e7ea4d3011ffbed75194 Mon Sep 17 00:00:00 2001 From: Ben Yackley <61990921+beyackle@users.noreply.github.com> Date: Thu, 12 Nov 2020 14:10:37 -0800 Subject: [PATCH 2/5] Update navigation.test.tsx --- .../src/recoilModel/dispatchers/__tests__/navigation.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx b/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx index 1ae9e0ca06..db5c04e1d7 100644 --- a/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx +++ b/Composer/packages/client/src/recoilModel/dispatchers/__tests__/navigation.test.tsx @@ -175,7 +175,7 @@ describe('navigation dispatcher', () => { it("doesn't navigate to a destination where we already are", async () => { mockCheckUrl.mockReturnValue(true); await act(async () => { - await dispatcher.navTo(projectId, 'dialogId'); + await dispatcher.navTo(projectId, 'dialogId', 'trigger'); }); expect(mockNavigateTo).not.toBeCalled(); }); From 88047567dabc2729751db5f79ca290f0143def01 Mon Sep 17 00:00:00 2001 From: Ben Yackley <61990921+beyackle@users.noreply.github.com> Date: Fri, 13 Nov 2020 13:47:02 -0800 Subject: [PATCH 3/5] click last instance of bot/dialog name --- Composer/cypress/integration/Breadcrumb.spec.ts | 4 ++-- Composer/cypress/integration/LGPage.spec.ts | 2 +- Composer/cypress/integration/LUPage.spec.ts | 2 +- Composer/cypress/integration/NotificationPage.spec.ts | 2 +- Composer/cypress/integration/VisualDesigner.spec.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Composer/cypress/integration/Breadcrumb.spec.ts b/Composer/cypress/integration/Breadcrumb.spec.ts index e0a0ff7eb4..9f7d373374 100644 --- a/Composer/cypress/integration/Breadcrumb.spec.ts +++ b/Composer/cypress/integration/Breadcrumb.spec.ts @@ -8,7 +8,7 @@ context('breadcrumb', () => { // Return to Main.dialog cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestTodoSample').click(); + cy.findAllByText('__TestTodoSample').last().click(); }); }); @@ -29,7 +29,7 @@ context('breadcrumb', () => { // Return to Main.dialog cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestTodoSample').click(); + cy.findAllByText('__TestTodoSample').last().click(); }); hasBreadcrumbItems(cy, ['__TestTodoSample']); diff --git a/Composer/cypress/integration/LGPage.spec.ts b/Composer/cypress/integration/LGPage.spec.ts index 7f935451ea..c08ac53ed0 100644 --- a/Composer/cypress/integration/LGPage.spec.ts +++ b/Composer/cypress/integration/LGPage.spec.ts @@ -29,7 +29,7 @@ context('LG Page', () => { // nav to Main dialog cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestTodoSample').click(); + cy.findAllByText('__TestTodoSample').last().click(); }); }); }); diff --git a/Composer/cypress/integration/LUPage.spec.ts b/Composer/cypress/integration/LUPage.spec.ts index 05704f40a1..c4b1c8df42 100644 --- a/Composer/cypress/integration/LUPage.spec.ts +++ b/Composer/cypress/integration/LUPage.spec.ts @@ -23,7 +23,7 @@ context('LU Page', () => { // nav to ToDoBotWithLuisSample.main dialog cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestToDoBotWithLuisSample').click('left'); + cy.findAllByText('__TestToDoBotWithLuisSample').last().click('left'); }); cy.findByTestId('showcode').as('switchButton'); // goto edit-mode diff --git a/Composer/cypress/integration/NotificationPage.spec.ts b/Composer/cypress/integration/NotificationPage.spec.ts index 49a0c50045..58258cb6f1 100644 --- a/Composer/cypress/integration/NotificationPage.spec.ts +++ b/Composer/cypress/integration/NotificationPage.spec.ts @@ -25,7 +25,7 @@ context('Notification Page', () => { cy.visitPage('User Input'); cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestToDoBotWithLuisSample').click(); + cy.findAllByText('__TestToDoBotWithLuisSample').last().click(); }); cy.findByTestId('showcode').click(); diff --git a/Composer/cypress/integration/VisualDesigner.spec.ts b/Composer/cypress/integration/VisualDesigner.spec.ts index 470c42de97..6c44924333 100644 --- a/Composer/cypress/integration/VisualDesigner.spec.ts +++ b/Composer/cypress/integration/VisualDesigner.spec.ts @@ -7,7 +7,7 @@ context('Visual Designer', () => { cy.createBot('TodoSample'); // Return to Main.dialog cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestTodoSample').click(); + cy.findAllByText('__TestTodoSample').last().click(); }); }); From 779b44b8c68910abc4f3c855cf998c2a0232f702 Mon Sep 17 00:00:00 2001 From: Ben Yackley <61990921+beyackle@users.noreply.github.com> Date: Fri, 13 Nov 2020 14:15:12 -0800 Subject: [PATCH 4/5] Update CreateNewBot.spec.ts --- Composer/cypress/integration/CreateNewBot.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Composer/cypress/integration/CreateNewBot.spec.ts b/Composer/cypress/integration/CreateNewBot.spec.ts index 1b9210fbbf..60822b3708 100644 --- a/Composer/cypress/integration/CreateNewBot.spec.ts +++ b/Composer/cypress/integration/CreateNewBot.spec.ts @@ -15,7 +15,7 @@ context('Creating a new bot', () => { cy.findByTestId('NextStepButton').click(); cy.enterTextAndSubmit('NewDialogName', '__TestNewProject', 'SubmitNewBotBtn'); cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestNewProject').should('exist'); + cy.findAllByText('__TestNewProject').should('exist'); }); }); @@ -25,7 +25,7 @@ context('Creating a new bot', () => { cy.findByTestId('NextStepButton').click(); cy.enterTextAndSubmit('NewDialogName', '__TestNewProject2', 'SubmitNewBotBtn'); cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestNewProject2').should('exist'); + cy.findAllByText('__TestNewProject2').should('exist'); cy.findByText('addtodo').should('exist'); cy.findByText('cleartodos').should('exist'); cy.findByText('deletetodo').should('exist'); From b4c862e6ea67ee4197cbf13590853a0b3fecb73a Mon Sep 17 00:00:00 2001 From: Ben Yackley <61990921+beyackle@users.noreply.github.com> Date: Fri, 13 Nov 2020 15:25:54 -0800 Subject: [PATCH 5/5] update more tests --- Composer/cypress/integration/SaveAs.spec.ts | 2 +- Composer/cypress/integration/ToDoBot.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Composer/cypress/integration/SaveAs.spec.ts b/Composer/cypress/integration/SaveAs.spec.ts index c7e2a63b54..cc5948acee 100644 --- a/Composer/cypress/integration/SaveAs.spec.ts +++ b/Composer/cypress/integration/SaveAs.spec.ts @@ -14,7 +14,7 @@ context('Saving As', () => { cy.findByText('Save as').click(); cy.enterTextAndSubmit('NewDialogName', '__TestSaveAs', 'SubmitNewBotBtn'); cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestSaveAs').should('exist'); + cy.findAllByText('__TestSaveAs').should('exist'); }); }); }); diff --git a/Composer/cypress/integration/ToDoBot.spec.ts b/Composer/cypress/integration/ToDoBot.spec.ts index 4625c90421..8af24257ca 100644 --- a/Composer/cypress/integration/ToDoBot.spec.ts +++ b/Composer/cypress/integration/ToDoBot.spec.ts @@ -11,10 +11,10 @@ context('ToDo Bot', () => { it('can open the main dialog', () => { cy.findByTestId('ProjectTree').within(() => { - cy.findByText('__TestTodoSample').click(); + cy.findAllByText('__TestTodoSample').last().click(); }); cy.withinEditor('PropertyEditor', () => { - cy.findByDisplayValue('__TestTodoSample').should('exist'); + cy.findAllByDisplayValue('__TestTodoSample').should('exist'); }); });