Skip to content

Commit

Permalink
chore: update test ids of metadata download and url of govAction deta…
Browse files Browse the repository at this point in the history
…ils page
  • Loading branch information
kneerose committed Oct 28, 2024
1 parent 6509cd8 commit b40ab3f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
Expand All @@ -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");
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit b40ab3f

Please sign in to comment.