Closed
Conversation
Merging [9c74f77][] introduced a TypeScript build error, which is failing our CI build. This commit replaces the old `formSubmitted` helper with the newer `formSubmitEnded`. [9c74f77]: hotwired@9c74f77#diff-225e8f674fa1e4fd108c22a917fd5673e51909d4a5d8958e4874ae9e402dca2f Attempt to resolve flaky tests --- Tests involving successive `this.goBack()` and `this.goForward()` calls are flaky due to timing issues: ``` × firefox on linux 5.11.0-1020-azure - FrameTests - navigating back then forward after pushing URL state from a turbo-frame[data-turbo-action=advance] restores the frames next contents (0.629s) 367 StaleElementReference: [GET http://localhost:4444/wd/hub/session/01c3334a-e303-4d29-b392-1e4f1d4d7f5c/element/a97830bd-56a4-4b7a-86a0-9543cf697716/text] The element reference of <h2> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed 368 For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html 369 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' 370 System info: host: 'fv-az214-396', ip: '10.1.0.47', os.name: 'Linux', os.arch: 'amd64', os.version: '5.11.0-1020-azure', java.version: '11.0.11' ``` In order to resolve that, this commit is more explicit with timing: navigating forward and back will wait on `turbo:load` events to fire, which won't occur until the page renders the cached version _and_ re-fetches the contents. Hopefully, this addresses the stale element failures, since the referenced element won't be replaced while being read from. This commit introduces the `this.getVisibleTextForSelector()` helper to combine the access-and-read action to a single Promise chain, instead of sequential access and read commands.
Contributor
Author
|
@dhh this passes CI and resolves a test suite regression that has been failing commits on |
Member
|
Solved via #444 |
This file contains hidden or 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
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.
Merging 9c74f77 introduced a TypeScript build error, which is
failing our CI build. This commit replaces the old
formSubmittedhelper with the newer
formSubmitEnded.Attempt to resolve flaky tests
Tests involving successive
this.goBack()andthis.goForward()callsare flaky due to timing issues:
In order to resolve that, this commit is more explicit with timing:
navigating forward and back will wait on
turbo:loadevents to fire,which won't occur until the page renders the cached version and
re-fetches the contents. Hopefully, this addresses the stale element
failures, since the referenced element won't be replaced while being
read from.
This commit introduces the
this.getVisibleTextForSelector()helper tocombine the access-and-read action to a single Promise chain, instead of
sequential access and read commands.