From 96790054f117aa32219f8ff2827bcae27c337fef Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 18 Aug 2021 10:23:09 -0400 Subject: [PATCH] chore(): fix tests from merge --- packages/vue/test-app/tests/unit/routing.spec.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/vue/test-app/tests/unit/routing.spec.ts b/packages/vue/test-app/tests/unit/routing.spec.ts index cd2845979f..554101c58c 100644 --- a/packages/vue/test-app/tests/unit/routing.spec.ts +++ b/packages/vue/test-app/tests/unit/routing.spec.ts @@ -305,8 +305,11 @@ describe('Routing', () => { router.push('/xyz'); await waitForRouter(); - const cmpAgain = wrapper.findComponent(Page1); - expect(cmpAgain.props()).toEqual({ title: 'xyz' }); + const cmpAgain = wrapper.findAllComponents(Page1); + + expect(cmpAgain.length).toEqual(2); + expect(cmpAgain[0].props()).toEqual({ title: 'abc' }); + expect(cmpAgain[1].props()).toEqual({ title: 'xyz' }); }); // Verifies fix for https://github.com/ionic-team/ionic-framework/issues/23043 @@ -356,8 +359,11 @@ describe('Routing', () => { await waitForRouter(); expect(propsFn.mock.calls.length).toBe(2); - const cmpAgain = wrapper.findComponent(Page1); - expect(cmpAgain.props()).toEqual({ title: 'abc Title' }); + const cmpAgain = wrapper.findAllComponents(Page1); + + expect(cmpAgain.length).toEqual(2); + expect(cmpAgain[0].props()).toEqual({ title: '123 Title' }); + expect(cmpAgain[1].props()).toEqual({ title: 'abc Title' }); }); // Verifies fix for https://github.com/ionic-team/ionic-framework/pull/23189