Skip to content

Commit aa909b4

Browse files
committed
Removes posthog components from Astro test app for more integral test
Upgrades the Astro framework version to 5.10.1 and removes the PostHog integration components to have bare minimum for more accurate E2E tests
1 parent 2eb5868 commit aa909b4

File tree

6 files changed

+161
-283
lines changed

6 files changed

+161
-283
lines changed

e2e-tests/test-applications/astro-test-app/package-lock.json

Lines changed: 141 additions & 198 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/test-applications/astro-test-app/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"astro": "astro"
1010
},
1111
"dependencies": {
12-
"astro": "^5.9.3",
13-
"posthog-js": "^1.252.1"
12+
"astro": "^5.10.1"
1413
}
15-
}
14+
}

e2e-tests/test-applications/astro-test-app/src/components/posthog.astro

Lines changed: 0 additions & 56 deletions
This file was deleted.

e2e-tests/test-applications/astro-test-app/src/layouts/PostHogLayout.astro

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
2-
import PostHogLayout from '../layouts/PostHogLayout.astro';
2+
33
---
4-
<PostHogLayout>
5-
<h1>Astro</h1>
6-
</PostHogLayout>
4+
5+
<html lang="en">
6+
<head>
7+
<meta charset="utf-8" />
8+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
9+
<meta name="viewport" content="width=device-width" />
10+
<meta name="generator" content={Astro.generator} />
11+
<title>Astro</title>
12+
</head>
13+
<body>
14+
<h1>Astro</h1>
15+
</body>
16+
</html>

e2e-tests/tests/astro.test.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
import { cleanupGit, revertLocalChanges } from '../utils';
33
import { startWizardInstance } from '../utils';
44
import {
5-
checkIfBuilds,
6-
checkIfRunsOnDevMode,
7-
checkIfRunsOnProdMode,
8-
checkPackageJson,
9-
} from '../utils';
5+
checkIfBuilds,
6+
checkIfRunsOnDevMode,
7+
checkIfRunsOnProdMode,
8+
} from "../utils";
109
import * as path from 'node:path';
1110

1211
describe('Astro', () => {
@@ -18,8 +17,6 @@ describe('Astro', () => {
1817
beforeAll(() => {
1918
const wizardInstance = startWizardInstance(projectDir);
2019

21-
// TODO: Step through the wizard - mocking queries
22-
2320
wizardInstance.kill();
2421
});
2522

@@ -28,10 +25,6 @@ describe('Astro', () => {
2825
cleanupGit(projectDir);
2926
});
3027

31-
test('package.json is updated correctly', () => {
32-
checkPackageJson(projectDir, 'posthog-js');
33-
});
34-
3528
test('runs on dev mode correctly', async () => {
3629
await checkIfRunsOnDevMode(projectDir, 'Local:');
3730
});

0 commit comments

Comments
 (0)