Skip to content

Commit

Permalink
{page} passed to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Nov 27, 2024
1 parent 23c6846 commit c2b9cc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
testDir: './test',
maxFailures: 2,
timeout: 60 * 1000,
//workers: 4,
workers: 4,
use: {
// Maximum time each action such as `click()` can take. Defaults to 0 (no limit).
actionTimeout: 0,
Expand Down
10 changes: 5 additions & 5 deletions test/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ REMEMBER TO REBUILD THE APP IF THE *APPLICATION CODE* NEEDS TO BE CHANGED
// })


test('Page title is correct', async () => {
test('Page title is correct', async ({page}) => {
const title = await page.title()
console.log('title: ', title)
console.log('url: ', page.url())
Expand All @@ -110,7 +110,7 @@ test('Page title is correct', async () => {
})


test(`Nocmig analyse works and second result is 61%`, async () => {
test(`Nocmig analyse works and second result is 61%`, async ({page}) => {
await runExampleAnalysis(page,'chirpity');
const callID = page.locator('#speciesFilter').getByText('Redwing (call)');
expect(callID).not.toBe(undefined)
Expand All @@ -119,7 +119,7 @@ test(`Nocmig analyse works and second result is 61%`, async () => {
expect(secondResult).toBe('61%');
})

test(`BirdNET analyse works and second result is 34%`, async () => {
test(`BirdNET analyse works and second result is 34%`, async ({page}) => {
await runExampleAnalysis(page, 'birdnet');
const callID = page.locator('#speciesFilter').getByText('Redwing (call)');
expect(callID).not.toBe(undefined)
Expand Down Expand Up @@ -148,7 +148,7 @@ test(`BirdNET analyse works and second result is 34%`, async () => {
// })
// })

test("Amend file start dialog contains date", async () =>{
test("Amend file start dialog contains date", async ({page}) =>{
await runExampleAnalysis(page, 'chirpity');
await page.locator('#dropdownMenuButton').click({button: 'right'});
await page.locator('#setFileStart').click();
Expand All @@ -159,7 +159,7 @@ test("Amend file start dialog contains date", async () =>{
// await page.locator('#spectrogramWrapper button.btn-secondary').click();
})

test("Select inverted greyscale colourmap", async () =>{
test("Select inverted greyscale colourmap", async ({page}) =>{
await runExampleAnalysis(page, 'chirpity');
await changeSettings(page, 'select', 'colourmap', 'igreys', 50)
// await page.locator('#spectrogramWrapper button.btn-secondary').click();
Expand Down

0 comments on commit c2b9cc3

Please sign in to comment.