-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1343 from IntersectMBO/develop
chore: add force rebuild images toggle to github actions
- Loading branch information
Showing
43 changed files
with
1,351 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM node:18-alpine as deps | ||
ARG NPMRC_TOKEN | ||
|
||
WORKDIR /src | ||
|
||
# Set npm configuration settings using environment variables | ||
RUN npm config set @intersect.mbo:registry "https://registry.npmjs.org/" --location=global \ | ||
&& npm config set //registry.npmjs.org/:_authToken ${NPMRC_TOKEN} --location=global | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
|
||
FROM node:18-alpine as builder | ||
ARG NPMRC_TOKEN | ||
ENV NODE_OPTIONS=--max_old_space_size=8192 | ||
WORKDIR /src | ||
|
||
COPY --from=deps /src/node_modules ./node_modules | ||
COPY . . | ||
|
||
RUN npm run build-storybook --quiet | ||
|
||
FROM nginx:stable-alpine | ||
EXPOSE 80 | ||
|
||
COPY --from=builder /src/storybook-static /usr/share/nginx/html | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"data": { | ||
"id": 128, | ||
"attributes": { | ||
"prop_likes": 0, | ||
"prop_dislikes": 0, | ||
"prop_comments_number": 3, | ||
"prop_submited": false, | ||
"prop_status_id": null, | ||
"user_id": "52", | ||
"createdAt": "2024-06-14T08:28:18.000Z", | ||
"updatedAt": "2024-06-14T08:28:18.000Z", | ||
"content": { | ||
"id": 121, | ||
"attributes": { | ||
"proposal_id": "128", | ||
"prop_rev_active": true, | ||
"prop_abstract": "Calamitas suppono coniuratio aiunt pecto uberrime deleniti tepidus acerbitas. Nihil vitium conservo abeo tametsi odit creator basium.", | ||
"prop_motivation": "Demonstro apparatus torrens patrocinor. Concedo campana possimus agnosco tutamen astrum conventus defendo sublime.", | ||
"prop_rationale": "Brevis suppellex coadunatio vis. Alii terreo carbo sono utilis vicissitudo.", | ||
"gov_action_type_id": "1", | ||
"prop_name": "Labadie, Stehr and Rosenbaum", | ||
"prop_receiving_address": "addr_test1qqqqqqqqqqa4kpmh", | ||
"prop_amount": 402, | ||
"createdAt": "2024-06-14T08:28:18.012Z", | ||
"updatedAt": "2024-06-14T08:28:18.012Z", | ||
"is_draft": false, | ||
"user_id": "52", | ||
"proposal_links": [], | ||
"gov_action_type": { | ||
"id": 1, | ||
"attributes": { | ||
"gov_action_type_name": "Info", | ||
"createdAt": "2024-05-27T15:06:15.640Z", | ||
"updatedAt": "2024-05-27T15:06:15.640Z" | ||
} | ||
} | ||
} | ||
}, | ||
"user_govtool_username": "Jett.Hagenes21" | ||
} | ||
}, | ||
"meta": {} | ||
} |
51 changes: 51 additions & 0 deletions
51
tests/govtool-frontend/playwright/lib/_mock/proposalComments.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"id": 139, | ||
"attributes": { | ||
"proposal_id": "128", | ||
"comment_parent_id": null, | ||
"user_id": "20", | ||
"comment_text": "Hello", | ||
"createdAt": "2024-06-14T13:38:35.830Z", | ||
"updatedAt": "2024-06-14T13:38:35.830Z", | ||
"user_govtool_username": "Anonymous", | ||
"subcommens_number": 0 | ||
} | ||
}, | ||
{ | ||
"id": 138, | ||
"attributes": { | ||
"proposal_id": "128", | ||
"comment_parent_id": null, | ||
"user_id": "20", | ||
"comment_text": "Nice proposal", | ||
"createdAt": "2024-06-14T13:38:31.279Z", | ||
"updatedAt": "2024-06-14T13:38:31.279Z", | ||
"user_govtool_username": "Anonymous", | ||
"subcommens_number": 0 | ||
} | ||
}, | ||
{ | ||
"id": 137, | ||
"attributes": { | ||
"proposal_id": "128", | ||
"comment_parent_id": null, | ||
"user_id": "20", | ||
"comment_text": "Go Ahead", | ||
"createdAt": "2024-06-14T13:38:27.286Z", | ||
"updatedAt": "2024-06-14T13:38:27.286Z", | ||
"user_govtool_username": "Anonymous", | ||
"subcommens_number": 0 | ||
} | ||
} | ||
], | ||
"meta": { | ||
"pagination": { | ||
"page": 1, | ||
"pageSize": 25, | ||
"pageCount": 1, | ||
"total": 3 | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/govtool-frontend/playwright/lib/_mock/proposalPoll.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"id": 39, | ||
"attributes": { | ||
"proposal_id": "128", | ||
"poll_yes": 0, | ||
"poll_no": 0, | ||
"poll_start_dt": "2024-06-14T08:26:34.400Z", | ||
"is_poll_active": true, | ||
"createdAt": "2024-06-14T08:28:20.210Z", | ||
"updatedAt": "2024-06-14T08:28:20.210Z" | ||
} | ||
} | ||
], | ||
"meta": { | ||
"pagination": { | ||
"page": 1, | ||
"pageSize": 1, | ||
"pageCount": 1, | ||
"total": 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/govtool-frontend/playwright/lib/fixtures/proposal.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { proposal01Wallet } from "@constants/staticWallets"; | ||
import { test as base } from "@fixtures/walletExtension"; | ||
import { createNewPageWithWallet } from "@helpers/page"; | ||
import ProposalDiscussionDetailsPage from "@pages/proposalDiscussionDetailsPage"; | ||
import ProposalDiscussionPage from "@pages/proposalDiscussionPage"; | ||
|
||
type TestOptions = { | ||
proposalId: number; | ||
pollEnabled: boolean; | ||
}; | ||
|
||
export const test = base.extend<TestOptions>({ | ||
pollEnabled: [false, { option: true }], | ||
|
||
proposalId: async ({ page, browser, pollEnabled }, use) => { | ||
// setup | ||
const proposalPage = await createNewPageWithWallet(browser, { | ||
storageState: ".auth/proposal01.json", | ||
wallet: proposal01Wallet, | ||
}); | ||
|
||
const proposalDiscussionPage = new ProposalDiscussionPage(proposalPage); | ||
await proposalDiscussionPage.goto(); | ||
const proposalId = await proposalDiscussionPage.createProposal(); | ||
const proposalDetailsPage = new ProposalDiscussionDetailsPage(proposalPage); | ||
|
||
if (pollEnabled) { | ||
await proposalDetailsPage.addPollBtn.click(); | ||
} | ||
|
||
await use(proposalId); | ||
|
||
// cleanup | ||
await proposalDetailsPage.goto(proposalId); | ||
await proposalDetailsPage.deleteProposal(); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
import { bech32 } from "bech32"; | ||
|
||
export function lovelaceToAda(lovelace: number) { | ||
if (lovelace === 0) return 0; | ||
|
||
return lovelace / 1e6; | ||
} | ||
|
||
export function generateWalletAddress() { | ||
const randomBytes = new Uint8Array(10); | ||
return bech32.encode("addr_test", randomBytes); | ||
} |
Oops, something went wrong.