diff --git a/package.json b/package.json index 8df0c94..3c6fec5 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,8 @@ "vue3-otp-input": "^0.4.1" }, "devDependencies": { + "chromedriver": "^123.0.0", + "selenium-webdriver": "^4.18.1", "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", "@playwright/test": "^1.31.1", diff --git a/selenium/banking/login-password.js b/selenium/banking/login-password.js new file mode 100644 index 0000000..3df29a8 --- /dev/null +++ b/selenium/banking/login-password.js @@ -0,0 +1,49 @@ +import { Builder, By, Browser, until } from "selenium-webdriver"; + +const email = "erwan.dano@transmitsecurity.com"; +const password = "mlkjmlkj"; + +async function example() { + let driver = await new Builder().forBrowser(Browser.CHROME).build(); + try { + // Navigate to URL + await driver.get("http://localhost:4000"); + + // Find the element with ID 'login-button' and click it + await driver.findElement(By.id("email")).click(); + + // Add more actions here + } finally { + // Close the browser after finishing + await driver.quit(); + } +} + +async function loginAction() { + let driver = await new Builder().forBrowser(Browser.CHROME).build(); + try { + // Navigate to the login page + await driver.get("http://localhost:4000/login"); + + // Find the email input by ID and enter the email address + const emailInput = await driver.wait( + until.elementLocated(By.id("email")), + 5000 + ); + + await emailInput.sendKeys(email); + + // Find the password input by ID and enter the password + await driver.findElement(By.id("password")).sendKeys(password); + + // Find the submit button by ID and click it + await driver.findElement(By.id("passwordLoginSubmit")).click(); + } catch (error) { + console.error(`An error occurred: ${error}`); + } finally { + // Uncomment the next line if you want the browser to close automatically + // await driver.quit(); + } +} + +loginAction(); diff --git a/selenium/banking/transaction.js b/selenium/banking/transaction.js new file mode 100644 index 0000000..04a3971 --- /dev/null +++ b/selenium/banking/transaction.js @@ -0,0 +1,64 @@ +import { Builder, By, Browser, until } from "selenium-webdriver"; + +const email = "erwan.dano@transmitsecurity.com"; +const password = "mlkjmlkj"; + +async function loginAction() { + let driver = await new Builder().forBrowser(Browser.CHROME).build(); + try { + // Navigate to the login page + await driver.get("http://localhost:4000/login"); + + // Find the email input by ID and enter the email address + const emailInput = await driver.wait( + until.elementLocated(By.id("email")), + 5000 + ); + + await emailInput.sendKeys(email); + + // Find the password input by ID and enter the password + await driver.findElement(By.id("password")).sendKeys(password); + + // Find the submit button by ID and click it + await driver.findElement(By.id("passwordLoginSubmit")).click(); + + // Wait + const transferButton = await driver.wait( + until.elementLocated(By.id("bankTransfer")), + 5000 + ); + transferButton.click(); + + await driver.sleep(1000); // Pause for 1000 milliseconds (1 second) + await driver.findElement(By.css("#accountSelection > input")).click(); + + await driver.sleep(1200); + await driver.findElement(By.css("#\\34 0021194485 .uppercase")).click(); + + await driver.sleep(800); + await driver.findElement(By.css("#selectBeneficiary > input")).click(); + + await driver.sleep(1200); + await driver.findElement(By.id("Aeklys")).click(); + + await driver.sleep(900); + await driver.findElement(By.id("transferAmount")).click(); + + await driver.sleep(500); + await driver.findElement(By.id("transferAmount")).sendKeys("400"); + + await driver.sleep(1200); + await driver.findElement(By.id("validateForm")).click(); + + await driver.sleep(2000); + await driver.findElement(By.id("validateTransfer")).click(); + } catch (error) { + console.error(`An error occurred: ${error}`); + } finally { + // Uncomment the next line if you want the browser to close automatically + // await driver.quit(); + } +} + +loginAction(); diff --git a/src/components/bank/AccountSelection.vue b/src/components/bank/AccountSelection.vue index de04b8b..09d2e2b 100644 --- a/src/components/bank/AccountSelection.vue +++ b/src/components/bank/AccountSelection.vue @@ -1,19 +1,19 @@ @@ -23,15 +23,22 @@ function selectAccount(account: Account) { >
{{ transactionDate1 }} | -{{ $t('bank.transaction1') }} | --{{ $n(307.17, 'currency') }} | +{{ $t("bank.transaction1") }} | +-{{ $n(307.17, "currency") }} |
{{ transactionDate2 }} | -{{ $t('bank.transaction2') }} | --{{ $n(28.99, 'currency') }} | +{{ $t("bank.transaction2") }} | +-{{ $n(28.99, "currency") }} |
{{ transactionDate3 }} | -{{ $t('bank.transaction3') }} | --{{ $n(17.49, 'currency') }} | +{{ $t("bank.transaction3") }} | +-{{ $n(17.49, "currency") }} |
+ {{ $t('bank.transfer.immediateTransferAd.content') }} +
++ {{ $t('bank.transfer.passkeysAd.content1') }} +
+{{ $t('bank.transfer.passkeysAd.content2') }}
++ Need to send money to friends or family quickly? Find in your beneficiaries who + is eligible to instant payment and send them money in less than 10 seconds. +
++ Passkeys offer the convenience of fast and easy authentication, and provides a + security stronger than a password combined with an SMS code. +
+Even better, with passkeys, no application is required.
+{{ $t('authentication.or') }}
++ {{ $t("authentication.or") }} +