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

chore: enable serverActions in test and e2e studios #6311

Closed
wants to merge 6 commits into from
Closed

Conversation

cngonzalez
Copy link
Member

@cngonzalez cngonzalez commented Apr 10, 2024

Description

Server actions were disabled because of:

  1. a caching issue affecting Portable Text
  2. an indexing issue causing documents published with actions to not be visible on the query endpoint.

Since both are now resolved, I'd like to re-enable server actions in our test studio for further winetasting.

What to review

Are tests passing? Is there anything that we're missing?

Copy link

vercel bot commented Apr 10, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Apr 18, 2024 3:57pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 3:57pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Apr 18, 2024 3:57pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Apr 10, 2024

Component Testing Report Updated Apr 18, 2024 4:04 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 25s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 1s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 3s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 21s 9 0 0

@cngonzalez cngonzalez changed the title chore: update e2e tests to use serverActions chore: enable serverActions in test and e2e studios Apr 18, 2024
@@ -27,8 +27,8 @@ test.describe('inputs: text', () => {
await page.waitForSelector('data-testid=field-simple', {timeout: 30000})
const field = page.getByTestId('field-simple').getByRole('textbox')

// Enter initial text and wait for the mutate call to be sent
Copy link
Contributor

Choose a reason for hiding this comment

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

does this mean we are only testing the actions API and not the mutate API? Shouldn't we test both for a while at least?

Copy link
Member Author

Choose a reason for hiding this comment

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

This particular line seems to be geared just to help this test await the right conditions (rather than testing the endpoint itself).

I agree with your concerns about testing both for a while -- I don't want the team to merge in code that works with server actions but not mutate (which is still the default) and for us to miss an issue.

Maybe what makes the most sense is having our CI stick with the mutate actions, and those of us who are working with server actions can test the e2e tests when we make changes?

Copy link
Member Author

Choose a reason for hiding this comment

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

With that in mind, suggest we close this in favor of #6425 -- I think we've at least proven that e2e tests work as they are with server actions enabled! 🎉

@cngonzalez cngonzalez closed this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants