Skip to content

Commit 31f2fb0

Browse files
chikara1608github-actions[bot]
authored andcommitted
🤖 Automated formatting fixes
1 parent 104415f commit 31f2fb0

File tree

6 files changed

+51
-44
lines changed

6 files changed

+51
-44
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class A11yEngineError {
2-
constructor(message, error) {
3-
this.message = message;
4-
this.error = error;
5-
}
2+
constructor(message, error) {
3+
this.message = message;
4+
this.error = error;
5+
}
66
}
77

8-
export default A11yEngineError;
8+
export default A11yEngineError;

lib/core/errors/error-types.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const ErrorTypes = Object.freeze({
2-
CHECK_ERROR: "check_errors",
3-
RUNTIME_ERROR: "runtime_errors",
4-
CONFIGURATION_ERROR: "configuration_errors",
5-
METADATA_ERROR: "metadata_errors",
6-
INSTRUMENTATION_ERROR: "instrumentation_errors"
1+
const ErrorTypes = Object.freeze({
2+
CHECK_ERROR: 'check_errors',
3+
RUNTIME_ERROR: 'runtime_errors',
4+
CONFIGURATION_ERROR: 'configuration_errors',
5+
METADATA_ERROR: 'metadata_errors',
6+
INSTRUMENTATION_ERROR: 'instrumentation_errors'
77
});
88

9-
export default ErrorTypes;
9+
export default ErrorTypes;

lib/rules/autocomplete-valid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"EN-301-549",
1010
"EN-9.1.3.5",
1111
"ACT",
12-
"a11y-engine",
12+
"a11y-engine",
1313
"a11y-engine-experimental"
1414
],
1515
"actIds": ["73f2c2"],

test/checks/forms/autocomplete-valid.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,176 +32,176 @@ describe('autocomplete-valid', function () {
3232
// assert.isTrue(evaluate.apply(checkContext, params));
3333
// });
3434

35-
it("evaluate() passes a document if form element has autocomplete set off and child elements don't have autocomplete", function() {
35+
it("evaluate() passes a document if form element has autocomplete set off and child elements don't have autocomplete", function () {
3636
console.log('Our functions are running fine');
3737
var params = checkSetup(
3838
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input type="text" id="target"/> <button>Save</button> </form> </html>'
3939
);
4040
assert.isTrue(evaluate.apply(checkContext, params));
4141
});
4242

43-
it('evaluate() passes a document if form element has autocomplete set off and child elements have autocomplete as off', function() {
43+
it('evaluate() passes a document if form element has autocomplete set off and child elements have autocomplete as off', function () {
4444
var params = checkSetup(
4545
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input autocomplete="off" type="text" id="target"/> <button>Save</button> </form> </html>'
4646
);
4747
assert.isTrue(evaluate.apply(checkContext, params));
4848
});
4949

50-
it('evaluate() passes a document if form element has autocomplete set off and child elements have standard autcomplete value', function() {
50+
it('evaluate() passes a document if form element has autocomplete set off and child elements have standard autcomplete value', function () {
5151
var params = checkSetup(
5252
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input autocomplete="username" type="text" id="target"/> <button>Save</button> </form> </html>'
5353
);
5454
assert.isTrue(evaluate.apply(checkContext, params));
5555
});
5656

57-
it('evaluate() passes a document if form element has autocomplete set off, child elements have on autocomplete value and name or id has standard autocomplete value', function() {
57+
it('evaluate() passes a document if form element has autocomplete set off, child elements have on autocomplete value and name or id has standard autocomplete value', function () {
5858
var params = checkSetup(
5959
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input autocomplete="on" name="name" type="text" id="target"/> <button>Save</button> </form> </html>'
6060
);
6161
assert.isTrue(evaluate.apply(checkContext, params));
6262
});
6363

64-
it('evaluate() fails a document if form element has autocomplete set off and child elements have on autocomplete value and name or id has non-standard autocomplete value', function() {
64+
it('evaluate() fails a document if form element has autocomplete set off and child elements have on autocomplete value and name or id has non-standard autocomplete value', function () {
6565
var params = checkSetup(
6666
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input autocomplete="on" name="xname" type="text" id="target"/> <button>Save</button> </form> </html>'
6767
);
6868
assert.isFalse(evaluate.apply(checkContext, params));
6969
});
7070

71-
it('evaluate() passes a document if form element has autocomplete set off, child elements have non-standard autocomplete value and name or id has standard autocomplete value', function() {
71+
it('evaluate() passes a document if form element has autocomplete set off, child elements have non-standard autocomplete value and name or id has standard autocomplete value', function () {
7272
var params = checkSetup(
7373
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input autocomplete="xname" name="name" type="text" id="target"/> <button>Save</button> </form> </html>'
7474
);
7575
assert.isTrue(evaluate.apply(checkContext, params));
7676
});
7777

78-
it('evaluate() fails a document if form element has autocomplete set off, child elements have non-standard autocomplete value and name or id has non-standard autocomplete value', function() {
78+
it('evaluate() fails a document if form element has autocomplete set off, child elements have non-standard autocomplete value and name or id has non-standard autocomplete value', function () {
7979
var params = checkSetup(
8080
'<html> <form autocomplete="off" onsubmit="javascript(0)"> <input autocomplete="xname" name="xname" type="text" id="target"/> <button>Save</button> </form> </html>'
8181
);
8282
assert.isFalse(evaluate.apply(checkContext, params));
8383
});
8484

85-
it('evaluate() passes a document if form element has autocomplete set on and child elements have autocomplete set to off', function() {
85+
it('evaluate() passes a document if form element has autocomplete set on and child elements have autocomplete set to off', function () {
8686
var params = checkSetup(
8787
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input autocomplete="off" type="text" id="target"/> <button>Save</button> </form> </html>'
8888
);
8989
assert.isTrue(evaluate.apply(checkContext, params));
9090
});
9191

92-
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements have autocomplete set to off", function() {
92+
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements have autocomplete set to off", function () {
9393
var params = checkSetup(
9494
'<html> <form onsubmit="javascript(0)"> <input autocomplete="off" type="text" id="target"/> <button>Save</button> </form> </html>'
9595
);
9696
assert.isTrue(evaluate.apply(checkContext, params));
9797
});
9898

99-
it('evaluate() passes a document if form element has autocomplete set on and child elements have autocomplete set to standard irrespective of name and id', function() {
99+
it('evaluate() passes a document if form element has autocomplete set on and child elements have autocomplete set to standard irrespective of name and id', function () {
100100
var params = checkSetup(
101101
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input autocomplete="name" type="text" name="xname" id="target"/> <button>Save</button> </form> </html>'
102102
);
103103
assert.isTrue(evaluate.apply(checkContext, params));
104104
});
105105

106-
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements have autocomplete set to standard irrespective of name and id", function() {
106+
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements have autocomplete set to standard irrespective of name and id", function () {
107107
var params = checkSetup(
108108
'<html> <form onsubmit="javascript(0)"> <input autocomplete="name" type="text" name="xname" id="target"/> <button>Save</button> </form> </html>'
109109
);
110110
assert.isTrue(evaluate.apply(checkContext, params));
111111
});
112112

113-
it('evaluate() passes a document if form element has autocomplete set on and child elements have autocomplete set on and name/id have a standard autocomplete value', function() {
113+
it('evaluate() passes a document if form element has autocomplete set on and child elements have autocomplete set on and name/id have a standard autocomplete value', function () {
114114
var params = checkSetup(
115115
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input autocomplete="on" type="text" name="name" id="target"/> <button>Save</button> </form> </html>'
116116
);
117117
assert.isTrue(evaluate.apply(checkContext, params));
118118
});
119119

120-
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements have autocomplete set on and name/id have a standard autocomplete value", function() {
120+
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements have autocomplete set on and name/id have a standard autocomplete value", function () {
121121
var params = checkSetup(
122122
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input autocomplete="on" type="text" name="name" id="target"/> <button>Save</button> </form> </html>'
123123
);
124124
assert.isTrue(evaluate.apply(checkContext, params));
125125
});
126126

127-
it('evaluate() fails a document if form element has autocomplete set on and child elements have autocomplete set on and name/id have a non-standard autocomplete value', function() {
127+
it('evaluate() fails a document if form element has autocomplete set on and child elements have autocomplete set on and name/id have a non-standard autocomplete value', function () {
128128
var params = checkSetup(
129129
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input autocomplete="on" type="text" name="xname" id="target"/> <button>Save</button> </form> </html>'
130130
);
131131
assert.isFalse(evaluate.apply(checkContext, params));
132132
});
133133

134-
it("evaluate() fails a document if form element doesn't have autcomplete set and child elements have autocomplete set on and name/id have a non-standard autocomplete value", function() {
134+
it("evaluate() fails a document if form element doesn't have autcomplete set and child elements have autocomplete set on and name/id have a non-standard autocomplete value", function () {
135135
var params = checkSetup(
136136
'<html> <form onsubmit="javascript(0)"> <input autocomplete="on" type="text" name="xname" id="target"/> <button>Save</button> </form> </html>'
137137
);
138138
assert.isFalse(evaluate.apply(checkContext, params));
139139
});
140140

141-
it("evaluate() passes a document if form element has autocomplete set on and child elements don't have autocomplete set and name/id have a standard autocomplete value", function() {
141+
it("evaluate() passes a document if form element has autocomplete set on and child elements don't have autocomplete set and name/id have a standard autocomplete value", function () {
142142
var params = checkSetup(
143143
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input type="text" name="name" id="target"/> <button>Save</button> </form> </html>'
144144
);
145145
assert.isTrue(evaluate.apply(checkContext, params));
146146
});
147147

148-
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements don't have autocomplete set and name/id have a standard autocomplete value", function() {
148+
it("evaluate() passes a document if form element doesn't have autocomplete set and child elements don't have autocomplete set and name/id have a standard autocomplete value", function () {
149149
var params = checkSetup(
150150
'<html> <form onsubmit="javascript(0)"> <input type="text" name="name" id="target"/> <button>Save</button> </form> </html>'
151151
);
152152
assert.isTrue(evaluate.apply(checkContext, params));
153153
});
154154

155-
it("evaluate() fails a document if form element has autocomplete set on and child elements don't have autocomplete set and name/id have a non-standard autocomplete value", function() {
155+
it("evaluate() fails a document if form element has autocomplete set on and child elements don't have autocomplete set and name/id have a non-standard autocomplete value", function () {
156156
var params = checkSetup(
157157
'<html> <form autocomplete="on" onsubmit="javascript(0)"> <input type="text" name="xname" id="target"/> <button>Save</button> </form> </html>'
158158
);
159159
assert.isFalse(evaluate.apply(checkContext, params));
160160
});
161161

162-
it("evaluate() fails a document if form element doesn't have autocomplete set and child elements don't have autocomplete set and name/id have a non-standard autocomplete value", function() {
162+
it("evaluate() fails a document if form element doesn't have autocomplete set and child elements don't have autocomplete set and name/id have a non-standard autocomplete value", function () {
163163
var params = checkSetup(
164164
'<html> <form onsubmit="javascript(0)"> <input type="text" name="xname" id="target"/> <button>Save</button> </form> </html>'
165165
);
166166
assert.isFalse(evaluate.apply(checkContext, params));
167167
});
168168

169-
it('evaluate() passes a document if element is independent and have autocomplete set to off', function() {
169+
it('evaluate() passes a document if element is independent and have autocomplete set to off', function () {
170170
var params = checkSetup(
171171
'<html> <input autocomplete="off" type="text" id="target"/> <button>Save</button> </html>'
172172
);
173173
assert.isTrue(evaluate.apply(checkContext, params));
174174
});
175175

176-
it('evaluate() passes a document if element is independent and have autocomplete set to standard irrespective of name and id', function() {
176+
it('evaluate() passes a document if element is independent and have autocomplete set to standard irrespective of name and id', function () {
177177
var params = checkSetup(
178178
'<html> <input autocomplete="name" type="text" name="xname" id="target"/> <button>Save</button> </html>'
179179
);
180180
assert.isTrue(evaluate.apply(checkContext, params));
181181
});
182182

183-
it('evaluate() passes a document if element is independent and have autocomplete set on and name/id have a standard autocomplete value', function() {
183+
it('evaluate() passes a document if element is independent and have autocomplete set on and name/id have a standard autocomplete value', function () {
184184
var params = checkSetup(
185185
'<html> <input autocomplete="on" type="text" name="name" id="target"/> <button>Save</button> </html>'
186186
);
187187
assert.isTrue(evaluate.apply(checkContext, params));
188188
});
189189

190-
it('evaluate() fails a document if element is independent and have autocomplete set on and name/id have a non-standard autocomplete value', function() {
190+
it('evaluate() fails a document if element is independent and have autocomplete set on and name/id have a non-standard autocomplete value', function () {
191191
var params = checkSetup(
192192
'<html> <input autocomplete="on" type="text" name="xname" id="target"/> <button>Save</button> </html>'
193193
);
194194
assert.isFalse(evaluate.apply(checkContext, params));
195195
});
196196

197-
it("evaluate()passes a document if element is independent and don't have autocomplete set and name/id have a standard autocomplete value", function() {
197+
it("evaluate()passes a document if element is independent and don't have autocomplete set and name/id have a standard autocomplete value", function () {
198198
var params = checkSetup(
199199
'<html> <input type="text" name="name" id="target"/> <button>Save</button> </html>'
200200
);
201201
assert.isTrue(evaluate.apply(checkContext, params));
202202
});
203203

204-
it("evaluate() fails a document if element is independent and don't have autocomplete set and name/id have a non-standard autocomplete value", function() {
204+
it("evaluate() fails a document if element is independent and don't have autocomplete set and name/id have a non-standard autocomplete value", function () {
205205
var params = checkSetup(
206206
'<html> <input type="text" name="xname" id="target"/> <button>Save</button> </html>'
207207
);

test/integration/rules/autocomplete-valid/autocomplete-valid.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
{
22
"description": "autocomplete-valid tests",
33
"rule": "autocomplete-valid",
4-
"violations": [["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"], ["#fail5"], ["#fail6"], ["#fail7"], ["#fail8"], ["#fail9"], ["#fail10"], ["#fail11"]],
4+
"violations": [
5+
["#fail1"],
6+
["#fail2"],
7+
["#fail3"],
8+
["#fail4"],
9+
["#fail5"],
10+
["#fail6"],
11+
["#fail7"],
12+
["#fail8"],
13+
["#fail9"],
14+
["#fail10"],
15+
["#fail11"]
16+
],
517
"passes": [
618
["#pass1"],
719
["#pass2"],

test/integration/virtual-rules/autocomplete-valid.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ describe('autocomplete-valid virtual-rule', function () {
77
// autocomplete: 'country-name'
88
// }
99
// });
10-
1110
// assert.lengthOf(results.passes, 1);
1211
// assert.lengthOf(results.violations, 0);
1312
// assert.lengthOf(results.incomplete, 0);
1413
// });
15-
1614
// it('should pass when autocomplete is correctly used', function () {
1715
// var results = axe.runVirtualRule('autocomplete-valid', {
1816
// nodeName: 'input',
@@ -21,12 +19,10 @@ describe('autocomplete-valid virtual-rule', function () {
2119
// autocomplete: 'email'
2220
// }
2321
// });
24-
2522
// assert.lengthOf(results.passes, 1);
2623
// assert.lengthOf(results.violations, 0);
2724
// assert.lengthOf(results.incomplete, 0);
2825
// });
29-
3026
// it('should fail autocomplete is not valid', function () {
3127
// var results = axe.runVirtualRule('autocomplete-valid', {
3228
// nodeName: 'input',
@@ -35,7 +31,6 @@ describe('autocomplete-valid virtual-rule', function () {
3531
// autocomplete: 'foobar'
3632
// }
3733
// });
38-
3934
// assert.lengthOf(results.passes, 0);
4035
// assert.lengthOf(results.violations, 1);
4136
// assert.lengthOf(results.incomplete, 0);

0 commit comments

Comments
 (0)