Skip to content

Commit 280ab83

Browse files
committed
fix e2e test
1 parent e68277c commit 280ab83

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

mock-api/snapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const snapshots: Json<Snapshot>[] = [
104104
function generateSnapshot(index: number): Json<Snapshot> {
105105
return {
106106
id: uuid(),
107-
name: `disk-1-snapshot-${index + 7}`,
107+
name: `disk-1-snapshot-${index + 8}`,
108108
description: '',
109109
project_id: project.id,
110110
time_created: new Date().toISOString(),

test/e2e/pagination.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test('pagination', async ({ page }) => {
5252
await nextButton.click()
5353
await expectCell(page, 'disk-1-snapshot-76')
5454
await expectCell(page, 'disk-1-snapshot-86')
55-
await expect(rows).toHaveCount(11)
55+
await expect(rows).toHaveCount(12)
5656
await expect(nextButton).toBeDisabled() // no more pages
5757

5858
await scrollTo(page, 250)

test/e2e/snapshots.e2e.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('Click through snapshots', async ({ page }) => {
2828
test('Confirm delete snapshot', async ({ page }) => {
2929
await page.goto('/projects/mock-project/snapshots')
3030

31-
const row = page.getByRole('row', { name: 'disk-1-snapshot-7' })
31+
const row = page.getByRole('row', { name: 'disk-1-snapshot-10' })
3232

3333
// scroll a little so the dropdown menu isn't behind the pagination bar
3434
await page.getByRole('table').click() // focus the content pane
@@ -53,7 +53,8 @@ test('Confirm delete snapshot', async ({ page }) => {
5353
await page.getByRole('button', { name: 'Confirm' }).click()
5454

5555
// modal closes, row is gone
56-
await expectNotVisible(page, [modal, row])
56+
await expect(modal).toBeHidden()
57+
await expect(row).toBeHidden()
5758
})
5859

5960
test('Error on delete snapshot', async ({ page }) => {

0 commit comments

Comments
 (0)