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

fix: failed loading message #1603

Merged
merged 4 commits into from
Feb 2, 2017
Merged

fix: failed loading message #1603

merged 4 commits into from
Feb 2, 2017

Conversation

patrickhulce
Copy link
Collaborator

fixes #1602

log.error('GatherRunner', mainRecord.localizedFailDescription);
const error = new Error(`Unable to load the page: ${mainRecord.localizedFailDescription}`);
if (driver.online && (!mainRecord || mainRecord.failed)) {
const failDescription = mainRecord ?
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this can probably fit on one line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not quite, should I make the name shorter?

Copy link
Contributor

Choose a reason for hiding this comment

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

fitting would be nice, but not a big deal.

@ebidel
Copy link
Contributor

ebidel commented Feb 2, 2017

Ironically, tests are failing b/c of shop.

@patrickhulce
Copy link
Collaborator Author

Ironically, tests are failing b/c of shop.

But isn't the error message you get so much friendlier? 😄

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

is it time to roll this up into a function? GatherRunner.assertPageLoaded(driver, networkRecords) or whatever?

Other than that, LGTM

@patrickhulce
Copy link
Collaborator Author

will do 👍

@patrickhulce
Copy link
Collaborator Author

PTAL

@@ -125,6 +125,22 @@ class GatherRunner {
}

/**
* @param {string} url
* @param {{online: boolean}} driver
* @param {!Array<WebInspector.NetworkRequest} networkRecords
Copy link
Member

Choose a reason for hiding this comment

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

need a closing >

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -125,6 +125,22 @@ class GatherRunner {
}

/**
* @param {string} url
Copy link
Member

Choose a reason for hiding this comment

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

single line about what it's doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

GatherRunner.assertPageLoaded(url, {online: true}, records);
}, /Unable.*timeout/);
});
});
Copy link
Member

Choose a reason for hiding this comment

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

worth moving rejects when domain name can\'t be resolved and resolves when domain name can\'t be resolved but is offline tests into this describe block? They do test the whole pipeline, not just the function, but they're more or less just unit tests of the function...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've noticed we have some differing philosophies when it comes to describe blocks and test organization in general, haha, so I'm opposed but will defer to you if you want 'em moved :)

Copy link
Member

Choose a reason for hiding this comment

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

I have no coherent philosophy when it comes to organization of tests into sub-blocks so keeping as-is is good :)

@brendankenny
Copy link
Member

☁️↔️✂️↔️💻 ⚠️

@brendankenny brendankenny merged commit a7a4909 into master Feb 2, 2017
@brendankenny brendankenny deleted the main_record_fix branch February 2, 2017 22:38
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.

TypeError: Cannot read property 'failed' of undefined
3 participants