Skip to content

Commit

Permalink
tweak tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamfrank committed Nov 15, 2024
1 parent e21252b commit 6dbac94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 4 additions & 1 deletion test/e2e/centering.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ test.beforeEach(async ({ page }) => {
}, configuration)
})

test('Change position when clicking in the viewport', async ({ page }) => {
test('Change position when clicking in the viewport 1', async ({ page }) => {
await page.goto('/?item=2023_84_40_2_0139_00061830', { waitUntil: 'networkidle' })

await expect(page.locator('skraafoto-viewport')).toContainText('koordinat 722119 Ø, 6178801 N set fra nord.')
await expect(page.getByTitle('Billede af området omkring koordinat 722119 Ø, 6178801 N set fra øst.')).toBeDefined()
})

test('Change position when clicking in the viewport 2', async ({ page }) => {
await page.goto('/?item=2023_84_40_2_0139_00061830', { waitUntil: 'networkidle' })
const centerTool = await page.locator('skraafoto-pin-tool button')
if (centerTool) {
await centerTool.click()
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/shortkeys.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ test.beforeEach(async ({ page }) => {
})

test('Shift view from north to east using shortkeys', async ({ page }) => {
await expect(page.locator('skraafoto-viewport')).toContainText('set fra nord.')
await page.keyboard.press('Shift+ArrowLeft')
await expect(page.locator('skraafoto-viewport')).toContainText('koordinat 722119 Ø, 6178801 N set fra øst.')
})

test('Shift to earlier image using shortkeys', async ({ page }) => {
await expect(page.locator('.sf-date-selector')).toHaveValue('2023_84_40_2_0139_00061830')
await page.keyboard.press('Shift+ArrowDown')
await expect(page.locator('.sf-date-selector')).toHaveValue('2023_84_40_2_0139_00061833')
})

0 comments on commit 6dbac94

Please sign in to comment.