4239 Do one thing at a time in feature spec for product cloning #4522
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.
What? Why?
In the spec, we clone a product, and then update the original product's name to test that the form is still usable after cloning. We don't wait for the table to be re-rendered before attempting to edit the name of the product.
The failure seems to be because the Angular binding is not finished yet when "Save Changes" is clicked.
This PR makes the spec wait for the table to be re-rendered before proceeding to set the product name. This makes the spec pass in 30 runs on my computer. Before the PR, it failed 3 out of 30 runs but with a different failure. (See below.) It's possible that the issue before was that binding is interrupted when the table is re-rendered.
What should we test?
This only affects specs. The build should pass, but no manual tests needed.
Release notes
Make automated feature test for product cloning more reliable.
Changelog Category: Fixed