diff --git a/instances/treasury-devdao.near/aliases.mainnet.json b/instances/treasury-devdao.near/aliases.mainnet.json index aab1325c..d6cb7988 100644 --- a/instances/treasury-devdao.near/aliases.mainnet.json +++ b/instances/treasury-devdao.near/aliases.mainnet.json @@ -1,5 +1,5 @@ { - "REPL_BASE_DEPLOYMENT_ACCOUNT": "treasury-devdao.near", + "REPL_BASE_DEPLOYMENT_ACCOUNT": "widgets.treasury-factory.near", "REPL_INSTANCE": "treasury-devdao.near", "REPL_TREASURY": "devdao.sputnik-dao.near", "REPL_PROPOSALS_CACHE_URL": "https://devhub-cache-api-rs.fly.dev" diff --git a/playwright-tests/tests/payments/create-payment-request.spec.js b/playwright-tests/tests/payments/create-payment-request.spec.js index 7c38f4cf..5f798a2b 100644 --- a/playwright-tests/tests/payments/create-payment-request.spec.js +++ b/playwright-tests/tests/payments/create-payment-request.spec.js @@ -761,9 +761,12 @@ test.describe("admin with function access keys", function () { await expect( page.getByRole("cell", { name: `${newProposalId}`, exact: true }) ).toBeVisible({ timeout: 10_000 }); + const widgetsAccount = + (instanceAccount.includes("testing") ? "test-widgets" : "widgets") + + ".treasury-factory.near"; const firstRow = page .locator( - 'tr[data-component="widgets.treasury-factory.near/widget/pages.payments.Table"]' + `tr[data-component="${widgetsAccount}/widget/pages.payments.Table"]` ) .nth(1); await expect(firstRow).toContainText( diff --git a/playwright-tests/tests/payments/vote-on-request.spec.js b/playwright-tests/tests/payments/vote-on-request.spec.js index 1f4c2f39..f34af3aa 100644 --- a/playwright-tests/tests/payments/vote-on-request.spec.js +++ b/playwright-tests/tests/payments/vote-on-request.spec.js @@ -74,10 +74,14 @@ async function voteOnProposal({ }, }); + const widgetsAccount = + (instanceAccount.includes("testing") === true + ? "test-widgets" + : "widgets") + ".treasury-factory.near"; await page.goto(`/${instanceAccount}/widget/app?page=payments`); await setDontAskAgainCacheValues({ page, - widgetSrc: "widgets.treasury-factory.near/widget/components.VoteActions", + widgetSrc: `${widgetsAccount}/widget/components.VoteActions`, contractId, methodName: "act_proposal", }); diff --git a/playwright-tests/tests/settings/request-feed.spec.js b/playwright-tests/tests/settings/request-feed.spec.js index 18f09fad..fdb389a3 100644 --- a/playwright-tests/tests/settings/request-feed.spec.js +++ b/playwright-tests/tests/settings/request-feed.spec.js @@ -103,9 +103,14 @@ async function voteOnProposal({ }); await page.goto(`/${instanceAccount}/widget/app?page=settings`); + const widgetsAccount = + (instanceAccount.includes("testing") === true + ? "test-widgets" + : "widgets") + ".treasury-factory.near"; + await setDontAskAgainCacheValues({ page, - widgetSrc: "widgets.treasury-factory.near/widget/components.VoteActions", + widgetSrc: `${widgetsAccount}/widget/components.VoteActions`, contractId, methodName: "act_proposal", }); diff --git a/playwright-tests/tests/stake-delegation/stake-delegation.spec.js b/playwright-tests/tests/stake-delegation/stake-delegation.spec.js index 16369ca6..c4bc715c 100644 --- a/playwright-tests/tests/stake-delegation/stake-delegation.spec.js +++ b/playwright-tests/tests/stake-delegation/stake-delegation.spec.js @@ -378,13 +378,18 @@ async function voteOnProposal({ }); await page.goto(`/${instanceAccount}/widget/app?page=stake-delegation`); + const widgetsAccount = + (instanceAccount.includes("testing") === true + ? "test-widgets" + : "widgets") + ".treasury-factory.near"; await setDontAskAgainCacheValues({ page, - widgetSrc: "widgets.treasury-factory.near/widget/components.VoteActions", + widgetSrc: `${widgetsAccount}/widget/components.VoteActions`, contractId, methodName: "act_proposal", }); + await expect( await page.locator("div").filter({ hasText: /^Stake Delegation$/ }) ).toBeVisible({ timeout: 20_000 }); @@ -817,14 +822,24 @@ test.describe("Withdraw request", function () { }); }); -async function openLockupStakingForm({ page, daoAccount, lockupContract }) { +async function openLockupStakingForm({ + page, + daoAccount, + lockupContract, + instanceAccount, +}) { const createRequestButton = await page.getByText("Create Request", { exact: true, }); await createRequestButton.click(); + const widgetsAccount = + (instanceAccount.includes("testing") === true + ? "test-widgets" + : "widgets") + ".treasury-factory.near"; + await page .locator( - 'div[data-component="widgets.treasury-factory.near/widget/pages.stake-delegation.CreateButton"] .option', + `div[data-component="${widgetsAccount}widgets.treasury-factory.near/widget/pages.stake-delegation.CreateButton"] .option`, { hasText: "Stake" } ) .first() @@ -908,9 +923,15 @@ test.describe("Lockup staking", function () { page, daoAccount, lockupContract, + instanceAccount, }) => { test.setTimeout(120_000); - await openLockupStakingForm({ page, daoAccount, lockupContract }); + await openLockupStakingForm({ + page, + daoAccount, + lockupContract, + instanceAccount, + }); await fillValidatorAccount({ page, }); @@ -1020,9 +1041,15 @@ test.describe("Lockup staking", function () { page, daoAccount, lockupContract, + instanceAccount, }) => { test.setTimeout(120_000); - await openLockupStakingForm({ page, daoAccount, lockupContract }); + await openLockupStakingForm({ + page, + daoAccount, + lockupContract, + instanceAccount, + }); await page.waitForTimeout(20_000); const poolSelector = page.locator(".custom-select").first(); await expect(poolSelector).toBeVisible({ timeout: 20_000 }); diff --git a/playwright-tests/tests/web4/web4.spec.js b/playwright-tests/tests/web4/web4.spec.js index ea13a8f2..286eeaad 100644 --- a/playwright-tests/tests/web4/web4.spec.js +++ b/playwright-tests/tests/web4/web4.spec.js @@ -18,10 +18,15 @@ test("should go directly to app widget for instance", async ({ await route.continue({ url: baseURL }); }); await page.goto(pageOrigin); + const widgetsAccount = + (instanceAccount.includes("testing") === true + ? "test-widgets" + : "widgets") + ".treasury-factory.near"; + await expect( await page .locator( - 'div[data-component="widgets.treasury-factory.near/widget/components.Navbar"]' + `div[data-component="${widgetsAccount}/widget/components.Navbar"]` ) .first() ).toContainText(daoAccount);