Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
75ef1ac
init new feature request template per @m-i-k-e's suggestion
Ryun1 Mar 4, 2025
d5f5d54
fix: test 8E due to mock data
kneerose Apr 2, 2025
1420843
fix: update mock proposal comments to include bd_proposal_id and comm…
kneerose Apr 2, 2025
d4afa4d
chore: format mock comments
kneerose Apr 2, 2025
0a27d04
fix: update proposal submission test to use exact text match for prop…
kneerose Apr 3, 2025
c1d868b
Merge pull request #3350 from IntersectMBO/fix/test-8E-8F
kneerose Apr 3, 2025
a227568
chore: update @intersect.mbo/pdf-ui to 0.7.0-beta-10
github-actions[bot] Apr 3, 2025
fff6945
Merge pull request #3368 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Apr 3, 2025
3976a60
Merge pull request #3369 from IntersectMBO/develop
bosko-m Apr 3, 2025
4e6abcb
chore: update @intersect.mbo/pdf-ui to 0.7.0-beta-11
github-actions[bot] Apr 3, 2025
8e02245
Merge pull request #3370 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Apr 3, 2025
728e6e5
add back original template
Ryun1 Apr 3, 2025
e0ad457
align template
Ryun1 Apr 3, 2025
560c7b2
fix: add identifiers to drep voting power query keys
MSzalowski Apr 3, 2025
36de983
Merge pull request #3372 from IntersectMBO/fix/drep-voting-power-iden…
MSzalowski Apr 3, 2025
1fec73f
Merge pull request #3135 from IntersectMBO/feat/improve-feature-reque…
MSzalowski Apr 3, 2025
a57ac5a
Merge pull request #3373 from IntersectMBO/develop
MSzalowski Apr 3, 2025
7c9c192
Merge pull request #3374 from IntersectMBO/test
MSzalowski Apr 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_idea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ body:
placeholder: |
As a [ada holder | DRep | Direct voter], I want [some goal] so that [some reason].
validations:
required: false
required: false
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_idea_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature Suggestion
description: Suggest a new feature or enhancement for GovTool.
labels: ["Feature Request", "Needs UX Review"]
body:
- type: markdown
attributes:
value:
Please fill out the following details.
- type: textarea
id: problem-statement
attributes:
label: "💡 Suggestion or feature"
description: "Please describe the user need, idea, or pain point."
placeholder: "Example: Users would benefit from having X functionality, so they can do Y..."
validations:
required: true
- type: textarea
id: user-impact
attributes:
label: "Who does this help?"
description: "Which users will benefit from this feature? How does it improve their experience?"
placeholder: "Example: This feature will help first-time users onboard faster..."
validations:
required: true
- type: textarea
id: dependencies
attributes:
label: "How might we do this?"
description: "Suggestions on implementation"
placeholder: "Example: Add a button that says GO to the home page"
validations:
required: false
- type: textarea
id: other-info
attributes:
label: "Anything else you might want to add?"
description: "Free text box for any comments"
placeholder: "I love GovTool, and so does my dog!"
validations:
required: false
8 changes: 4 additions & 4 deletions govtool/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion govtool/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@hookform/resolvers": "^3.3.1",
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.3.0",
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
"@intersect.mbo/pdf-ui": "0.7.0-beta-8",
"@intersect.mbo/pdf-ui": "0.7.0-beta-11",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.4",
"@rollup/plugin-babel": "^6.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export const useGetDRepVotingPowerList = () => {
enabled: false,
});

const fetchDRepVotingPowerList = async (identifiers: string[]) =>
const fetchDRepVotingPowerList = async (identifiers: string[] = []) =>
queryClient.fetchQuery({
queryKey: [QUERY_KEYS.useGetDRepVotingPowerListKey],
queryKey: [QUERY_KEYS.useGetDRepVotingPowerListKey, ...identifiers],
queryFn: () => getDRepVotingPowerList(identifiers),
});

Expand Down
8 changes: 4 additions & 4 deletions govtool/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1512,10 +1512,10 @@
resolved "https://registry.npmjs.org/@intersect.mbo/intersectmbo.org-icons-set/-/intersectmbo.org-icons-set-1.1.0.tgz"
integrity sha512-sjKEtnK9eLYH/8kCD0YRQCms3byFA/tnSsei9NHTZbBYX9sBpeX6ErfR0sKYjOSxQOxl4FumX9D0X+vHIqxo8g==

"@intersect.mbo/pdf-ui@0.7.0-beta-8":
version "0.7.0-beta-8"
resolved "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-0.7.0-beta-8.tgz"
integrity sha512-xBd8rl2qC+T5/rHAkDYdD63FoZi84E3LoiVkUZceRzlUcu3/6Ycia8BOzMszS+S9eLPHzYHO6HXy9dOqTObysg==
"@intersect.mbo/pdf-ui@0.7.0-beta-11":
version "0.7.0-beta-11"
resolved "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-0.7.0-beta-11.tgz"
integrity sha512-amFT8stsOFMeFZjoTsCpUguUi2d/tlMZ4G/ARud1ewrRfjDvu6PJhGYlGl2gZBGa75GgvNM27hfEbzv7MDOInA==
dependencies:
"@emurgo/cardano-serialization-lib-asmjs" "^12.0.0-beta.2"
"@fontsource/poppins" "^5.0.14"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"comment_text": "Hello",
"createdAt": "2024-06-14T13:38:35.830Z",
"updatedAt": "2024-06-14T13:38:35.830Z",
"bd_proposal_id": null,
"comments_reports": {
"data": []
},
"user_govtool_username": "Anonymous",
"subcommens_number": 0
}
Expand All @@ -22,6 +26,10 @@
"comment_text": "Nice proposal",
"createdAt": "2024-06-14T13:38:31.279Z",
"updatedAt": "2024-06-14T13:38:31.279Z",
"bd_proposal_id": null,
"comments_reports": {
"data": []
},
"user_govtool_username": "Anonymous",
"subcommens_number": 0
}
Expand All @@ -35,6 +43,10 @@
"comment_text": "Go Ahead",
"createdAt": "2024-06-14T13:38:27.286Z",
"updatedAt": "2024-06-14T13:38:27.286Z",
"bd_proposal_id": null,
"comments_reports": {
"data": []
},
"user_govtool_username": "Anonymous",
"subcommens_number": 0
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test.describe("Proposal created logged state", () => {
await page.goto("/");
await page.getByTestId("proposal-discussion-link").click();

await expect(page.getByText(/proposals/i)).toHaveCount(2);
await expect(page.getByText("Proposals", { exact: true })).toHaveCount(2);
});

test.describe("Accept valid data", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { test } from "@fixtures/proposal";
import { setAllureEpic } from "@helpers/allure";
import { isBootStrapingPhase, skipIfNotHardFork } from "@helpers/cardano";
import { injectLogger } from "@helpers/page";
import { extractProposalIdFromUrl } from "@helpers/string";
import { functionWaitedAssert } from "@helpers/waitedLoop";
import ProposalDiscussionDetailsPage from "@pages/proposalDiscussionDetailsPage";
import ProposalDiscussionPage from "@pages/proposalDiscussionPage";
Expand Down Expand Up @@ -195,6 +196,31 @@ test("8S. Should restrict proposal creation on disconnected state", async ({
await expect(proposalDiscussionPage.proposalCreateBtn).not.toBeVisible();
});

test("8E. Should share proposed governance action", async ({
page,
context,
}) => {
await context.grantPermissions(["clipboard-read", "clipboard-write"]);
const proposalDiscussionPage = new ProposalDiscussionPage(page);
await proposalDiscussionPage.goto();

await proposalDiscussionPage.viewFirstProposal();

const currentPageUrl = page.url();
const proposalId = extractProposalIdFromUrl(currentPageUrl);

await page.getByTestId("share-button").click();
await page.getByTestId("copy-link").click();
await expect(page.getByTestId("copy-link-text")).toBeVisible();

const copiedTextDRepDirectory = await page.evaluate(() =>
navigator.clipboard.readText()
);
const expectedCopyUrl = `${environments.frontendUrl}/proposal_discussion/${proposalId}`;

expect(copiedTextDRepDirectory).toEqual(expectedCopyUrl);
});

test.describe("Mocked proposal", () => {
let proposalDiscussionDetailsPage: ProposalDiscussionDetailsPage;

Expand All @@ -221,24 +247,6 @@ test.describe("Mocked proposal", () => {
await proposalDiscussionDetailsPage.goto(mockProposal.data.id);
});

test("8E. Should share proposed governance action", async ({
page,
context,
}) => {
await context.grantPermissions(["clipboard-read", "clipboard-write"]);

await page.getByTestId("share-button").click();
await page.getByTestId("copy-link").click();
await expect(page.getByTestId("copy-link-text")).toBeVisible();

const copiedTextDRepDirectory = await page.evaluate(() =>
navigator.clipboard.readText()
);
const expectedCopyUrl = `${environments.frontendUrl}/proposal_discussion/${mockProposal.data.id}`;

expect(copiedTextDRepDirectory).toEqual(expectedCopyUrl);
});

test("8I. Should disable poll voting functionality.", async () => {
await expect(proposalDiscussionDetailsPage.pollVoteCard).not.toBeVisible();
await expect(proposalDiscussionDetailsPage.pollYesBtn).not.toBeVisible();
Expand Down