directive.test.js 389 B

12345678910111213
  1. import { expect } from '@playwright/test';
  2. import { prepareTestFactory } from './test-utils.js';
  3. const { test } = prepareTestFactory({ root: './fixtures/basics/' });
  4. test.describe('Basics', () => {
  5. test('Alpine is working', async ({ page, astro }) => {
  6. await page.goto(astro.resolveUrl('/'));
  7. const el = page.locator('#foo');
  8. expect(await el.textContent()).toBe('bar');
  9. });
  10. });