From 11b27e2a32ab391b1993ac9df429aabc25004dd6 Mon Sep 17 00:00:00 2001
From: Peter Salomonsen
-
Id | -Description | -Submission date | -Current expiry | -New expiry | -
---|---|---|---|---|
{proposal.id} | -{proposal.description} | -- {new Date(proposal.submissionTimeMillis) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -- {new Date(proposal.currentExpiryTime) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -- {new Date(proposal.newExpiryTime) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -
+ You are about to update the voting duration. This will affect + the following existing requests. +
+Id | +Description | +Submission date | +Current expiry | +New expiry | +
---|---|---|---|---|
{proposal.id} | +{proposal.description} | ++ {new Date(proposal.submissionTimeMillis) + .toJSON() + .substring(0, "yyyy-mm-dd".length)} + | ++ {new Date(proposal.currentExpiryTime) + .toJSON() + .substring(0, "yyyy-mm-dd".length)} + | ++ {new Date(proposal.newExpiryTime) + .toJSON() + .substring(0, "yyyy-mm-dd".length)} + | +
+ If you do not want expired proposals to be open for voting again, you may need to delete them. +
: ""}- If you do not want expired proposals to be open for voting again, you may need to delete them. -
: ""} + {proposalsThatWillBeActive.length > 0 ? ( ++ If you do not want expired proposals to be open for voting + again, you may need to delete them. +
+ ) : ( + "" + )}Id | -Description | -Submission date | -Current expiry | -New expiry | -|||||
---|---|---|---|---|---|---|---|---|---|
{proposal.id} | -{proposal.description} | -- {new Date(proposal.submissionTimeMillis) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -- {new Date(proposal.currentExpiryTime) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -- {new Date(proposal.newExpiryTime) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -|||||
{proposal.id} | -{proposal.description} | -- {new Date(proposal.submissionTimeMillis) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -- {new Date(proposal.currentExpiryTime) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | -- {new Date(proposal.newExpiryTime) - .toJSON() - .substring(0, "yyyy-mm-dd".length)} - | + {showImpactedRequests ? ( +
Id | +Description | +Submission date | +Current expiry | +New expiry |
---|
If you do not want expired proposals to be open for voting
diff --git a/playwright-tests/tests/settings/voting-duration.spec.js b/playwright-tests/tests/settings/voting-duration.spec.js
index 13de426a..e3fcee0f 100644
--- a/playwright-tests/tests/settings/voting-duration.spec.js
+++ b/playwright-tests/tests/settings/voting-duration.spec.js
@@ -65,6 +65,10 @@ test.describe("admin connected", function () {
await page.waitForTimeout(500);
await page.locator("button", { hasText: "Submit" }).click();
+ await page
+ .locator(".modalfooter button", { hasText: "Yes, proceed" })
+ .click();
+
await expect(await getTransactionModalObject(page)).toEqual({
proposal: {
description: "Change proposal period",
@@ -126,6 +130,7 @@ test.describe("admin connected", function () {
instanceAccount,
daoAccount,
}) => {
+ test.setTimeout(60_000);
const daoName = daoAccount.split(".")[0];
const sandbox = new SandboxRPC();
@@ -166,6 +171,10 @@ test.describe("admin connected", function () {
await page.waitForTimeout(500);
await page.locator("button", { hasText: "Submit" }).click();
+ await page
+ .locator(".modalfooter button", { hasText: "Yes, proceed" })
+ .click();
+
const transactionToSendPromise = page.evaluate(async () => {
const selector = await document.querySelector("near-social-viewer")
.selectorPromise;
From 68814ff1b01188970e298721397344ae39d1d3aa Mon Sep 17 00:00:00 2001
From: Peter Salomonsen
- Changing the voting duration will affect the status of some
- requests
+
+ Impact of changing voting duration
{otherPendingRequests.length > 0 ? (
{showImpactedRequests ? (
-
{otherPendingRequests.length} pending requests will
now follow the new voting duration policy.
-
- {proposalsThatWillExpire.length} active requests
- {" "}
+ {proposalsThatWillExpire.length} active requests{" "}
under the old voting duration will move to the "Archived"
tab and close for voting. These requests were created
outside the new voting period and are no longer considered
@@ -385,11 +379,7 @@ return (
)}
{proposalsThatWillBeActive.length > 0 ? (
-
- {proposalsThatWillBeActive.length} expired requests
- {" "}
+ {proposalsThatWillBeActive.length} expired requests{" "}
under the old voting duration will move back to the
"Pending Requests" tab and reopen for voting. These
requests were created within the new voting period and are
@@ -398,64 +388,66 @@ return (
) : (
""
)}
- {showImpactedRequests ?
-
-
+ >
) : (
""
)}
diff --git a/playwright-tests/tests/settings/voting-duration.spec.js b/playwright-tests/tests/settings/voting-duration.spec.js
index e3fcee0f..3c3f844b 100644
--- a/playwright-tests/tests/settings/voting-duration.spec.js
+++ b/playwright-tests/tests/settings/voting-duration.spec.js
@@ -354,18 +354,18 @@ test.describe("admin connected", function () {
if (expectedUnaffectedActiveProposals.length > 0) {
await expect(
page.getByText(
- `Pending requests: ${expectedUnaffectedActiveProposals.length} pending`
+ `${expectedUnaffectedActiveProposals.length} pending requests`
)
).toBeVisible();
}
if (expectedNewExpiredProposals.length > 0) {
await expect(
await page.getByText(
- `Active requests: ${expectedNewExpiredProposals.length} active`
+ `${expectedNewExpiredProposals.length} active requests`
)
).toBeVisible();
await expect(
- page.getByRole("heading", { name: "Changing the voting duration" })
+ page.getByRole("heading", { name: "Impact of changing voting duration" })
).toBeVisible();
await expect(
await page.locator(".proposal-that-will-expire")
@@ -382,16 +382,16 @@ test.describe("admin connected", function () {
.locator(".modalfooter button", { hasText: "Cancel" })
.click();
await expect(
- page.getByRole("heading", { name: "Changing the voting duration" })
+ page.getByRole("heading", { name: "Impact of changing voting duration" })
).not.toBeVisible();
} else if (expectedNewActiveProposals.length > 0) {
await expect(
await page.getByText(
- `Expired requests: ${expectedNewActiveProposals.length} expired`
+ `${expectedNewActiveProposals.length} expired`
)
).toBeVisible();
await expect(
- page.getByRole("heading", { name: "Changing the voting duration" })
+ page.getByRole("heading", { name: "Impact of changing voting duration" })
).toBeVisible();
await expect(
await page.locator(".proposal-that-will-be-active")
@@ -406,7 +406,7 @@ test.describe("admin connected", function () {
.locator(".modalfooter button", { hasText: "Cancel" })
.click();
await expect(
- page.getByRole("heading", { name: "Changing the voting duration" })
+ page.getByRole("heading", { name: "Impact of changing voting duration" })
).not.toBeVisible();
} else {
await expect(
From f0b11b34bed79f545e4e22e619975dbb92d4e628 Mon Sep 17 00:00:00 2001
From: Peter Salomonsen
-
-
-
- {proposalsThatWillExpire.map((proposal) => (
- Id
- Description
- Submission date
- Current expiry
- New expiry
-
-
+ {proposalsThatWillExpire.map((proposal) => (
+ {proposal.id}
- {proposal.description}
-
- {new Date(proposal.submissionTimeMillis)
- .toJSON()
- .substring(0, "yyyy-mm-dd".length)}
-
-
- {new Date(proposal.currentExpiryTime)
- .toJSON()
- .substring(0, "yyyy-mm-dd".length)}
-
-
- {new Date(proposal.newExpiryTime)
- .toJSON()
- .substring(0, "yyyy-mm-dd".length)}
-
+ <>
+ Summary of changes
+
+
+
+
+
+
- ))}
- {proposalsThatWillBeActive.map((proposal) => (
- Id
+ Description
+ Submission date
+ Current expiry
+ New expiry
-
- ))}
-
- {proposal.id}
- {proposal.description}
-
- {new Date(proposal.submissionTimeMillis)
- .toJSON()
- .substring(0, "yyyy-mm-dd".length)}
-
-
- {new Date(proposal.currentExpiryTime)
- .toJSON()
- .substring(0, "yyyy-mm-dd".length)}
-
-
- {new Date(proposal.newExpiryTime)
- .toJSON()
- .substring(0, "yyyy-mm-dd".length)}
-
-
+
+ ))}
+ {proposalsThatWillBeActive.map((proposal) => (
+ {proposal.id}
+ {proposal.description}
+
+ {new Date(proposal.submissionTimeMillis)
+ .toJSON()
+ .substring(0, "yyyy-mm-dd".length)}
+
+
+ {new Date(proposal.currentExpiryTime)
+ .toJSON()
+ .substring(0, "yyyy-mm-dd".length)}
+
+
+ {new Date(proposal.newExpiryTime)
+ .toJSON()
+ .substring(0, "yyyy-mm-dd".length)}
+
+
+
+ ))}
+
+ {proposal.id}
+ {proposal.description}
+
+ {new Date(proposal.submissionTimeMillis)
+ .toJSON()
+ .substring(0, "yyyy-mm-dd".length)}
+
+
+ {new Date(proposal.currentExpiryTime)
+ .toJSON()
+ .substring(0, "yyyy-mm-dd".length)}
+
+
+ {new Date(proposal.newExpiryTime)
+ .toJSON()
+ .substring(0, "yyyy-mm-dd".length)}
+
+