-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plugin Browse: Update e2e test to check URL with selected site #79803
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
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.
Approved, but with a non-blocking nit/question.
@@ -103,6 +103,7 @@ describe( DataHelper.createSuiteTitle( 'Plugins: Browse' ), function () { | |||
'Search Engine Optimization', | |||
envVariables.VIEWPORT_NAME !== 'mobile' ? true : false | |||
); | |||
await page.waitForURL( new RegExp( `/plugins/browse/seo/${ siteUrl }$`, 'g' ) ); |
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.
nit:non-blocking - a small question, is the intention to make sure the site slug comes at the end?
In any case, the 'g' flag doesn't seem necessary from my experience. Have you run into faulty results without it?
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.
is the intention to make sure the site slug comes at the end?
The intention was to make a more specific regex as the bug it was trying to solve was that it being redirected to /plugins/browse/seo
. So in the past, if we had used /plugins/browse/seo
as regex the test would still be passing because we didn't specify the URL must end with it.
In this case, as we are specifying siteURL
, we don't have any case currently where it might fail, so let me know if you prefer to remove it.
the 'g' flag doesn't seem necessary from my experience
That's right, I removed it 9266509
Fixes #66637
Related to #66636
Proposed Changes
Add URL check at the end of the Category selection e2e test.
This guarantees the site URL will always be present on this action.
Testing Instructions
Check if all checks are passing. Including e2e tests.
Pre-merge Checklist