Skip to content

Latest commit

 

History

History
64 lines (53 loc) · 1.96 KB

File metadata and controls

64 lines (53 loc) · 1.96 KB

Tasks to be implemented

  • Make sure that tests are opening base URL from config and not hardcoded in tests.

  • Create Base Test class

  • Create HomePage class and use it in tests instead of page object.

  • Create BasePage class and use it in HomePage instead of Page object.

  • Test environment support

  • API Client Class implementation for backend tests.

  • Test alternative URL for backend option.

  • Test tags

  • Backend tests implementation.

  • Configurations for prod and staging environments.

  • POM Implementation


  • Write about static code analysis in docs - this should be documented what and how it works (in details).
    • Fix it first 😊
  • Create serious POM structure for the tests.
    • Pages to be created as composition of components or layouts.
    • Components to be reused across pages.
    • Base classes to be abstracted (BaseTest)
  • Use Playwright expects instad of plain asserts.
  • Environemtns split https://playwright.dev/docs/test-projects#configure-projects-for-multiple-environments
  • Smoke test definition and implementation.
import { test, expect } from "@playwright/test";

test(
  "user can log in",
  {
    tag: "@smoke",
  },
  async ({ page }) => {
    await page.goto("/login");
    await expect(page).toHaveTitle(/Login/);
  },
);

Modeling tags for tests might be usefull

export const TAGS = {
  SMOKE: "@smoke",
  REGRESSION: "@regression",
  CRITICAL: "@critical",
};

References