Revert "Revert "Revert "Revert "NetSim: Teacher view dropdown bug""""#9830
Merged
islemaster merged 2 commits intoAug 4, 2016
Conversation
islemaster
added a commit
to islemaster/enzyme
that referenced
this pull request
Aug 4, 2016
Support for spaces in attribute selector values was added in 2.4.0 ([PR enzymejs#427](enzymejs#427)) but was not documented in the changelog. It took me a while to sort out why my selectors `option[value="by Alice"]` were working in 2.4.1 but not 2.3.0 ([see my gradual realization here](code-dot-org/code-dot-org#9830)). I'm recommending this get added to the changelog to save others some time.
Fix enzyme version to avoid future differences between development boxes and the staging machine. Use 2.4.1 in particular because it's currently the latest, and 2.4.0 introduces support for spaces in attribute selector values (which this test uses).
Contributor
|
Sounds like this was a fun investigation. LGTM |
|
LGTM as well |
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.
Reverts #9829 (Third attempt at merging #9809)
Okay. This change failed on staging twice in a row, but has passed CircleCI and local tests every time. Something must be different about the staging box. Starting an investigation...
Here's the failure from the build log (repeated several times - it retried, I think?)
Here's the source of that test, along with everything I think is relevant:
Checking for environmental differences between my machine and staging:
Suspect #1 is enzyme, which is important to this test and is off by a minor version. Installing enzyme 2.3.0 on my local machine and running
grunt unitTestreproduces the failure!Pinning enzyme to 2.4.1 will fix the problem, but I'd like to understand what changed and why my test is failing. The enzyme 2.4.0 changelog contains some fixes to attribute selectors; sure enough, rewriting my assertions to avoid attribute selectors gets them passing under 2.3.0:
What bothers me is that I can't figure out which change actually fixed this selector. enzymejs/enzyme#412 and enzymejs/enzyme#387 look most relevant but it's not clear that either should have directly affected the selectorUpdate: Found it! This PR fixes a bug with spaces in selectors, and was not listed in the changelog for some reason. I'll contact enzyme and suggest this get mentioned.option[value="by Alice"]which freaks me out a bit.In any case, I'd prefer not to switch to this; CSS-style attribute selectors are supposedly supported by Enzyme and they do work under 2.4.1. Instead we're going to pin to enzyme 2.4.1 which supports selectors with spaces, to avoid differences between dev and staging in the future.