Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
shashkovdanil committed Dec 11, 2023
1 parent ae2118e commit e97b317
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion components/common/shoppingCart/ShoppingCartModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
data-testid="shopping-cart-modal-container">
<NeoModalHead
:title="$t('shoppingCart.title')"
data-testid="shopping-cart-modal"
@close="closeShoppingCart(ModalCloseType.BACK)" />
<div
v-if="numberOfItems"
Expand Down
1 change: 1 addition & 0 deletions libs/ui/src/components/NeoModalHead/NeoModalHead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<button
type="button"
class="w-full h-full text-left cursor-pointer p-0 bg-transparent text-base/normal text-text-color-inverse"
data-testid="modal-close-button"
@click="emit('close')">
<NeoIcon icon="chevron-left" />
<span>{{ title }}</span>
Expand Down
9 changes: 7 additions & 2 deletions tests/e2e/collection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,19 @@ test('Collection interactions', async ({ page, Commands }) => {
await page.locator('[class="infinite-scroll-item"]').nth(1).hover()
await page.getByTestId('item-add-to-cart').nth(1).click()
await page.getByTestId('navbar-button-cart').click()
await expect(page.getByTestId('shopping-cart-modal')).toBeVisible()
await expect(
page.getByTestId('shopping-cart-modal-container'),
).toBeVisible()
await expect(page.getByTestId('shopping-cart-item').nth(0)).toContainText(
COLLECTION_NAME,
)
await expect(page.getByTestId('shopping-cart-item').nth(1)).toContainText(
COLLECTION_NAME,
)
await page.getByTestId('modal-close-button').click()
await page
.getByTestId('modal-close-button')
.and(page.locator(':visible'))
.click()
})

//art view
Expand Down

0 comments on commit e97b317

Please sign in to comment.