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: respect preload set to false #1298

Merged
merged 4 commits into from
Jan 7, 2019
Merged

fix: respect preload set to false #1298

merged 4 commits into from
Jan 7, 2019

Conversation

jeeyyy
Copy link
Contributor

@jeeyyy jeeyyy commented Jan 3, 2019

This PR does the below:

  • Noticed a bug with shouldPreload, when preload: false is passed in via options, shouldPreload returned true (handled by checking for undefined/ null).

  • Say, in cases where runOnly is configured to any cssom related rule like css-orientation-lock, but preload is set to false, no proper incomplete message was provided.

Eg:

axe.run({ preload: false, runOnly: {type: 'rule', values: ['css-orientation-lock'] }})

The above snippet will return no assets such as cssom, as preload: false overrides the need to load assets. In this case, there was no helpful incomplete message.

Closes issue: NA.

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Has documentation updated, a DU ticket, or requires no documentation change
  • Includes new tests, or was unnecessary
  • Code is reviewed for security by: @WilcoFiers

@jeeyyy jeeyyy requested a review from a team as a code owner January 3, 2019 10:15
Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

This is missing tests.

@jeeyyy
Copy link
Contributor Author

jeeyyy commented Jan 3, 2019

Added more test cases for preload, as for the css-orientation-lock there is already a test case for the incomplete scenario - https://github.com/dequelabs/axe-core/blob/develop/test/integration/full/css-orientation-lock/incomplete.js#L12

@jeeyyy jeeyyy requested a review from WilcoFiers January 3, 2019 14:41
@jeeyyy jeeyyy merged commit e847d38 into develop Jan 7, 2019
@jeeyyy jeeyyy deleted the fix-preloading-assets branch January 7, 2019 17:14
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.

2 participants