Debian Codegraph @

tests/functional/api-navigation.spec.ts

raw
1 import { test } from '@playwright/test';
2
3 import { expectToBeAt } from '../support/commands.js';
4
5 test.describe('api navigation', () => {
6 test.beforeEach(async ({ page }) => {
7 await page.goto('/page-1.html');
8 });
9
10 test('navigate to pages using swup api', async ({ page }) => {
11 await page.evaluate(() => window._swup.navigate('/page-2.html'));
12 await expectToBeAt(page, '/page-2.html', 'Page 2');
13 });
14 });