-
Notifications
You must be signed in to change notification settings - Fork 479
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
Adds Experiment flag to School Association, UI tests #57873
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9c57a37
added experiment flag, started feature file
hannahbergam 1de3ce3
yayyyyy the test works
hannahbergam 42d12b6
removing comment
hannahbergam 6b01f3d
updating school selection
hannahbergam 60fcaa3
pr feedback
hannahbergam 6fc45d5
Merge remote-tracking branch 'origin/staging' into hbergam/school-ass…
hannahbergam e522598
updating feature file to fix saucelabs failure
hannahbergam File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ import $ from 'jquery'; | |
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import SchoolInfoInputs from '@cdo/apps/templates/SchoolInfoInputs'; | ||
import SchoolDataInputs from '@cdo/apps/templates/SchoolDataInputs'; | ||
import getScriptData from '@cdo/apps/util/getScriptData'; | ||
import firehoseClient from '@cdo/apps/lib/util/firehose'; | ||
import experiments from '@cdo/apps/util/experiments'; | ||
|
@@ -236,28 +237,37 @@ $(document).ready(() => { | |
|
||
function renderSchoolInfo() { | ||
if (schoolInfoMountPoint) { | ||
ReactDOM.render( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not edited: just moved |
||
<div style={{padding: 10}}> | ||
<SchoolInfoInputs | ||
schoolType={schoolData.schoolType} | ||
country={schoolData.country} | ||
ncesSchoolId={schoolData.ncesSchoolId} | ||
schoolName={schoolData.schoolName} | ||
schoolCity={schoolData.schoolCity} | ||
schoolState={schoolData.schoolState} | ||
schoolZip={schoolData.schoolZip} | ||
schoolLocation={schoolData.schoolLocation} | ||
useLocationSearch={schoolData.useLocationSearch} | ||
onCountryChange={onCountryChange} | ||
onSchoolTypeChange={onSchoolTypeChange} | ||
onSchoolChange={onSchoolChange} | ||
onSchoolNotFoundChange={onSchoolNotFoundChange} | ||
showRequiredIndicator={false} | ||
styles={{width: 580}} | ||
/> | ||
</div>, | ||
schoolInfoMountPoint | ||
); | ||
if (experiments.isEnabled(experiments.SCHOOL_ASSOCIATION_V2)) { | ||
hannahbergam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ReactDOM.render( | ||
<div style={{padding: 10}}> | ||
<SchoolDataInputs /> | ||
</div>, | ||
schoolInfoMountPoint | ||
); | ||
} else { | ||
ReactDOM.render( | ||
<div style={{padding: 10}}> | ||
<SchoolInfoInputs | ||
schoolType={schoolData.schoolType} | ||
country={schoolData.country} | ||
ncesSchoolId={schoolData.ncesSchoolId} | ||
schoolName={schoolData.schoolName} | ||
schoolCity={schoolData.schoolCity} | ||
schoolState={schoolData.schoolState} | ||
schoolZip={schoolData.schoolZip} | ||
schoolLocation={schoolData.schoolLocation} | ||
useLocationSearch={schoolData.useLocationSearch} | ||
onCountryChange={onCountryChange} | ||
onSchoolTypeChange={onSchoolTypeChange} | ||
onSchoolChange={onSchoolChange} | ||
onSchoolNotFoundChange={onSchoolNotFoundChange} | ||
showRequiredIndicator={false} | ||
styles={{width: 580}} | ||
/> | ||
</div>, | ||
schoolInfoMountPoint | ||
); | ||
} | ||
} | ||
} | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,6 @@ export default function SchoolZipSearch({fieldNames, zip}) { | |
sendAnalyticsEvent(EVENTS.DO_NOT_TEACH_AT_SCHOOL_CLICKED, {}); | ||
} else if (schoolId === SELECT_A_SCHOOL) { | ||
ncesId = ''; | ||
// sendAnalyticsEvent(EVENTS.SCHOOL_LIST_OPENED, {}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment above: we decided to move forward without this event |
||
} else if (schoolId === CLICK_TO_ADD) { | ||
ncesId = ''; | ||
setInputManually(true); | ||
|
@@ -89,6 +88,7 @@ export default function SchoolZipSearch({fieldNames, zip}) { | |
{i18n.selectYourSchool()} | ||
</BodyTwoText> | ||
<SimpleDropdown | ||
id="uitest-school-dropdown" | ||
className={style.dropdown} | ||
name={fieldNames.ncesSchoolId} | ||
items={SEARCH_DEFAULTS.concat(sortSchoolsByName(dropdownSchools))} | ||
|
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
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
22 changes: 22 additions & 0 deletions
22
dashboard/test/ui/features/acquisition_products/sign_up.feature
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@eyes | ||
Feature: Teacher can create a new account | ||
|
||
Scenario: Teacher can create an account with the new school association flow | ||
|
||
Given I am on "http://studio.code.org/users/sign_up" | ||
And I press keys "my@validemail.com" for element "#user_email" | ||
And I press keys "password" for element "#user_password" | ||
And I press keys "password" for element "#user_password_confirmation" | ||
And I press "#signup_form_submit" using jQuery | ||
# Add the experiment flag | ||
And I am on "http://studio.code.org/users/sign_up?enableExperiments=school_association_v2" | ||
hannahbergam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
And I press "select-user-type-teacher" | ||
And I press keys "myDisplayName" for element "#user_name" | ||
And I select the "United States" option in dropdown "uitest-country-dropdown" | ||
And I press keys "98112" for element "#uitest-school-zip" | ||
And I select the "Holy Names Academy" option in dropdown "uitest-school-dropdown" | ||
hannahbergam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
And I open my eyes to test "School Association" | ||
And I see no difference for "School Association: all fields" | ||
When I press "user_email_preference_opt_in_no" | ||
And I press "#signup_finish_submit" using jQuery | ||
And I wait until I see selector "#uitest-accept-section-creation" |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a followup from a conversation here: https://docs.google.com/document/d/1Ulaxj3K6AMNOOjw_244LNOV5ypuHJMjGpUItXpZuC4I/edit?disco=AAABJx8KQyg