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

Added a clear message about failed CORS validation requests (close #2482) #2613

Merged
merged 6 commits into from
Jul 11, 2018

Conversation

miherlosev
Copy link
Collaborator

@AndreyBelym

The text of the warning was checked by technical writers.

@miherlosev miherlosev changed the title Add clear message about failed CORS validation requests (close #2482) Added a clear message about failed CORS validation requests (close #2482) Jul 11, 2018
@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit b9b545d have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit d7760fa have failed. See details:

return runTests('./testcafe-fixtures/request-mock/failed-cors-validation.js', 'Failed CORS validation', { only: 'chrome' })
.then(() => {
expect(testReport.warnings).eql([
'RequestMock: CORS validation failed for a request specified as { url: "http://dummy-url.com/get" }'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we report the fixture name and the test name where the warning emitted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For all warning messages we don't report fixture and test name where the warning was emitted.

We can plan this as an enhancement.
Also the warning message contains stringified request filter rule that cause the warning.

@AndreyBelym
Copy link
Contributor

AndreyBelym commented Jul 11, 2018

Could you please explain why have you decided to not throw an error and emit a warning instead?

@miherlosev
Copy link
Collaborator Author

miherlosev commented Jul 11, 2018

Could you please explain why you decided to not throw an error and emit a warning instead?

This case should not stop a test execution. So, it is not an error.

@miherlosev
Copy link
Collaborator Author

@testcafe-build-bot retest

@testcafe-build-bot
Copy link
Collaborator

✅ Tests for the commit d7760fa have passed. See details:

@miherlosev
Copy link
Collaborator Author

FPR

@miherlosev miherlosev merged commit 3cd7b7d into DevExpress:master Jul 11, 2018
@miherlosev miherlosev deleted the i2482 branch July 11, 2018 15:13
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this pull request Dec 18, 2019
…vExpress#2482) (DevExpress#2613)

* add clear message about failed CORS validation requests (close DevExpress#2482)

* tmp

* formatting

* rename

* add condition

* fix lint
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