Skip to content

Commit 3d20905

Browse files
authored
Merge pull request #3926 from IntersectMBO/develop
Outcomes v1.5.3
2 parents b87b837 + 484b4d4 commit 3d20905

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

govtool/frontend/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

govtool/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@emotion/styled": "^11.11.0",
2828
"@emurgo/cardano-serialization-lib-asmjs": "^14.1.1",
2929
"@hookform/resolvers": "^3.3.1",
30-
"@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.2",
30+
"@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.3",
3131
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
3232
"@intersect.mbo/pdf-ui": "1.0.9-beta",
3333
"@mui/icons-material": "^5.14.3",

tests/govtool-frontend/playwright/tests/11-proposal-budget/proposalBudget.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,19 +247,22 @@ test("11E. Should view comments with count indications on a budget proposal", as
247247

248248
const actualTotalComments =
249249
await budgetDiscussionDetailsPage.totalComments.textContent();
250-
const expectedTotalComments =
251-
proposalResponse.data.attributes.prop_comments_number.toString();
250+
let expectedTotalComments =
251+
proposalResponse.data.attributes.prop_comments_number;
252252
const isEqual = actualTotalComments === expectedTotalComments;
253253

254254
const currentPageUrl = budgetDiscussionDetailsPage.currentPage.url();
255255

256256
const proposalId = extractProposalIdFromUrl(currentPageUrl);
257+
if (expectedTotalComments > 99) {
258+
expectedTotalComments = "99+";
259+
}
257260

258261
await expect(
259262
budgetDiscussionDetailsPage.totalComments,
260263
!isEqual &&
261264
`Total comments do not match in ${environments.frontendUrl}/budget_discussion/${proposalId}`
262-
).toHaveText(expectedTotalComments);
265+
).toHaveText(expectedTotalComments.toString());
263266
});
264267

265268
test.describe("Restricted access to interact budget proposal", () => {

tests/govtool-frontend/playwright/tests/8-proposal-discussion/proposalDiscussion.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,12 @@ test.describe("Mocked proposal", () => {
292292
});
293293

294294
test("8F. Should display all comments with count indication.", async () => {
295+
let commentCount = mockProposal.data.attributes.prop_comments_number;
296+
if (commentCount > 99) {
297+
commentCount = "99+";
298+
}
295299
await expect(proposalDiscussionDetailsPage.commentCount).toHaveText(
296-
mockProposal.data.attributes.prop_comments_number.toString(),
300+
commentCount.toString(),
297301
{ timeout: 60_000 }
298302
);
299303
});

0 commit comments

Comments
 (0)