Conversation
|
Review app deployed to https://cpd-ec2-review-2204-web.test.teacherservices.cloud |
83e7cc4 to
7ab5348
Compare
180a57d to
dda5c2f
Compare
7b80c51 to
6206ab2
Compare
6206ab2 to
275e3ad
Compare
… idempotent AB assignment
| @@ -0,0 +1,11 @@ | |||
| if Rails.env.staging? || Rails.env.development? || Rails.env.review? | |||
There was a problem hiding this comment.
Will update to if Rails.env.staging? before merging (otherwise can't test seeds)
There was a problem hiding this comment.
Out of curiosity, do you know why we want different seeds on staging compared to review etc?
|
avinhurry
left a comment
There was a problem hiding this comment.
Just a few comments/questions in line otherwise looks great.
| teacher = FactoryBot.create(:teacher) | ||
|
|
||
| ect_period = | ||
| FactoryBot.create( |
There was a problem hiding this comment.
If these are just create will re-running the seeds multiple times create duplicates, should we use find_or_create_by?
| abp.body_type = "teaching_school_hub" | ||
| end | ||
|
|
||
| clear_attr!(abp, :dfe_sign_in_organisation_id) |
There was a problem hiding this comment.
Is it intentional to clear the dfe_sign_in_organisation_id on Golden Leaf Teaching School Hub?
This record is used elsewhere in seeds. If it's only for reuse scenarios should we use one specifically for that instead?
| @@ -0,0 +1,11 @@ | |||
| if Rails.env.staging? || Rails.env.development? || Rails.env.review? | |||
There was a problem hiding this comment.
Out of curiosity, do you know why we want different seeds on staging compared to review etc?



Ticket here
Context
We are introducing deterministic ReuseChoices scenario seeds used in staging for Product to test the reuse vs non-reusable partnership scenarios (listed below)
We want the reuse seed to:
-remain separate to the core seeds but still able to run on staging for product to review
Changes proposed in this pull request
The seed still guarantees:
17 deterministic URN-based schools
historical ECT + training data
reusable vs non-reusable scenarios
correct provider/partnership setup in the target year
No behavioural changes are expected in the UI or tests beyond improved stability.
Guidance to review
Spot-check one reusable and one non-reusable case
Running the seed multiple times should not create duplicates
Specs should pass consistently in isolation
Scenarios the seeds need to cover
First ever ECT at a school registered in 2025 contract period with LP1 & DP1.
-> Next ECTs should always show reuse choices screen (as there will always be a valid previous choice for 2025)
School with no previous ECTs, mentors or partnerships
Last ECT in 2024 contract period registered with LP1 & DP1; and LP1& DP1 are still an available pairing in 2025.
-> Next ECTs registered in 2025 contract period should always show reuse choices screen (as there will always be a valid previous choice for 2025)
School with an ECT in 2024 contract period & confirmed partnership, where the 2024 LP/DP is also available in 2025
School with an ECT in 2024 contract period with EOI but no confirmed partnership, where the 2024 LP is available in 2025
School with an ECT in 2023 contract period & confirmed partnership, where the 2024 LP/DP is also available in 2025
School with an ECT in 2023 contract period with EOI but no confirmed partnership, where the 2024 LP is available in 2025
School with an ECT in 2022 contract period & confirmed partnership, where the 2024 LP/DP is also available in 2025
School with an ECT in 2022 contract period with EOI but no confirmed partnership, where the 2024 LP is available in 2025
School with an ECT in 2021 contract period & confirmed partnership, where the 2024 LP/DP is also available in 2025
School with an ECT in 2021 contract period with EOI but no confirmed partnership, where the 2024 LP is available in 2025
Last ECT in 2024 contract period registered with LP1 & DP1; and LP1& DP1 are not an available pairing in 2025.
-> Next ECT registered in 2025 contract period should not show reuse choices screen (as there is no valid previous choice for 2025).
-> But any next ECTs after that should always show reuse choices screen (as there will now be a valid previous choice for 2025).
School with an ECT in 2024 contract period & confirmed partnership, where the 2024 LP/DP is not available in 2025
School with an ECT in 2024 contract period with EOI but no confirmed partnership, where the 2024 LP is not available in 2025
School with an ECT in 2023 contract period & confirmed partnership, where the 2024 LP/DP is not available in 2025
School with an ECT in 2023 contract period with EOI but no confirmed partnership, where the 2024 LP is not available in 2025
School with an ECT in 2022 contract period & confirmed partnership, where the 2024 LP/DP is not available in 2025
School with an ECT in 2022 contract period with EOI but no confirmed partnership, where the 2024 LP is not available in 2025
School with an ECT in 2021 contract period & confirmed partnership, where the 2024 LP/DP is not available in 2025
School with an ECT in 2021 contract period with EOI but no confirmed partnership, where the 2024 LP is not available in 2025