import { test, expect } from '@playwright/test';

test('example', async ({ page }) => {
  await page.route('**/*.html', async route => {
    await route.fulfill({
      status: 200,
      body: `
        <link rel=stylesheet href="style.css">
        <div>hello</div>
        <script>console.log('hello', { foo: 'bar' })</script>
      `,
      contentType: 'text/html',
    });
  });
  await page.route('**/*.css', async route => {
    await route.fulfill({ status: 200, body: `div { background: red }` });
  });
  await page.goto('https://playwright.dev/index.html');
});
