Skip to content

Commit 178df34

Browse files
committed
[JS] link virtual auth code sample [deploy site]
1 parent 1f944ab commit 178df34

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
const { VirtualAuthenticatorOptions, Transport, Protocol } = require("selenium-webdriver/lib/virtual_authenticator");
2-
const { suite } = require('selenium-webdriver/testing');
1+
const {VirtualAuthenticatorOptions, Transport, Protocol} = require("selenium-webdriver/lib/virtual_authenticator");
2+
const {suite} = require('selenium-webdriver/testing');
33
const assert = require('assert')
44

5-
suite(function() {
6-
describe('Virtual authenticator options', function() {
5+
suite(function () {
6+
describe('Virtual authenticator options', function () {
7+
let options;
78

8-
let options;
9+
it('Virtual options', async function () {
10+
options = new VirtualAuthenticatorOptions();
11+
options.setIsUserVerified(true);
12+
options.setHasUserVerification(true);
13+
options.setIsUserConsenting(true);
14+
options.setTransport(Transport['USB']);
15+
options.setProtocol(Protocol['U2F']);
16+
options.setHasResidentKey(false);
917

10-
before(async function() {
11-
options = new VirtualAuthenticatorOptions();
12-
});
13-
14-
it('Virtual options', async function() {
15-
options.setIsUserVerified(true);
16-
options.setHasUserVerification(true);
17-
options.setIsUserConsenting(true);
18-
options.setTransport(Transport['USB']);
19-
options.setProtocol(Protocol['U2F']);
20-
options.setHasResidentKey(false);
21-
22-
assert(Object.keys(options).length === 6);
23-
});
24-
25-
it('User verified', async function() {
26-
options.setIsUserVerified(true);
18+
assert(Object.keys(options).length === 6);
19+
});
2720

28-
assert(options.toDict()['isUserVerified']);
29-
});
21+
it('User verified', async function () {
22+
options.setIsUserVerified(true);
3023

24+
assert(options.toDict()['isUserVerified']);
3125
});
26+
27+
});
3228
});

website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ These properties are mapped as VirtualAuthenticatorOptions in the Selenium bindi
3434
{{< badge-code >}}
3535
{{< /tab >}}
3636
{{< tab header="JavaScript" >}}
37+
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticatorOptions.spec.js#L10-L16" >}}
3738
{{< badge-code >}}
3839
{{< /tab >}}
3940
{{< tab header="Kotlin" >}}

website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ These properties are mapped as VirtualAuthenticatorOptions in the Selenium bindi
4141
{{< tab header="Python" >}}
4242
{{< /tab >}}
4343
{{< tab header="JavaScript" >}}
44+
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticatorOptions.spec.js#L10-L16" >}}
4445
{{< /tab >}}
4546
{{< tab header="Kotlin" >}}
4647
{{< /tab >}}

website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ These properties are mapped as VirtualAuthenticatorOptions in the Selenium bindi
4141
{{< tab header="Python" >}}
4242
{{< /tab >}}
4343
{{< tab header="JavaScript" >}}
44+
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticatorOptions.spec.js#L10-L16" >}}
4445
{{< /tab >}}
4546
{{< tab header="Kotlin" >}}
4647
{{< /tab >}}

website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身
3232
{{< tab header="Python" >}}
3333
{{< /tab >}}
3434
{{< tab header="JavaScript" >}}
35+
{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticatorOptions.spec.js#L10-L16" >}}
3536
{{< /tab >}}
3637
{{< tab header="Kotlin" >}}
3738
{{< /tab >}}

0 commit comments

Comments
 (0)