Skip to content

Add automated tests using playwright #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions tests/anyOf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { test } from "@playwright/test";

test.describe("anyOf", function () {
test("hide (empty) field header", async ({ _page }) => {
// TODO: create an enum
// TODO: select an option
// TODO: ensure the option doesn't show again below the header
test.fixme();
});

test("show nested field options", async ({ _page }) => {
// TODO: create an enum
// TODO: select an option (with nested fields)
// TODO: ensure the fields are shown
test.fixme();
});

test("set nested field options", async ({ _page }) => {
// TODO: create an enum
// TODO: select an option (with nested fields)
// TODO: ensure the fields can be set
test.fixme();
});
});
15 changes: 15 additions & 0 deletions tests/array.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { test } from "@playwright/test";

test.describe("array", function () {
test("add integer to array", async ({ _page }) => {
test.fixme();
});

test("add compound field to array", async ({ _page }) => {
test.fixme();
});

test("remove item from array", async ({ _page }) => {
test.fixme();
});
});
12 changes: 8 additions & 4 deletions tests/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { expect, test } from '@playwright/test';
import { test } from "@playwright/test";

test('index page has expected h1', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
test.describe("required options", function () {
test("dont expand required field in optional parent", async ({ _page }) => {
// TODO: create an enum
// TODO: select an option (with nested fields)
// TODO: ensure the fields can be set
test.fixme();
});
});
13 changes: 13 additions & 0 deletions tests/uiSchema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { test } from "@playwright/test";

test.describe("uiSchema", function () {
test.describe("ignoreEmpty", function () {
test("don't show a checkbox", async ({ _page }) => {
test.fixme();
});

test("don't include the property on download", async ({ _page }) => {
test.fixme();
});
});
});