Skip to content

Commit

Permalink
fixing build
Browse files Browse the repository at this point in the history
  • Loading branch information
gnomadic committed Oct 8, 2024
1 parent 388900c commit 12779c0
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 41 deletions.
1 change: 1 addition & 0 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"url": "^0.11.0",
"verify-env": "workspace:*",
"viem": "^2.13.10",
"wagmi": "2.10.2",
"web-vitals": "^2.1.4",
"yup": "^0.32.11",
"zod": "^3.22.4"
Expand Down
82 changes: 41 additions & 41 deletions packages/builder/src/__tests__/components/grants/Details.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,47 +73,47 @@ _italic text_
});

describe("credential verification badge", () => {
// test("should show two verification badges", async () => {
// const store = setupStore();
// const twitterHandle = "my-twitter-handle";
// const twitterVC = buildVerifiableCredential("Twitter", twitterHandle);
// twitterVC.issuer = IAM_SERVER;

// const githubHandle = "github-org-handle";
// const githubVC = buildVerifiableCredential("GithubOrg", githubHandle);
// githubVC.issuer = IAM_SERVER;

// const project = buildProjectMetadata({
// projectTwitter: twitterHandle,
// projectGithub: githubHandle,
// credentials: {
// twitter: twitterVC,
// github: githubVC,
// },
// });

// const verifyCredentialMock = jest.fn();
// verifyCredentialMock.mockReturnValue(true);
// PassportVerifierWithExpiration.prototype.verifyCredential =
// verifyCredentialMock;

// await act(async () => {
// renderWrapped(
// <Details
// project={project}
// createdAt={new Date().getTime()}
// updatedAt={new Date().getTime()}
// bannerImg="img"
// logoImg="img"
// showApplications={false}
// showTabs
// />,
// store
// );
// });

// expect((await screen.findAllByText("Verified")).length).toBe(2);
// });
test("should show two verification badges", async () => {
const store = setupStore();
const twitterHandle = "my-twitter-handle";
const twitterVC = buildVerifiableCredential("Twitter", twitterHandle);
twitterVC.issuer = IAM_SERVER;

const githubHandle = "github-org-handle";
const githubVC = buildVerifiableCredential("GithubOrg", githubHandle);
githubVC.issuer = IAM_SERVER;

const project = buildProjectMetadata({
projectTwitter: twitterHandle,
projectGithub: githubHandle,
credentials: {
twitter: twitterVC,
github: githubVC,
},
});

const verifyCredentialMock = jest.fn();
verifyCredentialMock.mockReturnValue(true);
PassportVerifierWithExpiration.prototype.verifyCredential =
verifyCredentialMock;

await act(async () => {
renderWrapped(
<Details
project={project}
createdAt={new Date().getTime()}
updatedAt={new Date().getTime()}
bannerImg="img"
logoImg="img"
showApplications={false}
showTabs
/>,
store
);
});

expect((await screen.findAllByText("Verified")).length).toBe(2);
});
test("should show one verification badge", async () => {
const store = setupStore();
const twitterHandle = "my-twitter-handle";
Expand Down
1 change: 1 addition & 0 deletions packages/grant-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"util": "^0.12.4",
"verify-env": "workspace:*",
"viem": "2.13.10",
"wagmi": "2.10.2",
"web-vitals": "^2.1.0",
"zod": "^3.22.4",
"zustand": "^4.4.0"
Expand Down
1 change: 1 addition & 0 deletions packages/round-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"uuid": "^9.0.1",
"verify-env": "workspace:*",
"viem": "2.13.10",
"wagmi": "2.10.2",
"web-vitals": "^2.1.0",
"yup": "^0.32.11",
"zustand": "^4.4.0"
Expand Down

0 comments on commit 12779c0

Please sign in to comment.