Skip to content

Commit

Permalink
test: fix test in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Sep 27, 2023
1 parent 5f1c9c6 commit 3cfc3e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on: [push]
jobs:
test:
runs-on: ubuntu-latest
environment:
name: test
steps:
- uses: actions/checkout@v4

Expand Down
13 changes: 2 additions & 11 deletions tests/e2e/homepage/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,22 @@ test.beforeEach(async ({ page }) => {

const dialog = page.getByRole('dialog')

const button = page.getByTestId('select-onedrive-directory')
if (isUpdatingHar) {
await page.routeFromHAR(harPath, { url: harUrlPattern, update: true, updateMode: 'minimal' })
const button = page.getByTestId('select-onedrive-directory')
await button.click()
await dialog.getByRole('link').click()
} else {
console.log(1)
await page.evaluate(setMockLocalStorage)
console.log(2)
await page.routeFromHAR(harPath, { url: harUrlPattern })
console.log(3)
const button = page.getByTestId('select-onedrive-directory')
console.log(4)
await button.click()
console.log(5)
}

const node = dialog.getByTestId('directory-tree-node')
console.log(6)
await node.filter({ hasText: 'games' }).click()
console.log(7)
await node.filter({ hasText: 'retro-game-roms-test' }).getByRole('button').click()
console.log(8)

await expect(dialog).not.toBeVisible()
console.log(9)
})

test('navigate systems', async ({ page }) => {
Expand Down

0 comments on commit 3cfc3e8

Please sign in to comment.