Skip to content

Commit

Permalink
smoke test and architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Istvan Gercsak committed Dec 14, 2023
1 parent ca1add5 commit dac9b23
Show file tree
Hide file tree
Showing 27 changed files with 382 additions and 532 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@

`npx playwright codegen` - Auto generate tests with Codegen.

We suggest that you begin by typing:
#### Run tests with tags

`npx playwright test`
We have to add "@tagname" into the test and when we run the test we have to run like this
`npx playwright test --grep @tagname`

#### Files
* package.json
Expand Down
21 changes: 21 additions & 0 deletions e2e/appiontments/appointments.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { pageTitle, pageURL } from '../../support/data/page'
import appointmentsPage from "../../support/page_objects/appointments/appointments.page"
import generalCommands from "../../support/generalCommands/general.commands"

// @ts-check
const { test, expect } = require('@playwright/test');
const devFeatureFlags = JSON.parse(JSON.stringify(require("../../fixtures/feature_flags_dev.json")));

test.beforeEach("Authentication", async ({ page, request }) => {
await page.goto(process.env.DEV_BASE_URL);
await generalCommands.loginAPI(page, request);
await generalCommands.turnOnFeatureFlag(page, devFeatureFlags);
})

test('Appointment screen is available @smoke', async ({ page }) => {

await appointmentsPage.navigatToAppointmentsScreen(page);
await expect(page).toHaveTitle(pageTitle.APPOINTMENTS);
await expect(page.url()).toContain(pageURL.APPOINTMENTS);

});
21 changes: 21 additions & 0 deletions e2e/clients/clients.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { pageTitle, pageURL } from '../../support/data/page'
import clientsPage from "../../support/page_objects/clients/clients.page"
import generalCommands from "../../support/generalCommands/general.commands"

// @ts-check
const { test, expect } = require('@playwright/test');
const devFeatureFlags = JSON.parse(JSON.stringify(require("../../fixtures/feature_flags_dev.json")));

test.beforeEach("Authentication", async ({ page, request }) => {
await page.goto(process.env.DEV_BASE_URL);
await generalCommands.loginAPI(page, request);
await generalCommands.turnOnFeatureFlag(page, devFeatureFlags);
})

test('Clients screen is available @smoke', async ({ page }) => {

await clientsPage.navigatToClientsScreen(page);
await expect(page).toHaveTitle(pageTitle.CLIENTS);
await expect(page.url()).toContain(pageURL.CLIENTS);

});
Loading

0 comments on commit dac9b23

Please sign in to comment.