From 121ee594d07e6ab9d0dac1163cad271aa7e978e5 Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Thu, 21 Nov 2024 07:43:35 +0500 Subject: [PATCH 1/2] fix(tests/e2e/sidebar.spec.ts): wait for profile pill to load --- components/navbar/ConnectedProfile.vue | 1 + tests/e2e/sidebar.spec.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/navbar/ConnectedProfile.vue b/components/navbar/ConnectedProfile.vue index c23d18e268..4d605ef26f 100644 --- a/components/navbar/ConnectedProfile.vue +++ b/components/navbar/ConnectedProfile.vue @@ -13,6 +13,7 @@ root-class="!px-2" label-class="flex gap-[10px] items-center" aria-label="open profile menu" + data-testid="navbar-connected-profile" :active="isWalletModalOpen" @click="$emit('click')" > diff --git a/tests/e2e/sidebar.spec.ts b/tests/e2e/sidebar.spec.ts index f9561a2ddc..e6edc2fe99 100644 --- a/tests/e2e/sidebar.spec.ts +++ b/tests/e2e/sidebar.spec.ts @@ -7,6 +7,8 @@ test('Sidebar Interactions', async ({ page, Commands }) => { await page.goto(LANDING_PATH) await test.step('Switches trough sidebars and check if they overlap each other', async () => { // profile + // wait for profile pill to load + await expect(page.getByTestId('navbar-connected-profile')).toBeVisible({ timeout: 10000 }) await page.getByTestId('navbar-profile-dropdown').click() await expect(page.getByTestId('sidebar-wallet-container')).toBeVisible() // cart From b69af3440a451cfc4d993aee60f5b967a6a6c158 Mon Sep 17 00:00:00 2001 From: hassnian <44554284+hassnian@users.noreply.github.com> Date: Thu, 21 Nov 2024 07:44:28 +0500 Subject: [PATCH 2/2] fix(tests/e2e/sidebar.spec.ts): `OnRampModal` test id not being passed to modal --- libs/ui/src/components/NeoModal/NeoModal.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/ui/src/components/NeoModal/NeoModal.vue b/libs/ui/src/components/NeoModal/NeoModal.vue index 2a3557b2ab..eb21898852 100644 --- a/libs/ui/src/components/NeoModal/NeoModal.vue +++ b/libs/ui/src/components/NeoModal/NeoModal.vue @@ -13,6 +13,7 @@ :destroy-on-hide="destroyOnHide" :can-cancel="canCancel" :full-screen="fullScreen" + :data-testid="dataTestid" :content-class="[ ...contentClassName, noShadow ? 'no-shadow' : '', @@ -50,6 +51,7 @@ const props = withDefaults( mobileBreakpoint?: string appendToBody?: boolean noOverlap?: boolean + dataTestid?: string }>(), { destroyOnHide: true, @@ -62,6 +64,7 @@ const props = withDefaults( maxHeight: '80vh', mobileBreakpoint: '768px', appendToBody: true, + dataTestid: undefined, }, )