Skip to content

Commit 123f676

Browse files
committed
Updated server version in playwright.config.js and minor test improvement
1 parent 896f34a commit 123f676

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default defineConfig({
3939

4040
webServer: [
4141
{
42-
command: './tests/start-test-server.sh 1.4.3a2',
42+
command: './tests/start-test-server.sh 1.4.3',
4343
port: 8000,
4444
waitForPort: true,
4545
stdout: 'pipe',

tests/add_single_task.spec.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test('Add single tasks', async ({ page }) => {
6363
const fileChooser = await fileChooserPromise;
6464
await fileChooser.setFiles(path.join(__dirname, 'data', 'broken.json'));
6565
await createBtn.click();
66-
expect(await page.getByText("File doesn't contain valid JSON").count()).toEqual(1);
66+
await page.getByText("File doesn't contain valid JSON").waitFor();
6767
await page.getByRole('button', { name: 'Clear' }).click();
6868
});
6969

@@ -73,11 +73,9 @@ test('Add single tasks', async ({ page }) => {
7373
const fileChooser = await fileChooserPromise;
7474
await fileChooser.setFiles(path.join(__dirname, 'data', 'invalid-schema.json'));
7575
await createBtn.click();
76-
expect(
77-
await page
78-
.getByText('File doesn\'t contain valid JSON Schema: strict mode: unknown keyword: "foo"')
79-
.count()
80-
).toEqual(1);
76+
await page
77+
.getByText('File doesn\'t contain valid JSON Schema: strict mode: unknown keyword: "foo"')
78+
.waitFor();
8179
await page.getByRole('button', { name: 'Clear' }).click();
8280
});
8381

@@ -115,7 +113,7 @@ test('Add single tasks', async ({ page }) => {
115113
const fileChooser = await fileChooserPromise;
116114
await fileChooser.setFiles(path.join(__dirname, 'data', 'broken.json'));
117115
await createBtn.click();
118-
expect(await page.getByText("File doesn't contain valid JSON").count()).toEqual(1);
116+
await page.getByText("File doesn't contain valid JSON").waitFor();
119117
await page.getByRole('button', { name: 'Clear' }).click();
120118
});
121119

0 commit comments

Comments
 (0)