Skip to content

Commit

Permalink
chore: Add type for ProposalCreateRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
NabinKawan committed Jul 3, 2024
1 parent db60f0f commit 20f1b63
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { faker } from "@faker-js/faker";
import { generateWalletAddress } from "@helpers/cardano";
import { extractProposalIdFromUrl } from "@helpers/string";
import { Page } from "@playwright/test";
import { ProposalCreateRequest } from "@services/proposalDiscussion/types";
import environments from "lib/constants/environments";
import ProposalDiscussionDetailsPage from "./proposalDiscussionDetailsPage";
import {ProposalCreateRequest} from "@types";

export default class ProposalDiscussionPage {
// Buttons
Expand All @@ -24,6 +24,9 @@ export default class ProposalDiscussionPage {
readonly showLessBtn = this.page.getByRole("button", { name: "Show less" });
readonly infoRadio = this.page.getByLabel("Info");
readonly treasuryRadio = this.page.getByLabel("Treasury");
readonly verifyIdentityBtn = this.page.getByRole("button", {
name: "Verify your identity",
});

constructor(private readonly page: Page) {}

Expand Down
18 changes: 18 additions & 0 deletions tests/govtool-frontend/playwright/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,21 @@ export type CommentResponse = {
subcommens_number: number;
};
};


export type ProposalLink = {
prop_link: string;
prop_link_text: string;
};

export type ProposalCreateRequest = {
proposal_links: Array<ProposalLink>;
gov_action_type_id: number;
prop_name: string;
prop_abstract: string;
prop_motivation: string;
prop_rationale: string;
prop_receiving_address?: string;
prop_amount?: string;
is_draft: boolean;
};

0 comments on commit 20f1b63

Please sign in to comment.