access-to-page.spec.ts 446 B

123456789101112131415
  1. import { test, expect } from '@playwright/test';
  2. test('has title', async({ page }) => {
  3. await page.goto('/Sandbox');
  4. // Expect a title "to contain" a substring.
  5. await expect(page).toHaveTitle(/Sandbox/);
  6. });
  7. test('get h1', async({ page }) => {
  8. await page.goto('/Sandbox');
  9. // Expects page to have a heading with the name of Installation.
  10. await expect(page.getByRole('heading').filter({ hasText: /\/Sandbox/ })).toBeVisible();
  11. });