Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Add end-to-end test runner to frontend #228

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Conversation

coderbyheart
Copy link
Member

@coderbyheart coderbyheart commented Jul 4, 2021

This implements end-to-end-tests using Playwright.
See https://playwright.dev/

This ensures that our frontend runs and that dependency update PRs can safely be merged.

@ghost
Copy link

ghost commented Jan 6, 2022

CodeSee Review Map:

Review these changes using an interactive CodeSee Map

Review in an interactive map

View more CodeSee Maps

Legend

CodeSee Map Legend

Comment on lines +7 to +15
export const frontend = (app: Express) => {
const root = path.join(process.cwd(), 'frontend', 'build')
console.debug(`ℹ️ Frontend web application hosted from`, root)
app.use(staticWebsite(root))
// All other requests are handled by the index.html
const spaIndex = path.join(root, 'index.html')
app.get('*', (_, res) => {
res.sendFile(spaIndex)
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome, thank you!

Copy link
Collaborator

@deammer deammer left a comment

Choose a reason for hiding this comment

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

Fantastic work! I've been meaning to try out Playwright so this was very enlightening to review.

@coderbyheart
Copy link
Member Author

The cool part is that it also creates screenshots, so one can also visually inspect the website.

@coderbyheart coderbyheart marked this pull request as ready for review January 6, 2022 23:27
This implements end-to-end-tests using Playwright.
See https://playwright.dev/

This ensures that our frontend runs and that
dependency update PRs can safely be merged.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants