Skip to content

Commit

Permalink
remove changes to mailing list
Browse files Browse the repository at this point in the history
  • Loading branch information
emmaachesongray committed Jan 24, 2025
1 parent a9c3f07 commit fba785b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion app/models/mailing_list/wizard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class Wizard < ::GITWizard::Base
Steps::AlreadySubscribed,
Steps::ReturningTeacher,
Steps::AlreadyQualified,
Steps::Subject,
Steps::DegreeStatus,
Steps::TeacherTraining,
Steps::Subject,
Steps::Postcode,
].freeze

Expand Down
57 changes: 28 additions & 29 deletions spec/features/mailing_list_wizard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
choose "No"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "Do you have a degree?"
choose "Not yet, I'm a first year student"
click_on "Next step"
Expand All @@ -36,6 +32,10 @@
choose "I'm not sure and finding out more"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "We'll only use this to send you information about events happening near you"
fill_in "What's your UK postcode? (optional)", with: "TE57 1NG"
click_on "Complete sign up"
Expand Down Expand Up @@ -65,10 +65,6 @@
choose "No"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "Do you have a degree?"
choose "Not yet, I'm a first year student"
click_on "Next step"
Expand All @@ -77,6 +73,10 @@
choose "I'm not sure and finding out more"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "We'll only use this to send you information about events happening near you"
fill_in "What's your UK postcode? (optional)", with: "TE57 1NG"
click_on "Complete sign up"
Expand Down Expand Up @@ -104,10 +104,6 @@
choose "No"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "Do you have a degree?"
choose "Almost, I'm a final year student"
click_on "Next step"
Expand All @@ -116,6 +112,10 @@
choose "I'm not sure and finding out more"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "We'll only use this to send you information about events happening near you"
fill_in "What's your UK postcode? (optional)", with: "TE57 1NG"
click_on "Complete sign up"
Expand Down Expand Up @@ -143,10 +143,6 @@
choose "No"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "Do you have a degree?"
choose "Not yet, I'm a first year student"
click_on "Next step"
Expand All @@ -155,6 +151,10 @@
choose "I'm not sure and finding out more"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "We'll only use this to send you information about events happening near you"
fill_in "What's your UK postcode? (optional)", with: "TE57 1NG"
click_on "Complete sign up"
Expand Down Expand Up @@ -191,13 +191,6 @@
choose "No"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
expect(page).to have_select(
"Select the subject you're most interested in teaching",
selected: Crm::TeachingSubject.lookup_by_uuid(response.preferred_teaching_subject_id),
)
click_on "Next step"

expect(page).to have_text "Do you have a degree?"
expect(find("[name=\"mailing_list_steps_degree_status[degree_status_id]\"][checked]").value).to eq(
response.degree_status_id.to_s,
Expand All @@ -208,6 +201,13 @@
expect(find("[name=\"mailing_list_steps_teacher_training[consideration_journey_stage_id]\"][checked]").value).to eq(
response.consideration_journey_stage_id.to_s,
)
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
expect(page).to have_select(
"Select the subject you're most interested in teaching",
selected: Crm::TeachingSubject.lookup_by_uuid(response.preferred_teaching_subject_id),
)
click_on "Complete sign up"

expect(page).to have_text "Joey, you're signed up"
Expand Down Expand Up @@ -327,17 +327,12 @@
choose "No"
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"
expect(page).to have_text "Tell us more about you so that you only get emails relevant to your circumstances."

expect(page).to have_text "Do you have a degree?"
expect(find("[name=\"mailing_list_steps_degree_status[degree_status_id]\"][checked]").value).to eq(
response.degree_status_id.to_s,
)

expect(page).to have_text "Tell us more about you so that you only get emails relevant to your circumstances."

click_on "Next step"

expect(page).to have_text "How close are you to applying"
Expand All @@ -346,6 +341,10 @@
)
click_on "Next step"

expect(page).to have_text "Select the subject you're most interested in teaching"
select "Maths"
click_on "Next step"

expect(page).to have_text "We'll only use this to send you information about events happening near you"
fill_in "What's your UK postcode? (optional)", with: ""
click_on "Complete sign up"
Expand Down
2 changes: 1 addition & 1 deletion spec/models/mailing_list/wizard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
MailingList::Steps::AlreadySubscribed,
MailingList::Steps::ReturningTeacher,
MailingList::Steps::AlreadyQualified,
MailingList::Steps::Subject,
MailingList::Steps::DegreeStatus,
MailingList::Steps::TeacherTraining,
MailingList::Steps::Subject,
MailingList::Steps::Postcode,
]
end
Expand Down

0 comments on commit fba785b

Please sign in to comment.