Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add storybook stories for public pages #365

Merged
merged 5 commits into from
Nov 15, 2024
Merged

Conversation

codeincontext
Copy link
Collaborator

@codeincontext codeincontext commented Nov 14, 2024

Adds storybook stories for each of our public pages

In the long run we might want more targeted stories for the atoms and molecules which make up pages, but for now this is a good way to get test coverage

For each page I've created an inner MyPageContent component without the <Layout> wrapper. We want to test the layout independently. This has caused large diffs due to the indentation change, but there actually isn't that much being changed

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oak-ai-lesson-assistant ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 2:39pm

@@ -48,90 +48,94 @@ const Prompts = ({ apps }: PromptsPageData) => {
}, [pathname, itemRefs]);

return (
<Layout>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The only change here is removing <Layout>

Copy link

github-actions bot commented Nov 14, 2024

Playwright test results

passed  15 passed
skipped  1 skipped

Details

report  Open report ↗︎
stats  16 tests across 15 suites
duration  2 minutes, 15 seconds
commit  95ba18a

Skipped tests

No persona › tests/auth.test.ts › authenticate through Clerk UI

@codeincontext codeincontext requested review from mikeritson-oak and a team November 14, 2024 13:18
@@ -1,7 +1,7 @@
export interface PolicyDocument {
title: string;
slug: string;
fake_updatedAt: string;
fake_updatedAt: string | null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The fixture data was failing the type

Copy link
Contributor

@JBR90 JBR90 left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Collaborator

@mikeritson-oak mikeritson-oak left a comment

Choose a reason for hiding this comment

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

This looks good. Checked in Chromatic and approved and, as this is a new process, also checked that all of the affected pages still render in the preview branch. 👍

@codeincontext codeincontext merged commit 33df453 into main Nov 15, 2024
20 checks passed
@codeincontext codeincontext deleted the test/public-stories branch November 15, 2024 11:35
@oak-machine-user
Copy link
Collaborator

🎉 This PR is included in version 1.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants