From bf6b8b5ebf58003d6e58f402b8ec662127677724 Mon Sep 17 00:00:00 2001 From: MexicanAce Date: Wed, 20 Nov 2024 21:50:10 +0000 Subject: [PATCH] fix: e2e tests and address feedback --- packages/app/src/components/Contract.vue | 4 ++-- packages/app/src/locales/en.json | 2 +- packages/app/src/locales/uk.json | 2 +- packages/app/tests/components/Contract.spec.ts | 2 +- packages/app/tests/e2e/src/pages/contract.page.ts | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/app/src/components/Contract.vue b/packages/app/src/components/Contract.vue index fa06da96ab..c8bf8a58b4 100644 --- a/packages/app/src/components/Contract.vue +++ b/packages/app/src/components/Contract.vue @@ -79,7 +79,7 @@ import { computed, type PropType } from "vue"; import { useI18n } from "vue-i18n"; -import { ShieldCheckIcon } from "@heroicons/vue/solid"; +import { CheckCircleIcon } from "@heroicons/vue/solid"; import SearchForm from "@/components/SearchForm.vue"; import BalanceTable from "@/components/balances/Table.vue"; @@ -124,7 +124,7 @@ const tabs = computed(() => [ { title: t("tabs.contract"), hash: "#contract", - icon: props.contract?.verificationInfo ? ShieldCheckIcon : null, + icon: props.contract?.verificationInfo ? CheckCircleIcon : null, }, { title: t("tabs.events"), hash: "#events" }, ]); diff --git a/packages/app/src/locales/en.json b/packages/app/src/locales/en.json index 11e5d44176..546a9b5212 100644 --- a/packages/app/src/locales/en.json +++ b/packages/app/src/locales/en.json @@ -326,7 +326,7 @@ "infoTableError": "An Error Occurred", "balanceTableTitle": "Balances", "notFound": "Not Found", - "verified": "Verified", + "verified": "Source Code", "transactionTable": { "error": "Something went wrong", "notFound": { diff --git a/packages/app/src/locales/uk.json b/packages/app/src/locales/uk.json index bcfc40cafc..06e7029f13 100644 --- a/packages/app/src/locales/uk.json +++ b/packages/app/src/locales/uk.json @@ -188,7 +188,7 @@ "infoTableError": "Виникла помилка", "balanceTableTitle": "Мої кошти", "notFound": "Не знайдено", - "verified": "перевірено", + "verified": "вихідний код", "transactionTable": { "error": "Щось пішло не так", "notFound": { diff --git a/packages/app/tests/components/Contract.spec.ts b/packages/app/tests/components/Contract.spec.ts index 2f0d1ab723..6b9a345391 100644 --- a/packages/app/tests/components/Contract.spec.ts +++ b/packages/app/tests/components/Contract.spec.ts @@ -89,6 +89,6 @@ describe("Contract:", () => { }, }); expect(container.querySelector(".title-container")?.textContent?.trim()).toContain("DARA2"); - expect(container.querySelector(".title-container")?.textContent?.trim()).toContain("Verified"); + expect(container.querySelector(".title-container")?.textContent?.trim()).toContain("Source Code"); }); }); diff --git a/packages/app/tests/e2e/src/pages/contract.page.ts b/packages/app/tests/e2e/src/pages/contract.page.ts index 4ed032d106..267a619ba8 100644 --- a/packages/app/tests/e2e/src/pages/contract.page.ts +++ b/packages/app/tests/e2e/src/pages/contract.page.ts @@ -19,11 +19,11 @@ export class ContractPage extends BasePage { super(world); } get transactionsTab() { - return "//button[text()='Transactions']/.."; + return "//button[contains(.,'Transactions')]/.."; } get contractTab() { - return "//button[text()='Contract']/.."; + return "//button[contains(.,'Contract')]/.."; } get contractVerificationBtn() {