access-to-page.spec.ts 690 B

12345678910111213141516171819202122
  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. });
  12. test('Access to /me page', async({ page }) => {
  13. await page.goto('/me');
  14. // Expect the UserSettgins-specific elements to be present when accessing /me (UserSettgins)
  15. await expect(page.getByTestId('grw-user-settings')).toBeVisible();
  16. });