From b40ab3febb6aaf6ab06d02deff6dfb28fd8286cd Mon Sep 17 00:00:00 2001 From: Niraj Date: Mon, 28 Oct 2024 15:38:29 +0545 Subject: [PATCH] chore: update test ids of metadata download and url of govAction details page --- .../lib/pages/governanceActionDetailsPage.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/govtool-frontend/playwright/lib/pages/governanceActionDetailsPage.ts b/tests/govtool-frontend/playwright/lib/pages/governanceActionDetailsPage.ts index 3508c39e9..600d8818f 100644 --- a/tests/govtool-frontend/playwright/lib/pages/governanceActionDetailsPage.ts +++ b/tests/govtool-frontend/playwright/lib/pages/governanceActionDetailsPage.ts @@ -21,6 +21,9 @@ export default class GovernanceActionDetailsPage { readonly governanceActionId = this.page.getByText("Governance Action ID:"); readonly contextBtn = this.page.getByTestId("provide-context-button"); + readonly metadataDownloadBtn = this.page.getByTestId( + "metadata-download-button" + ); readonly viewOtherDetailsLink = this.page.getByTestId( "view-other-details-button" ); @@ -31,6 +34,7 @@ export default class GovernanceActionDetailsPage { readonly externalLinkModal = this.page.getByTestId("external-link-modal"); readonly contextInput = this.page.getByTestId("provide-context-input"); + readonly metadataUrlInput = this.page.getByTestId("metadata-url-input"); readonly cancelModalBtn = this.page.getByTestId("cancel-modal-button"); readonly dRepYesVotes = this.page.getByTestId("submitted-votes-dReps-yes"); @@ -78,16 +82,14 @@ export default class GovernanceActionDetailsPage { await this.page.getByRole("checkbox").click(); await this.confirmModalBtn.click(); - this.page - .getByRole("button", { name: "download Vote_Context.jsonld" }) - .click(); // BUG missing test id + this.metadataDownloadBtn.click(); const voteMetadata = await this.downloadVoteMetadata(); const url = await metadataBucketService.uploadMetadata( voteMetadata.name, voteMetadata.data ); - await this.page.getByPlaceholder("URL").fill(url); // Bug showing data-testid="undefinedinput" on url + await this.metadataUrlInput.fill(url); await this.confirmModalBtn.click(); await this.page.getByTestId("go-to-vote-modal-button").click(); }