Skip to content

feat: convert adding development redirect tests to Playwright - #54897

Merged
ojeytonwilliams merged 3 commits into
freeCodeCamp:mainfrom
Sembauke:feat/convert-adding-development-redirect-test-to-playwright
May 30, 2024
Merged

ojeytonwilliams merged 3 commits into
freeCodeCamp:mainfrom
Sembauke:feat/convert-adding-development-redirect-test-to-playwright

Conversation

@Sembauke

@Sembauke Sembauke commented May 21, 2024 •

Copy link
Copy Markdown
Member

Checklist:

Closes #XXXXX

@github-actions github-actions Bot added the scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. label May 21, 2024
@Sembauke
Sembauke marked this pull request as ready for review May 21, 2024 08:34
@Sembauke
Sembauke requested a review from a team May 21, 2024 08:34
@Sembauke Sembauke mentioned this pull request May 21, 2024
61 tasks done

@ojeytonwilliams ojeytonwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's no need to check the response and try to find which url the browser is being redirected to. All we care about is which page the browser ends up at. i.e. expect(page).toHaveUrl(expected)

Given challenges.spec does this properly, I think it makes sense to consolidate the redirections into that file (maybe rename it redirects.spec.ts, too, since that's a better description).

@Sembauke
Sembauke requested a review from ojeytonwilliams May 21, 2024 11:22
@jdwilkin4 jdwilkin4 added the status: waiting update Is awaiting update, after feedback or request for changes label May 22, 2024
@Sembauke Sembauke added status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. and removed status: waiting update Is awaiting update, after feedback or request for changes labels May 23, 2024
@huyenltnguyen

Copy link
Copy Markdown
Member

These changes can be made in the next iteration, but I think:

  • We should add a forward slash to the expected paths (from learn/path to /learn/path)?
  • Instead of passing a regex to the .toHaveURL(), we could just pass the expected string

@ojeytonwilliams ojeytonwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just one missing:

Comment thread e2e/redirect.spec.ts Resolved
Co-authored-by: Oliver Eyton-Williams <[email protected]>

@ojeytonwilliams ojeytonwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@ojeytonwilliams
ojeytonwilliams merged commit d99cf16 into freeCodeCamp:main May 30, 2024
@Sembauke
Sembauke deleted the feat/convert-adding-development-redirect-test-to-playwright branch May 30, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants