Skip to content

Commit

Permalink
fix: e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarsen136 committed Jul 16, 2024
1 parent 3ecacbc commit 6be7b0c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
13 changes: 5 additions & 8 deletions components/collection/HeroButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,10 @@
</NeoDropdown>
</div>
</div>
<NeoModal :value="QRModalActive" @close="QRModalActive = false">
<div class="card" data-testid="hero-share-qrcode-modal">
<header class="card-header">
<p class="card-header-title">{{ collection?.name }}</p>
</header>
<div class="card-content">
<QRCode :text="currentCollectionUrl" />
</div>
<NeoModal :value="QRModalActive" header="" @close="QRModalActive = false">
<NeoModalHead :title="collection?.name" @close="QRModalActive = false" />
<div class="card-content" data-testid="hero-share-qrcode-modal">
<QRCode :text="currentCollectionUrl" />
</div>
</NeoModal>
</div>
Expand All @@ -101,6 +97,7 @@ import {
NeoDropdownItem,
NeoIcon,
NeoModal,
NeoModalHead,
} from '@kodadot1/brick'
import { useCollectionMinimal } from '@/components/collection/utils/useCollectionDetails'
import { hasOperationsDisabled } from '@/utils/prefix'
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/share.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ test('Share Button on Collection', async ({ page, Commands, baseURL }) => {
await shareBtn.click()
await page.getByTestId('hero-share-QR-dropdown').first().click()
await expect(page.getByTestId('hero-share-qrcode-modal')).toBeVisible()
await page.keyboard.press('Escape')
await page
.getByTestId('modal-close-button')
.and(page.locator(':visible'))
.click()
})
//Twitter
await test.step('Clicks on twitter and verify URL', async () => {
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/sidebar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ test('Sidebar Interactions', async ({ page, Commands }) => {
})
await page.getByTestId('button-add-funds-empty').click()
await expect(page.getByTestId('on-ramp-modal')).toBeVisible()
await page.keyboard.press('Escape')
await page
.getByTestId('modal-close-button')
.and(page.locator(':visible'))
.click()
await expect(page.getByTestId('on-ramp-modal')).not.toBeVisible()
})
})

0 comments on commit 6be7b0c

Please sign in to comment.