-
Notifications
You must be signed in to change notification settings - Fork 5
EES-6818 Add redirects for removed release pages #6644
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
Open
Guy-HiveIT
wants to merge
4
commits into
dev
Choose a base branch
from
EES-6818-add-new-release-page-redirects
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
581f3dc
EES-6818 Add redirects for removed release pages
Guy-HiveIT 4a13954
EES-6818 remove redundant checks
Guy-HiveIT 350be8d
EES-6818 Run redirect robot tests on all envs
Guy-HiveIT c4f5289
EES-6818 Don't run www redirects robot test on Test or PreProd envs
Guy-HiveIT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
31 changes: 31 additions & 0 deletions
31
tests/robot-tests/tests/general_public/redirects_release.robot
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| *** Settings *** | ||
| Resource ../libs/public-common.robot | ||
| Resource ../seed_data/seed_data_theme_1_constants.robot | ||
|
|
||
| Suite Setup user opens the browser | ||
| Suite Teardown user closes the browser | ||
| Test Setup fail test fast if required | ||
|
|
||
| Force Tags GeneralPublic Local Dev Test Preprod | ||
|
|
||
|
|
||
| *** Test Cases *** | ||
| Verify that deprecated publication data guidance and prerelease access pages redirect to release page | ||
| environment variable should be set PUBLIC_URL | ||
| user navigates to %{PUBLIC_URL}/find-statistics/${PUPIL_ABSENCE_PUBLICATION_SLUG}/data-guidance | ||
| user waits until page contains ${PUPIL_ABSENCE_PUBLICATION_TITLE} | ||
| user checks url equals %{PUBLIC_URL}${PUPIL_ABSENCE_PUBLICATION_RELATIVE_URL} | ||
| user navigates to %{PUBLIC_URL}/find-statistics/${PUPIL_ABSENCE_PUBLICATION_SLUG}/prerelease-access-list | ||
| user waits until page contains ${PUPIL_ABSENCE_PUBLICATION_TITLE} | ||
| user checks url equals %{PUBLIC_URL}${PUPIL_ABSENCE_PUBLICATION_RELATIVE_URL} | ||
|
|
||
| Verify that deprecated release data guidance page redirects to explore page | ||
| user navigates to %{PUBLIC_URL}${PUPIL_ABSENCE_PUBLICATION_RELATIVE_URL}/data-guidance | ||
| user waits until page contains ${PUPIL_ABSENCE_PUBLICATION_TITLE} | ||
| user checks url equals %{PUBLIC_URL}${PUPIL_ABSENCE_PUBLICATION_RELATIVE_URL}/explore#data-guidance-section | ||
|
|
||
| Verify that deprecated release prerelease access page redirects to help page | ||
| user navigates to %{PUBLIC_URL}${PUPIL_ABSENCE_PUBLICATION_RELATIVE_URL}/prerelease-access-list | ||
| user waits until page contains ${PUPIL_ABSENCE_PUBLICATION_TITLE} | ||
| user checks url equals | ||
| ... %{PUBLIC_URL}${PUPIL_ABSENCE_PUBLICATION_RELATIVE_URL}/help#pre-release-access-list-section |
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
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.
Hey @Guy-HiveIT this approach looks good to me! You may or may not be aware that we also have a
getRedirectUrlfunction inserver.js, so I don't know if at some point in the future if the 2 methods should be more consolidated into a single approach where it makes sense to do so?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.
I wasn't aware of that! I don't know which ones will run first when a request comes in, but it probably does make sense to consolidate in one place. I think the server.js getRedirectUrl will have more flexibility but also looks less clear (and less standard, compared to the next recommended approach linked in the PR description).
I can try and move them to server.js now if you think that's best?
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.
I reckon it can be done outside of this PR, but thought I'd just make you aware :)