Skip to content

Commit

Permalink
fix: integration test (#6017)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiveMe-A-Name authored Jul 30, 2024
1 parent c389cbb commit c89066a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Link, Outlet, useLoaderData } from '@modern-js/runtime/router';
export default () => {
const data = useLoaderData() as string;
return (
<div>
<div id="root_layout">
{data}
<Link to="a" className="a-btn">
jupmp to A
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/ssr/tests/partial.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('test partial ssr', () => {
expect(content).not.toContain('root layout');

await page.goto(`http://localhost:${appPort}/one`);
await page.waitForSelector('#root');
await page.waitForSelector('#root_layout');
const pageContent = await page.content();
expect(pageContent).toContain('root layout');
});
Expand All @@ -53,7 +53,7 @@ describe('test partial ssr', () => {
expect(content).not.toContain('root layout');

await page.goto(`http://localhost:${appPort}/one/a`);
await page.waitForSelector('#root');
await page.waitForSelector('#root_layout');
const pageContent = await page.content();
expect(pageContent).toContain('root layout');
expect(pageContent).toContain('PageA Data');
Expand All @@ -65,7 +65,7 @@ describe('test partial ssr', () => {
expect(content).toContain('root layout');

await page.goto(`http://localhost:${appPort}/one/b`);
await page.waitForSelector('#root');
await page.waitForSelector('#root_layout');
const pageContent = await page.content();
expect(pageContent).toContain('root layout');
expect(pageContent).toContain('PageB Data');
Expand All @@ -88,7 +88,7 @@ describe('test partial ssr', () => {
expect(content).not.toContain('root layout');

await page.goto(`http://localhost:${appPort}/one/b/d`);
await page.waitForSelector('#root');
await page.waitForSelector('#root_layout');
const pageContent = await page.content();
expect(pageContent).toContain('root layout');
expect(pageContent).toContain('PageD Data');
Expand Down

0 comments on commit c89066a

Please sign in to comment.