Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/drep ga missing test ids #1394

Merged
merged 3 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ export default class DRepDirectoryPage {
"signal-no-confidence-on-every-vote-info-button"
);

readonly automaticDelegationOptionsDropdown = this.page.getByRole("button", {
name: "Automated Voting Options arrow",
}); // BUG: testId -> delegation-options-dropdown
readonly automaticDelegationOptionsDropdown = this.page.getByTestId(
"automated-voting-options-accordion"
);

readonly delegateToDRepCard = this.page.getByTestId("delegate-to-drep-card");
readonly signalNoConfidenceCard = this.page
.getByRole("region")
.locator("div")
.filter({ hasText: "Signal No Confidence on Every" })
.nth(2); // BUG: testId -> signal-no-confidence-card
readonly abstainDelegationCard = this.page.getByText(
"Abstain from Every VoteSelect this to vote ABSTAIN to every vote.Voting Power₳"
); // BUG: testId -> abstain-delegation-card
readonly signalNoConfidenceCard = this.page.getByTestId(
"no-confidence-delegation-card"
);
readonly abstainDelegationCard = this.page.getByTestId(
"abstain-delegation-card"
);

readonly delegationErrorModal = this.page.getByTestId(
"delegate-transaction-error-modal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ export default class GovernanceActionDetailsPage {
readonly externalModalBtn = this.page.getByTestId("external-modal-button");
readonly governanceActionId = this.page.getByText("Governance Action ID:");

readonly contextBtn = this.page.getByRole("button", {
name: "Provide context about your",
}); // BUG testId
readonly contextBtn = this.page.getByTestId("provide-context-button");
readonly viewOtherDetailsLink = this.page.getByTestId(
"view-other-details-button"
);
Expand Down Expand Up @@ -59,14 +57,14 @@ export default class GovernanceActionDetailsPage {

this.page
.getByRole("button", { name: "download Vote_Context.jsonld" })
.click();
.click(); // BUG missing test id
const voteMetadata = await this.downloadVoteMetadata();
const url = await metadataBucketService.uploadMetadata(
voteMetadata.name,
voteMetadata.data
);

await this.page.getByPlaceholder("URL").fill(url);
await this.page.getByPlaceholder("URL").fill(url); // Bug showing data-testid="undefinedinput" on url
await this.confirmModalBtn.click();
await this.page.getByTestId("go-to-vote-modal-button").click();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ test.describe("Logged in DReps", () => {

await expect(page.getByTestId("voting-power-chips")).toBeVisible();

await expect(page.getByTestId("dRep-id-display")).toContainText(
dRep01Wallet.dRepId
); // BUG: testId -> dRep-id-display-dashboard (It is taking sidebar dRep-id)
await expect(
page.getByTestId("dRep-id-display-card-dashboard")
).toContainText(dRep01Wallet.dRepId);

await page.goto(`${environments.frontendUrl}/governance_actions`);
await page
Expand Down Expand Up @@ -63,7 +63,7 @@ test.describe("Logged in DReps", () => {
dRepMetadata.data
);

await page.getByPlaceholder("URL").fill(url);
await page.getByTestId("metadata-url-input").fill(url);
await page.getByTestId("continue-button").click(); // BUG -> incorrect test id
await page.getByTestId("confirm-modal-button").click();

Expand Down