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

Add chart to DAO dashboard #152

Merged
merged 16 commits into from
Dec 20, 2024
Prev Previous commit
Next Next commit
add e2e test for chart
rubycop committed Dec 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c550bcc285db345c2052e1d03a3174c67c22bb34
Original file line number Diff line number Diff line change
@@ -433,6 +433,7 @@ return (
style={{ height: "400px" }}
>
<iframe
className="chart"
style={{ width: "100%", height: `${height}px` }}
srcDoc={code}
message={{ account_id, history }}
13 changes: 12 additions & 1 deletion playwright-tests/tests/dashboard.treasury-devdao.near.spec.js
Original file line number Diff line number Diff line change
@@ -8,7 +8,18 @@ test.afterEach(async ({ page }, testInfo) => {

test("should go to trustees dashboard", async ({ page, instanceAccount }) => {
await page.goto(`/${instanceAccount}/widget/app?page=dashboard`);

await expect(
await page.locator("div.h3").filter({ hasText: "Dashboard" })
).toBeVisible();

await expect(
await page.getByRole("heading", { name: "Dashboard" })
await page.getByText("Treasury Assets: Sputnik DAO")
).toBeVisible();

await expect(await page.locator("iframe.chart")).toBeVisible();
await page.mouse.move(600, 500);
await page.mouse.move(1000, 500);

await page.locator("div[role='button']").filter({ hasText: "1H" }).click();
});