diff --git a/e2e/specs/create-form-using-custom-schema.spec.ts b/e2e/specs/create-form-using-custom-schema.spec.ts index 7dafd3c..4faf94f 100644 --- a/e2e/specs/create-form-using-custom-schema.spec.ts +++ b/e2e/specs/create-form-using-custom-schema.spec.ts @@ -18,7 +18,9 @@ test("Create a form using a custom JSON schema", async ({ page }) => { }); await test.step("Then I paste in a custom JSON schema into the schema editor and click the `Render Changes` button", async () => { - await formBuilderPage.schemaInput().fill(JSON.stringify(customSchema)); + await formBuilderPage + .schemaInput() + .fill(JSON.stringify(customSchema, null, 2)); await formBuilderPage.renderChangesButton().click(); }); diff --git a/e2e/specs/interactive-builder.spec.ts b/e2e/specs/interactive-builder.spec.ts index 5a44a58..21a90de 100644 --- a/e2e/specs/interactive-builder.spec.ts +++ b/e2e/specs/interactive-builder.spec.ts @@ -18,14 +18,13 @@ test("Create a schema using the interactive builder", async ({ page }) => { await test.step("Then I should see the new schema in the schema editor and a success notification", async () => { await expect(page.getByText(/new question created/i)).toBeVisible(); - await expect( - page - .getByRole("tabpanel", { name: "Schema Editor" }) - .locator("div") - .filter({ - hasText: '{ "name": "Covid-19 Screening"', - }) - .nth(2) - ).toBeVisible(); + await page + .locator("#schemaEditor div") + .filter({ + hasText: + '{ "name": "Covid-19 Screening", "pages": [ { "label": "Screening", "sections": [', + }) + .nth(1) + .click(); }); }); diff --git a/e2e/support/custom-schema.json b/e2e/support/custom-schema.json index 9f5f46b..3df45a9 100644 --- a/e2e/support/custom-schema.json +++ b/e2e/support/custom-schema.json @@ -1,5 +1,5 @@ { - "encounterType": "", + "encounterType": "e22e39fd-7db2-45e7-80f1-60fa0d5a4378", "name": "UI Select Form Test", "pages": [ { @@ -26,5 +26,6 @@ "processor": "EncounterFormProcessor", "referencedForms": [], "uuid": "xxx", - "version": 1 + "version": "1", + "description": "This is test description" }