Skip to content
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

ignore URL fragment when asserting page loaded #1677

Merged
merged 1 commit into from
Feb 10, 2017
Merged

Conversation

brendankenny
Copy link
Member

came up in testing 1.5.0 for release. Runs fail testing e.g. https://example.com/#/whatever

Testing a URL with hash content will always fail the GatherRunner.assertPageLoaded() check so this uses URL.equalWithExcludedFragments instead of strict equality testing.

@@ -135,7 +136,9 @@ class GatherRunner {
* @param {!Array<WebInspector.NetworkRequest>} networkRecords
*/
static assertPageLoaded(url, driver, networkRecords) {
const mainRecord = networkRecords.find(record => record.url === url);
const mainRecord = networkRecords.find(record => {
Copy link
Contributor

@ebidel ebidel Feb 10, 2017

Choose a reason for hiding this comment

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

maybe add a comment here that the network record never sees the hash so we need to test the URL without it. Obvious?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants