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

🐛 [open-formulieren/open-forms#4918] Pass initial_data_reference when redirecting to formstart #754

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal marked this pull request as draft December 16, 2024 14:37
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.78%. Comparing base (c28288f) to head (400f735).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #754      +/-   ##
==========================================
+ Coverage   79.71%   79.78%   +0.06%     
==========================================
  Files         239      239              
  Lines        4980     4982       +2     
  Branches     1351     1359       +8     
==========================================
+ Hits         3970     3975       +5     
+ Misses        980      977       -3     
  Partials       30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stevenbal stevenbal marked this pull request as ready for review December 16, 2024 15:33
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

Some polishing :)

src/components/Form.spec.jsx Outdated Show resolved Hide resolved
src/components/Form.spec.jsx Outdated Show resolved Hide resolved
src/components/Form.spec.jsx Outdated Show resolved Hide resolved
src/components/Form.spec.jsx Outdated Show resolved Hide resolved
Comment on lines 147 to 150
await waitFor(() => {
const loginLink = screen.getByRole('link', {name: buttonText});
expect(loginLink).toHaveAttribute('href', expectedUrl);
});
Copy link
Member

Choose a reason for hiding this comment

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

you can use the findBy* queries, which are async (and basically put the waitFor inside the library

Suggested change
await waitFor(() => {
const loginLink = screen.getByRole('link', {name: buttonText});
expect(loginLink).toHaveAttribute('href', expectedUrl);
});
const loginLink = await screen.findByRole('link', {name: buttonText});
expect(loginLink).toHaveAttribute('href', expectedUrl);

@stevenbal stevenbal force-pushed the issue/4918-initial-data-reference-not-passed branch from 1bb68b9 to 400f735 Compare December 17, 2024 08:15
@sergei-maertens sergei-maertens merged commit 57510fc into main Dec 17, 2024
15 checks passed
@sergei-maertens sergei-maertens deleted the issue/4918-initial-data-reference-not-passed branch December 17, 2024 08:44
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.

SDK (internal) redirects forget the initial_data_refence
2 participants