Home / File/ nested-recursive.test.js — astro Source File

nested-recursive.test.js — astro Source File

Architecture documentation for nested-recursive.test.js, a javascript file in the astro codebase. 4 imports, 0 dependents.

File javascript E2ETesting TestFixtures 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  81699e07_b298_52b9_1dd3_2ee675105a76["nested-recursive.test.js"]
  2ca394f6_a63d_3921_1f12_c5a979ea0039["test-utils.js"]
  81699e07_b298_52b9_1dd3_2ee675105a76 --> 2ca394f6_a63d_3921_1f12_c5a979ea0039
  019f0b9c_f317_8761_c903_c4c521c6970a["loadFixture"]
  81699e07_b298_52b9_1dd3_2ee675105a76 --> 019f0b9c_f317_8761_c903_c4c521c6970a
  c373140e_7fdf_7fff_8884_991b85bc22b5["waitForHydrate"]
  81699e07_b298_52b9_1dd3_2ee675105a76 --> c373140e_7fdf_7fff_8884_991b85bc22b5
  f8fbe851_c5d6_c4ee_c044_67a751668c18["test"]
  81699e07_b298_52b9_1dd3_2ee675105a76 --> f8fbe851_c5d6_c4ee_c044_67a751668c18
  style 81699e07_b298_52b9_1dd3_2ee675105a76 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { test as base, expect } from '@playwright/test';
import { loadFixture, waitForHydrate } from './test-utils.js';

const test = base.extend({
	astro: async ({}, use) => {
		const fixture = await loadFixture(import.meta.url, { root: './fixtures/nested-recursive/' });
		await use(fixture);
	},
});

let devServer;

test.beforeAll(async ({ astro }) => {
	devServer = await astro.startDevServer();
});

test.afterAll(async () => {
	await devServer.stop();
});

test.describe('Recursive Nested Frameworks', () => {
	test('React counter', async ({ astro, page }) => {
		await page.goto(astro.resolveUrl('/'));

		const counter = page.locator('#react-counter');
		await expect(counter, 'component is visible').toBeVisible();

		const count = counter.locator('#react-counter-count');
		await expect(count, 'initial count is 0').toHaveText('0');

		await waitForHydrate(page, counter);

		const increment = counter.locator('#react-counter-increment');
		await increment.click();

		await expect(count, 'count incremented by 1').toHaveText('1');
	});

	test('Preact counter', async ({ astro, page }) => {
		await page.goto(astro.resolveUrl('/'));

		const counter = page.locator('#preact-counter');
		await expect(counter, 'component is visible').toBeVisible();

		const count = counter.locator('#preact-counter-count');
		await expect(count, 'initial count is 0').toHaveText('0');

		await waitForHydrate(page, counter);

		const increment = counter.locator('#preact-counter-increment');
		await increment.click();

		await expect(count, 'count incremented by 1').toHaveText('1');
	});

	test('Solid counter', async ({ astro, page }) => {
		await page.goto(astro.resolveUrl('/'));

		const counter = page.locator('#solid-counter');
		await expect(counter, 'component is visible').toBeVisible();

		const count = counter.locator('#solid-counter-count');
		await expect(count, 'initial count is 0').toHaveText('0');

		await waitForHydrate(page, counter);

		const increment = counter.locator('#solid-counter-increment');
		await increment.click();

		await expect(count, 'count incremented by 1').toHaveText('1');
	});

	test('Vue counter', async ({ astro, page }) => {
		await page.goto(astro.resolveUrl('/'));

		const counter = page.locator('#vue-counter');
		await expect(counter, 'component is visible').toBeVisible();

		const count = counter.locator('#vue-counter-count');
		await expect(count, 'initial count is 0').toHaveText('0');

		await waitForHydrate(page, counter);

		const increment = counter.locator('#vue-counter-increment');
		await increment.click();

		await expect(count, 'count incremented by 1').toHaveText('1');
	});

	test('Svelte counter', async ({ astro, page }) => {
		await page.goto(astro.resolveUrl('/'));

		const counter = page.locator('#svelte-counter');
		await expect(counter, 'component is visible').toBeVisible();

		const count = counter.locator('#svelte-counter-count');
		await expect(count, 'initial count is 0').toHaveText('0');

		await waitForHydrate(page, counter);

		const increment = counter.locator('#svelte-counter-increment');
		await increment.click();

		await expect(count, 'count incremented by 1').toHaveText('1');
	});
});

Domain

Subdomains

Functions

Frequently Asked Questions

What does nested-recursive.test.js do?
nested-recursive.test.js is a source file in the astro codebase, written in javascript. It belongs to the E2ETesting domain, TestFixtures subdomain.
What functions are defined in nested-recursive.test.js?
nested-recursive.test.js defines 1 function(s): test.astro.
What does nested-recursive.test.js depend on?
nested-recursive.test.js imports 4 module(s): loadFixture, test, test-utils.js, waitForHydrate.
Where is nested-recursive.test.js in the architecture?
nested-recursive.test.js is located at packages/astro/e2e/nested-recursive.test.js (domain: E2ETesting, subdomain: TestFixtures, directory: packages/astro/e2e).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free