Skip to content

Commit

Permalink
Fix Astro template test
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Nov 13, 2023
1 parent 5f0e9a6 commit c776399
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
[
'npx create-next-app --example "https://github.com/sumup-oss/circuit-ui/tree/main/packages/cna-template/template" test-app',
'npx create-remix@latest ./test-app --template https://github.com/sumup-oss/circuit-ui/tree/main/packages/remix-template --install --no-git-init',
'npx create-astro@latest ./test-app --template sumup-oss/circuit-ui/packages/astro-template',
'npx create-astro@latest ./test-app --template sumup-oss/circuit-ui/packages/astro-template --install --no-git --typescript=strictest',
]
steps:
- name: Checkout repository
Expand All @@ -39,4 +39,4 @@ jobs:

- name: Test app
working-directory: ./test-app
run: npx start-server-and-test start 0.0.0.0:3000 "node ../scripts/verify-template.js"
run: npx start-server-and-test 'npm run start -- --port=3000' localhost:3000 "node ../scripts/verify-template.js"
3 changes: 3 additions & 0 deletions packages/astro-template/src/layouts/Root.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
import '@sumup/design-tokens/light.css';
import '@sumup/circuit-ui/styles.css';
import { SumUpLogo } from '@sumup/icons';
interface Props {
Expand Down
3 changes: 0 additions & 3 deletions packages/astro-template/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
import '@sumup/design-tokens/light.css';
import '@sumup/circuit-ui/styles.css';
import { Title, BodyLarge } from '@sumup/circuit-ui';
import Root from '../layouts/Root.astro';
import DocCard from '../components/DocCard.astro';
Expand Down
4 changes: 3 additions & 1 deletion scripts/verify-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ const puppeteer = require('puppeteer');
const expected = 'Welcome to Circuit UI';

try {
const browser = await puppeteer.launch();
const browser = await puppeteer.launch({
headless: 'new',
});
const page = await browser.newPage();

await page.goto('http://localhost:3000');
Expand Down

1 comment on commit c776399

@vercel
Copy link

@vercel vercel bot commented on c776399 Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.