-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new warning gradient and begin setting up a tests for new beha…
…vior
- Loading branch information
BrianSipple
authored and
BrianSipple
committed
Jun 21, 2016
1 parent
45d0e55
commit e1e1bcb
Showing
20 changed files
with
211 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
<style> | ||
.axe-violation { | ||
border: 2px solid red !important; | ||
background-image: repeating-linear-gradient( | ||
45deg, | ||
transparent, | ||
transparent 0.4em, | ||
hsla(69, 84%, 83%, 1.00) 0.4em, | ||
hsla(69, 84%, 83%, 1.00) 0.8em, | ||
hsla(166, 44%, 65%, 1.00) 0.8em, | ||
hsla(166, 44%, 65%, 1.00) 1.2em, | ||
hsla(214, 96%, 45%, 1.00) 1.2em, | ||
hsla(214, 96%, 45%, 1.00) 1.6em | ||
) !important; | ||
} | ||
|
||
.axe-violation:hover { | ||
background-image: none !important; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
"wait", | ||
"DS", | ||
"andThen", | ||
"axe", | ||
"currentURL", | ||
"currentPath", | ||
"currentRouteName" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import Ember from 'ember'; | ||
import { test } from 'qunit'; | ||
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; | ||
import sinon from 'sinon'; | ||
|
||
let actual, expected, sandbox; | ||
|
||
const IDs = { | ||
emptyButton: '#empty-button', | ||
sloppyInput: '#sloppy-input' | ||
}; | ||
|
||
const findBy = (items, key, val) => items.find(item => item[key] === val); | ||
|
||
moduleForAcceptance('Acceptance | violations', { | ||
beforeEach() { | ||
sandbox = sinon.sandbox.create(); | ||
}, | ||
|
||
afterEach() { | ||
sandbox.restore(); | ||
} | ||
}); | ||
|
||
test('marking DOM nodes with violations', function(assert) { | ||
|
||
sandbox.stub(axe.ember, 'a11yCheckCallback', function (results) { | ||
console.log('Results****', results.violations.find); | ||
assert.equal(results.violations.length, 2); | ||
|
||
const buttonNameViolation = findBy(results.violations, 'id', 'button-name'); | ||
assert.equal(buttonNameViolation.nodes[0].target[0], IDs.emptyButton); | ||
|
||
}); | ||
|
||
visit('/violations'); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Ember from 'ember'; | ||
|
||
const { Component } = Ember; | ||
|
||
export default Component.extend({ | ||
attributeBindings: ['data-test-selector'] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import BaseDemoComponent from './_base-demo-component'; | ||
|
||
export default BaseDemoComponent.extend({ | ||
classNames: ['button'], | ||
tagName: 'button' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import BaseDemoComponent from './_base-demo-component'; | ||
|
||
export default BaseDemoComponent.extend({ | ||
tagName: 'input', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Route.extend({ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.button { | ||
background-color: aqua; | ||
border-radius: 0.25em; | ||
border: none; | ||
min-height: 1.5rem; | ||
height: 1.5rem; | ||
|
||
width: 2.2rem; | ||
min-width: 2.2rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<h2 id="title">Welcome to Ember.js</h2> | ||
<h2 id="title">Welcome to Ember</h2> | ||
|
||
{{passing-component}} | ||
{{outlet}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{yield}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{yield}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{{passing-component data-test-selector="passing-input"}} | ||
{{outlet}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{empty-button id="empty-button" data-test-selector="empty-button"}} | ||
|
||
{{sloppy-input id="sloppy-input" data-test-selector="sloppy-input"}} |
Oops, something went wrong.