-
Notifications
You must be signed in to change notification settings - Fork 436
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
[Flaky Tests]: Link Form Submission #633
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seanpdoyle
force-pushed
the
ensure-drive-enabled-in-tests
branch
from
July 18, 2022 01:47
a4a405f
to
770aa23
Compare
The test passes consistently locally, but fails consistently in CI: ``` 1) [chrome] › form_submission_tests.ts:909:1 › test following a link with [data-turbo-method] and [data-turbo=true] set when html[data-turbo=false] AssertionError: does not navigate the full page: expected 'Hello' to equal 'Form' 918 | await link.click() 919 | > 920 | assert.equal(await page.textContent("h1"), "Form", "does not navigate the full page") | ^ 921 | assert.equal(await page.textContent("#hello h2"), "Hello from a frame", "drives the turbo-frame") 922 | }) 923 | at /home/runner/work/turbo/turbo/src/tests/functional/form_submission_tests.ts:920:10 2) [chrome] › form_submission_tests.ts:924:1 › test following a link with [data-turbo-method] and [data-turbo=true] set when Turbo.session.drive = false AssertionError: does not navigate the full page: expected 'Hello' to equal 'Form' 932 | await link.click() 933 | > 934 | assert.equal(await page.textContent("h1"), "Form", "does not navigate the full page") | ^ 935 | assert.equal(await page.textContent("#hello h2"), "Hello from a frame", "drives the turbo-frame") 936 | }) 937 | at /home/runner/work/turbo/turbo/src/tests/functional/form_submission_tests.ts:934:10 ```
seanpdoyle
force-pushed
the
ensure-drive-enabled-in-tests
branch
from
July 18, 2022 01:48
770aa23
to
5aae196
Compare
seanpdoyle
added a commit
to seanpdoyle/turbo
that referenced
this pull request
Jul 18, 2022
Follow-up to hotwired#633 The flaky test outlined in [hotwired#633][] was "flaky", but not in the sense that was originally suspected. Somehow, it was presenting as a false negative, failing when we thought it should consistently pass. On further inspection, it was _passing when it should consistently fail_. This commit addresses the underlying issue by copying any `[data-turbo-frame]` attributes onto the `<form>` element from the `<a>` element that is clicked outside of the targeted `<turbo-frame>`. [hotwired#633]: hotwired#633
seanpdoyle
added a commit
to seanpdoyle/turbo
that referenced
this pull request
Jul 18, 2022
Follow-up to hotwired#633 The flaky test outlined in [hotwired#633][] was "flaky", but not in the sense that was originally suspected. Somehow, it was presenting as a false negative, failing when we thought it should consistently pass. On further inspection, it was _passing when it should consistently fail_. This commit addresses the underlying issue by copying any `[data-turbo-frame]` attributes onto the `<form>` element from the `<a>` element that is clicked outside of the targeted `<turbo-frame>`. [hotwired#633]: hotwired#633
dhh
pushed a commit
that referenced
this pull request
Jul 18, 2022
* Add tests for pausable Frame Rendering Follow-up to #431 Support for the `turbo:before-frame-render` event relies on the same underlying infrastructure as the `turbo:before-render` event (i.e. the `Renderer` abstract class). As a result of re-using that abstraction, listeners for the `turbo:before-frame-render` event can also leverage the `detail.resume` function in the same way to handle asynchronous rendering. The changes made in [#431][] excluded test coverage for that behavior. This commit adds that coverage to guard against regressions in that behvaior. [#431]: #431 * Form Links: Copy `[data-turbo-frame]` from `<a>` to `<form>` Follow-up to #633 The flaky test outlined in [#633][] was "flaky", but not in the sense that was originally suspected. Somehow, it was presenting as a false negative, failing when we thought it should consistently pass. On further inspection, it was _passing when it should consistently fail_. This commit addresses the underlying issue by copying any `[data-turbo-frame]` attributes onto the `<form>` element from the `<a>` element that is clicked outside of the targeted `<turbo-frame>`. [#633]: #633
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The test passes consistently locally, but fails consistently in CI: