From 54af4be725a00c0920d3a06b13889796d101bac8 Mon Sep 17 00:00:00 2001 From: Espen Simensen <71870736+espensimensen@users.noreply.github.com> Date: Thu, 16 Nov 2023 02:08:16 +0100 Subject: [PATCH] fix: Re-added USDC since it was removed during refactoring (#472) (#475) --- playwright-tests/create.spec.js | 19 ------------------- playwright-tests/tests/create.spec.js | 24 ++++++++++++++++++++++++ src/devhub/page/create.jsx | 1 + 3 files changed, 25 insertions(+), 19 deletions(-) delete mode 100644 playwright-tests/create.spec.js create mode 100644 playwright-tests/tests/create.spec.js diff --git a/playwright-tests/create.spec.js b/playwright-tests/create.spec.js deleted file mode 100644 index 22d9fe42d..000000000 --- a/playwright-tests/create.spec.js +++ /dev/null @@ -1,19 +0,0 @@ -import { test } from "@playwright/test"; -import { setInputAndAssert, selectAndAssert } from "./testUtils"; - -test("should be able to submit a solution with USDC as currency", async ({ - page, -}) => { - await page.goto("/devgovgigs.near/widget/app?page=create"); - - await page.click('[data-testid="btn-solution"]'); - await setInputAndAssert( - page, - '[data-testid="input-title"]', - "The test title" - ); - - await page.click('[data-testid="btn-request-funding"]'); - await selectAndAssert(page, '[data-testid="select-currency"]', "USDC"); - await setInputAndAssert(page, '[data-testid="input-amount"]', "300"); -}); diff --git a/playwright-tests/tests/create.spec.js b/playwright-tests/tests/create.spec.js new file mode 100644 index 000000000..22dafad3f --- /dev/null +++ b/playwright-tests/tests/create.spec.js @@ -0,0 +1,24 @@ +import { test } from "@playwright/test"; +import { setInputAndAssert, selectAndAssert } from "../testUtils"; + +test("should be able to submit a solution with USDC as currency", async ({ + page, +}) => { + await page.goto("/devgovgigs.near/widget/app?page=create"); + + await page.click('button:has-text("Solution")'); + + await setInputAndAssert( + page, + 'p:has-text("Title") + input', + "The test title" + ); + + await page.click('label:has-text("Yes") button'); + await selectAndAssert(page, 'div:has-text("Currency") select', "USDT"); + await setInputAndAssert( + page, + 'div:has-text("Requested amount") input', + "300" + ); +}); diff --git a/src/devhub/page/create.jsx b/src/devhub/page/create.jsx index 67359ac58..b8271ea11 100644 --- a/src/devhub/page/create.jsx +++ b/src/devhub/page/create.jsx @@ -384,6 +384,7 @@ const fundraisingDiv = ( USDT +