From ee97aad15ede57f93398464620a4f6b6df3ed23e Mon Sep 17 00:00:00 2001 From: Sang Nguyen Date: Fri, 24 May 2024 23:32:09 +0700 Subject: [PATCH 1/2] [js] update the doc in virtual_authenticator.md --- .../virtual_authenticator/virtualAuthenticator.spec.js | 5 +++++ .../webdriver/interactions/virtual_authenticator.en.md | 10 +++++----- .../webdriver/interactions/virtual_authenticator.ja.md | 5 +++++ .../interactions/virtual_authenticator.pt-br.md | 5 +++++ .../interactions/virtual_authenticator.zh-cn.md | 5 +++++ 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js b/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js index 43bf056c3c4e..813adcec9a68 100644 --- a/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js +++ b/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js @@ -193,5 +193,10 @@ suite(function(env) { assert.equal(0, credentialList.length); }); + it('Set is user verified', async function() { + options.setIsUserVerified(true); + + assert(options['_isUserVerified'] === true); + }); }); }, { browsers: [Browser.CHROME]}); \ No newline at end of file diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md index 8bea10851068..229bcfcb71a3 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.en.md @@ -135,7 +135,7 @@ Creates a resident (stateless) credential with the given required credential [pa {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -160,7 +160,7 @@ Registers the credential with the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -185,7 +185,7 @@ Returns the list of credentials owned by the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -236,7 +236,7 @@ Removes all the credentials from the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -261,7 +261,7 @@ Sets whether the authenticator will simulate success or fail on user verificatio {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md index 2173168a996e..b5b7f772a615 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.ja.md @@ -140,6 +140,7 @@ Creates a resident (stateless) credential with the given required credential [pa {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -163,6 +164,7 @@ Registers the credential with the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -186,6 +188,7 @@ Returns the list of credentials owned by the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -234,6 +237,7 @@ Removes all the credentials from the authenticator. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -257,6 +261,7 @@ Sets whether the authenticator will simulate success or fail on user verificatio {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md index d85ef25419fe..d6288dde3cd3 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.pt-br.md @@ -131,6 +131,7 @@ Cria uma resident (stateless) credential com os requeridos [parâmetros](https:/ {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -154,6 +155,7 @@ Registra a credencial com o autenticador. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -177,6 +179,7 @@ Retorna a lista de credenciais que o autenticador possui. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -225,6 +228,7 @@ Remove todas as credenciais do autenticador. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -248,6 +252,7 @@ Diz se o autenticador simulará sucesso ou falha na verificação de usuário. {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md index 347fce67cd35..9e9cfb9fec17 100644 --- a/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/interactions/virtual_authenticator.zh-cn.md @@ -131,6 +131,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L136-L140" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -154,6 +155,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L131-L142" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -177,6 +179,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L154-L170" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -225,6 +228,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L181-L190" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -248,6 +252,7 @@ Web 应用程序可以启用基于公钥的身份验证机制(称为 Web 身 {{< badge-code >}} {{< /tab >}} {{< tab header="JavaScript" >}} +{{< gh-codeblock path="examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js#L197-L197" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} From 96fdd4a2bc4b1b6f7febc88ac4ed93d8be2d1c98 Mon Sep 17 00:00:00 2001 From: Sang Nguyen Date: Sun, 26 May 2024 10:17:25 +0700 Subject: [PATCH 2/2] update test --- .../test/virtual_authenticator/virtualAuthenticator.spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js b/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js index 813adcec9a68..7b90e7d96515 100644 --- a/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js +++ b/examples/javascript/test/virtual_authenticator/virtualAuthenticator.spec.js @@ -195,8 +195,7 @@ suite(function(env) { it('Set is user verified', async function() { options.setIsUserVerified(true); - - assert(options['_isUserVerified'] === true); + assert.equal(options.getIsUserVerified(), true); }); }); }, { browsers: [Browser.CHROME]}); \ No newline at end of file