From 6a34c3e4fc310b7609965dc12da6f43356bf6cd6 Mon Sep 17 00:00:00 2001 From: kdaud Date: Tue, 4 Jun 2024 13:00:19 +0300 Subject: [PATCH] Test Keycloak flows --- .env | 2 +- e2e/tests/openmrs-superset-flows.spec.ts | 4 ++-- package.json | 2 +- playwright.config.ts | 4 +++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.env b/.env index c43af12b..0600c580 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ # The target environment that will be tested. # Possibles values are dev, qa, demo. -TEST_ENVIRONMENT=dev +TEST_ENVIRONMENT=demo # Set to true to test Ozone Pro, false to test Ozone FOSS. TEST_PRO=true diff --git a/e2e/tests/openmrs-superset-flows.spec.ts b/e2e/tests/openmrs-superset-flows.spec.ts index 2232efbb..a08f4f1e 100644 --- a/e2e/tests/openmrs-superset-flows.spec.ts +++ b/e2e/tests/openmrs-superset-flows.spec.ts @@ -60,7 +60,7 @@ test('Creating an OpenMRS patient creates the patient in Superset patients table await superset.clearSQLEditor(); await openmrs.voidPatient(); }); - +/* test('Creating an OpenMRS visit creates the visit in Superset visits table.', async ({ page }) => { // setup await openmrs.createPatient(); @@ -613,7 +613,7 @@ test('Cancelling an OpenMRS appointment updates the appointment in Superset appo await superset.clearSQLEditor(); await openmrs.voidPatient(); }); - +*/ test.afterEach(async ({ page }) => { await page.close(); }); diff --git a/package.json b/package.json index 37eaab37..b2c52692 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "!playwright-report/" ], "scripts": { - "e2e-tests-pro": "npx playwright test", + "e2e-tests-pro": "npx playwright test keycloak", "e2e-tests-foss": "npx playwright test odoo-openmrs erpnext-openmrs openmrs-senaite" }, "publishConfig": { diff --git a/playwright.config.ts b/playwright.config.ts index f7e15c96..8d598a35 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -23,7 +23,9 @@ const config: PlaywrightTestConfig = { name: 'chromium', use: { ...devices['Desktop Chromium'], - viewport: { width: 1920, height: 1080 } + viewport: { width: 1920, height: 1080 }, + screenshot: 'only-on-failure', + video: 'on' }, },