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

Revert "Revert "Age Filter - Signed In"" #25724

Merged
merged 6 commits into from Nov 2, 2018

Conversation

epeach
Copy link

@epeach epeach commented Oct 31, 2018

Reverts #25718

Reverted to isolate test failures. DTT passed with retries after these edits were reverted. Not sure what about these changes might cause errors (tests would pass the first scenario, then stop testing and show up as failed).

@epeach
Copy link
Author

epeach commented Oct 31, 2018

@islemaster Any ideas what might have caused the test failures?

@epeach epeach mentioned this pull request Oct 31, 2018
@islemaster
Copy link
Contributor

Here's the most recent failure I see for this test.

image

I noticed this is different from other failures on this test, but sometimes cucumber is inconsistent with output so it might be fortunate to get this error output. Another test failure with truncated output ends right at this step, so there's a chance they're the same failure mode:

image

So for now let's assume the step we need to fix is

And I see 1 options in the dropdown "#song_selector"

Anyway, I pulled up the screencast, and when this test fails you can't actually see the dropdown options, but you can see what the first item is; my first thought was this looks like the same default song I've seen on staging/test/levelbuilder, so I wonder if a recent content change is interfering with your test - I think we always have more than one song in the song selector now.

image

Just to confirm, I found the exact step in SauceLabs that's checking the number of elements in the dropdown, and sure enough the selector is finding lots of elements:

image

So I wonder if we need to change the approach in this test. Maybe we could check the dropdown for the presence/absence of a particular known "pg13" song, rather than the count of songs since that might continue to change.

One gotcha here is that this failure probably won't repro on local/circle because we're using a different song manifest in that situation. It might be worth thinking about ways for the test to depends on something available in both environments. The other thing I haven't figured out is why this is flaky; I'd expect it to fail all the time if there are just more songs in the manifest now.

Later tests are failing on:

And I wait until I don't see selector "#p5_loading"

...which also doesn't seem like something that would be caused by this PR, but who knows? I'd go with the policy of fixing the first error first and seeing if anything downstream gets cleaned up.

@epeach
Copy link
Author

epeach commented Nov 1, 2018

Thanks for the advice! I also discovered another issue with this test, but forgot to update my request last night.

@epeach
Copy link
Author

epeach commented Nov 2, 2018

@islemaster PTAL - thanks!

@islemaster
Copy link
Contributor

Have to run but can take a look in an hour or so.

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

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

Lookin' good!

@@ -45,7 +48,7 @@

#gdpr-dialog

%script{src: minifiable_asset_path('js/code-studio.js'), data: {gdpr: gdpr_data.to_json}}
%script{src: minifiable_asset_path('js/code-studio.js'), data: {gdpr: gdpr_data.to_json, user: user_type.to_json}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why user rather than user_type as the key here?

};

state = {
songsData: []
songsData: [],
filterOff: this.props.userType !== 'student_y'
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic turns the filter off when userType is unknown. It seems like we should write this to err on the 'safe' side so we only turn the filter off if the userType is one of a known set of 'older user' types.

};

state = {
songsData: []
songsData: [],
filterOff: this.props.userType !== 'student_y'
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: You only set filterOff when constructing the component, so it could be a prop rather than React state (you'd move this expression into your connect() method).

@epeach epeach merged commit 294dce0 into staging Nov 2, 2018
@epeach epeach deleted the revert-25718-revert-25695-age-filter-signed-in branch November 13, 2018 20:57
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.

None yet

2 participants