@@ -35,7 +35,7 @@ const GET_CREDENTIAL = `getCredential([{
35
35
"id": Int8Array.from(arguments[0]),
36
36
}]).then(arguments[arguments.length - 1]);`
37
37
38
- async function createRkEnabledU2fAuthenticator ( driver ) {
38
+ async function createRkEnabledU2fAuthenticator ( driver ) {
39
39
let options
40
40
options = new virtualAuthenticatorOptions ( )
41
41
options . setProtocol ( Protocol [ 'U2F' ] )
@@ -44,7 +44,7 @@ async function createRkEnabledU2fAuthenticator(driver) {
44
44
return driver
45
45
}
46
46
47
- async function createRkDisabledU2fAuthenticator ( driver ) {
47
+ async function createRkDisabledU2fAuthenticator ( driver ) {
48
48
let options
49
49
options = new virtualAuthenticatorOptions ( )
50
50
options . setProtocol ( Protocol [ 'U2F' ] )
@@ -53,7 +53,7 @@ async function createRkDisabledU2fAuthenticator(driver) {
53
53
return driver
54
54
}
55
55
56
- async function createRkEnabledCTAP2Authenticator ( driver ) {
56
+ async function createRkEnabledCTAP2Authenticator ( driver ) {
57
57
let options
58
58
options = new virtualAuthenticatorOptions ( )
59
59
options . setProtocol ( Protocol [ 'CTAP2' ] )
@@ -64,7 +64,7 @@ async function createRkEnabledCTAP2Authenticator(driver) {
64
64
return driver
65
65
}
66
66
67
- async function createRkDisabledCTAP2Authenticator ( driver ) {
67
+ async function createRkDisabledCTAP2Authenticator ( driver ) {
68
68
let options
69
69
options = new virtualAuthenticatorOptions ( )
70
70
options . setProtocol ( Protocol [ 'CTAP2' ] )
@@ -75,15 +75,15 @@ async function createRkDisabledCTAP2Authenticator(driver) {
75
75
return driver
76
76
}
77
77
78
- async function getAssertionFor ( driver , credentialId ) {
78
+ async function getAssertionFor ( driver , credentialId ) {
79
79
return await driver . executeAsyncScript ( GET_CREDENTIAL , credentialId )
80
80
}
81
81
82
- function extractRawIdFrom ( response ) {
82
+ function extractRawIdFrom ( response ) {
83
83
return response . credential . rawId
84
84
}
85
85
86
- function extractIdFrom ( response ) {
86
+ function extractIdFrom ( response ) {
87
87
return response . credential . id
88
88
}
89
89
@@ -96,7 +96,7 @@ function extractIdFrom(response) {
96
96
* @param array2 Second array to be checked for equality
97
97
* @returns true if equal, otherwise false.
98
98
*/
99
- function arraysEqual ( array1 , array2 ) {
99
+ function arraysEqual ( array1 , array2 ) {
100
100
return (
101
101
array1 . length == array2 . length &&
102
102
array1 . every ( ( item ) => array2 . includes ( item ) ) &&
@@ -150,7 +150,7 @@ suite(function (env) {
150
150
} )
151
151
152
152
describe ( 'VirtualAuthenticator Test Suit 2' , function ( ) {
153
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
153
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
154
154
'should test create authenticator' ,
155
155
async function ( ) {
156
156
/**
@@ -170,7 +170,7 @@ suite(function (env) {
170
170
}
171
171
)
172
172
173
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
173
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
174
174
'should test remove authenticator' ,
175
175
async function ( ) {
176
176
let options = new virtualAuthenticatorOptions ( )
@@ -182,7 +182,7 @@ suite(function (env) {
182
182
}
183
183
)
184
184
185
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
185
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
186
186
'should test add non-resident credential' ,
187
187
async function ( ) {
188
188
/**
@@ -206,7 +206,7 @@ suite(function (env) {
206
206
}
207
207
)
208
208
209
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
209
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
210
210
'should test add non-resident credential when authenticator uses U2F protocol' ,
211
211
async function ( ) {
212
212
/**
@@ -239,7 +239,7 @@ suite(function (env) {
239
239
}
240
240
)
241
241
242
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
242
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
243
243
'should test add resident credential' ,
244
244
async function ( ) {
245
245
/**
@@ -269,7 +269,7 @@ suite(function (env) {
269
269
}
270
270
)
271
271
272
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
272
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
273
273
'should test add resident credential not supported when authenticator uses U2F protocol' ,
274
274
async function ( ) {
275
275
/**
@@ -309,7 +309,7 @@ suite(function (env) {
309
309
}
310
310
)
311
311
312
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
312
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
313
313
'should test get credentials' ,
314
314
async function ( ) {
315
315
/**
@@ -321,8 +321,9 @@ suite(function (env) {
321
321
* Register a resident credential.
322
322
*/
323
323
let response1 = await driver . executeAsyncScript (
324
- 'registerCredential({authenticatorSelection: {requireResidentKey: true}})' +
325
- ' .then(arguments[arguments.length - 1]);'
324
+ 'registerCredential({authenticatorSelection: {requireResidentKey: true}})'
325
+ +
326
+ ' .then(arguments[arguments.length - 1]);'
326
327
)
327
328
assert ( response1 [ 'status' ] === 'OK' )
328
329
@@ -364,7 +365,7 @@ suite(function (env) {
364
365
}
365
366
)
366
367
367
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
368
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
368
369
'should test remove credential by rawID' ,
369
370
async function ( ) {
370
371
driver = await createRkDisabledU2fAuthenticator ( driver )
@@ -389,7 +390,7 @@ suite(function (env) {
389
390
}
390
391
)
391
392
392
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
393
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
393
394
'should test remove credential by base64url Id' ,
394
395
async function ( ) {
395
396
driver = await createRkDisabledU2fAuthenticator ( driver )
@@ -416,7 +417,7 @@ suite(function (env) {
416
417
}
417
418
)
418
419
419
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
420
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
420
421
'should test remove all credentials' ,
421
422
async function ( ) {
422
423
driver = await createRkDisabledU2fAuthenticator ( driver )
@@ -442,20 +443,20 @@ suite(function (env) {
442
443
*/
443
444
let response = await driver . executeAsyncScript (
444
445
'getCredential([{' +
445
- ' "type": "public-key",' +
446
- ' "id": Int8Array.from(arguments[0]),' +
447
- '}, {' +
448
- ' "type": "public-key",' +
449
- ' "id": Int8Array.from(arguments[1]),' +
450
- '}]).then(arguments[arguments.length - 1]);' ,
446
+ ' "type": "public-key",' +
447
+ ' "id": Int8Array.from(arguments[0]),' +
448
+ '}, {' +
449
+ ' "type": "public-key",' +
450
+ ' "id": Int8Array.from(arguments[1]),' +
451
+ '}]).then(arguments[arguments.length - 1]);' ,
451
452
rawId1 ,
452
453
rawId2
453
454
)
454
455
assert ( response [ 'status' ] . startsWith ( 'NotAllowedError' ) )
455
456
}
456
457
)
457
458
458
- ignore ( browsers ( Browser . SAFARI , Browser . FIREFOX ) ) . it (
459
+ ignore ( browsers ( Browser . SAFARI ) ) . it (
459
460
'should test set user verified' ,
460
461
async function ( ) {
461
462
driver = await createRkEnabledCTAP2Authenticator ( driver )
@@ -464,8 +465,9 @@ suite(function (env) {
464
465
* Register a credential requiring UV.
465
466
*/
466
467
let response = await driver . executeAsyncScript (
467
- "registerCredential({authenticatorSelection: {userVerification: 'required'}})" +
468
- ' .then(arguments[arguments.length - 1]);'
468
+ 'registerCredential({authenticatorSelection: {userVerification: \'required\'}})'
469
+ +
470
+ ' .then(arguments[arguments.length - 1]);'
469
471
)
470
472
assert ( response [ 'status' ] === 'OK' )
471
473
let rawId = extractRawIdFrom ( response )
0 commit comments