From d864993fbc14e0021db25621566cc60a51d6a7a3 Mon Sep 17 00:00:00 2001 From: MaksymKalennyk <107300165+MaksymKalennyk@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:26:08 +0300 Subject: [PATCH 1/3] added tests for otp feature --- .../ui/web/var/self/otp/scenario.xml | 69 +++++++++++++++++++ .../variable/general/otp/scenario.xml | 43 ++++++++++++ REGRESSION/schema/var.xsd | 6 ++ TEST-UI/package-lock.json | 38 ++++++++++ TEST-UI/package.json | 2 +- TEST-UI/src/router.ts | 7 ++ TEST-UI/src/views/OtpTestPage.vue | 65 +++++++++++++++++ 7 files changed, 229 insertions(+), 1 deletion(-) create mode 100644 REGRESSION/resources/scenarios/ui/web/var/self/otp/scenario.xml create mode 100644 REGRESSION/resources/scenarios/variable/general/otp/scenario.xml create mode 100644 TEST-UI/src/views/OtpTestPage.vue diff --git a/REGRESSION/resources/scenarios/ui/web/var/self/otp/scenario.xml b/REGRESSION/resources/scenarios/ui/web/var/self/otp/scenario.xml new file mode 100644 index 00000000..fd86af02 --- /dev/null +++ b/REGRESSION/resources/scenarios/ui/web/var/self/otp/scenario.xml @@ -0,0 +1,69 @@ + + + + Var - OTP + + This scenario verifies OTP value generation and input usage. + + Test flow: + 1. Navigate to OTP test page. + 2. Generate OTP value. + 3. Input generated value. + 4. Verify that input contains generated value. + + This scenario validates: + - OTP generation + - variable injection into input + - correct value application + + + + + web + + + + + + + + + + + + + + + + + {{otpValue}} + + + + + + + + + + Success! + + + + + + diff --git a/REGRESSION/resources/scenarios/variable/general/otp/scenario.xml b/REGRESSION/resources/scenarios/variable/general/otp/scenario.xml new file mode 100644 index 00000000..f65b6355 --- /dev/null +++ b/REGRESSION/resources/scenarios/variable/general/otp/scenario.xml @@ -0,0 +1,43 @@ + + + + Test otp variable creation and usage + Variable(otp) Test + Anatoliy + + + + var + + + + + + + + + + + {{otpCondition}} + true + + + + + + + + + + + + + + {{otpChangedCondition}} + true + + + + diff --git a/REGRESSION/schema/var.xsd b/REGRESSION/schema/var.xsd index d9df738f..1decf353 100644 --- a/REGRESSION/schema/var.xsd +++ b/REGRESSION/schema/var.xsd @@ -53,9 +53,15 @@ + + + + + + diff --git a/TEST-UI/package-lock.json b/TEST-UI/package-lock.json index 017ac0bd..cc8db8ff 100644 --- a/TEST-UI/package-lock.json +++ b/TEST-UI/package-lock.json @@ -14,6 +14,7 @@ "@tailwindcss/aspect-ratio": "^0.4.0", "@tailwindcss/forms": "^0.4.0", "@tailwindcss/typography": "^0.5.2", + "otpauth": "^9.5.1", "vue": "^3.2.6", "vue-backtotop": "^1.6.1", "vue-router": "^4.2.2", @@ -485,6 +486,18 @@ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, + "node_modules/@noble/hashes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz", + "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1547,6 +1560,18 @@ "wrappy": "1" } }, + "node_modules/otpauth": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/otpauth/-/otpauth-9.5.1.tgz", + "integrity": "sha512-fJmDAHc8wImfqqqOXIlBvT1dEKrZK0Cmb2VEgScpNTolCz0PHh6ExUZGv4sLtOsWNaHCQlD+rRqaPgnoxFoZjQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.2.0" + }, + "funding": { + "url": "https://github.com/hectorm/otpauth?sponsor=1" + } + }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2463,6 +2488,11 @@ } } }, + "@noble/hashes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz", + "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3283,6 +3313,14 @@ "wrappy": "1" } }, + "otpauth": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/otpauth/-/otpauth-9.5.1.tgz", + "integrity": "sha512-fJmDAHc8wImfqqqOXIlBvT1dEKrZK0Cmb2VEgScpNTolCz0PHh6ExUZGv4sLtOsWNaHCQlD+rRqaPgnoxFoZjQ==", + "requires": { + "@noble/hashes": "2.2.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", diff --git a/TEST-UI/package.json b/TEST-UI/package.json index 3dbc4d6e..b587660f 100644 --- a/TEST-UI/package.json +++ b/TEST-UI/package.json @@ -13,7 +13,7 @@ "@tailwindcss/aspect-ratio": "^0.4.0", "@tailwindcss/forms": "^0.4.0", "@tailwindcss/typography": "^0.5.2", - + "otpauth": "^9.5.1", "vue": "^3.2.6", "vue-backtotop": "^1.6.1", "vue-router": "^4.2.2", diff --git a/TEST-UI/src/router.ts b/TEST-UI/src/router.ts index c7d1bee2..6c6e2bb4 100644 --- a/TEST-UI/src/router.ts +++ b/TEST-UI/src/router.ts @@ -9,6 +9,7 @@ import Modal from './views/Modal.vue'; import Card from './views/Card.vue'; import Blank from './views/Blank.vue'; import ScrollTest from "./views/ScrollTest.vue"; +import OtpTestPage from "./views/OtpTestPage.vue"; const routes: RouteRecordRaw[] = [ { @@ -56,6 +57,12 @@ const routes: RouteRecordRaw[] = [ path: '/scroll-test', name: 'ScrollTest', component: ScrollTest, + }, + { + path: '/otp-test', + name: 'OtpTestPage', + component: OtpTestPage, + meta: { layout: 'empty' }, } ]; diff --git a/TEST-UI/src/views/OtpTestPage.vue b/TEST-UI/src/views/OtpTestPage.vue new file mode 100644 index 00000000..2f3945ab --- /dev/null +++ b/TEST-UI/src/views/OtpTestPage.vue @@ -0,0 +1,65 @@ + + + + 2FA Test Page + Enter your Google Authenticator code + + + + OTP Code + + + + + + Verify + + + + + + {{ message }} + + + + + + From 628380f07aeade3186cb0c97b91a809bb7302420 Mon Sep 17 00:00:00 2001 From: MaksymKalennyk <107300165+MaksymKalennyk@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:47:48 +0300 Subject: [PATCH 2/3] removed comment from otp tag --- REGRESSION/schema/var.xsd | 1 - 1 file changed, 1 deletion(-) diff --git a/REGRESSION/schema/var.xsd b/REGRESSION/schema/var.xsd index 1decf353..9a771d96 100644 --- a/REGRESSION/schema/var.xsd +++ b/REGRESSION/schema/var.xsd @@ -59,7 +59,6 @@ - From 71ede4a7f831baf71fb681bb5cfe573515fdef9d Mon Sep 17 00:00:00 2001 From: MaksymKalennyk <107300165+MaksymKalennyk@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:55:15 +0300 Subject: [PATCH 3/3] added validation for secretKEy --- REGRESSION/schema/shared-restrictions.xsd | 6 ++++++ REGRESSION/schema/var.xsd | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/REGRESSION/schema/shared-restrictions.xsd b/REGRESSION/schema/shared-restrictions.xsd index 472de7b9..131ad421 100644 --- a/REGRESSION/schema/shared-restrictions.xsd +++ b/REGRESSION/schema/shared-restrictions.xsd @@ -10,6 +10,12 @@ + + + + + + diff --git a/REGRESSION/schema/var.xsd b/REGRESSION/schema/var.xsd index 9a771d96..11c43a25 100644 --- a/REGRESSION/schema/var.xsd +++ b/REGRESSION/schema/var.xsd @@ -58,7 +58,7 @@ - +
Enter your Google Authenticator code