Skip to content

Commit

Permalink
feat: custom dashboards (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Dec 11, 2024
1 parent e8bbe56 commit 515dc6a
Show file tree
Hide file tree
Showing 89 changed files with 11,477 additions and 2,443 deletions.
6 changes: 3 additions & 3 deletions e2e/auth.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { deleteOrg, populateLogs } from "./utils/db";
const authFile = "e2e/.auth/user.json";

test.beforeAll(async () => {
test.slow();
// Sometimes the teardown isn't called, so we need to clean up the database before running the tests
await deleteOrg();
});

test("signup flow", async ({ page }) => {
test.slow();
await page.goto("/");

await page.getByRole("link", { name: "Sign Up" }).click();
Expand All @@ -27,9 +29,7 @@ test("signup flow", async ({ page }) => {

await page.getByTestId("continue-button").click();

await page.waitForURL("**/analytics");

await expect(page.getByRole("heading", { name: "Welcome" })).toBeVisible();
await page.waitForURL("**/dashboards*");

await page.context().storageState({ path: authFile });

Expand Down
9 changes: 5 additions & 4 deletions e2e/global.teardown.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { test } from "@playwright/test"
import { deleteOrg } from "./utils/db"
import { test } from "@playwright/test";
import { deleteOrg } from "./utils/db";

test("clean up database", async ({}) => {
await deleteOrg()
})
test.slow();
await deleteOrg();
});
2 changes: 1 addition & 1 deletion e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ test("logout and back in login", async ({ page }) => {

await page.getByRole("button", { name: "Login" }).click();

await page.waitForURL("**/analytics*");
await page.waitForURL("**/dashboards*");
});
2 changes: 1 addition & 1 deletion e2e/projects.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ test("create new project, rename it and delete it", async ({ page }) => {
// await page.getByTestId("delete-project-popover-button").click();

// If the project was deleted successfully, it redirects to the analytics page
// await page.waitForURL("**/analytics");
// await page.waitForURL("**/dashboards");
});
1,569 changes: 848 additions & 721 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "lunary",
"version": "1.0.0",
"private": "true",
"scripts": {
"start": "concurrently -n frontend,backend \"npm run start:frontend\" \"npm run start:backend\"",
Expand All @@ -15,23 +14,24 @@
"dev:backend": "npm -w packages/backend run dev",
"test": "npx playwright test",
"test:ui": "npx playwright test --ui",
"postinstall": "npx patch-package"
"postinstall": "npx patch-package",
"clean": "rm -rf package-lock.json && rm -rf node_modules && rm -rf packages/frontend/node_modules && rm -rf packages/backend/node_modules && rm -rf packages/frontend/.next"
},
"workspaces": [
"packages/*"
],
"dependencies": {
"concurrently": "^8.2.2",
"concurrently": "^9.1.0",
"patch-package": "^8.0.0"
},
"devDependencies": {
"@playwright/test": "^1.47.0",
"@types/node": "^22.5.4",
"@playwright/test": "^1.49.0",
"@types/node": "^22.10.0",
"dotenv": "^16.4.5",
"json-2-csv": "^5.5.6",
"prettier": "^3.3.3",
"tsup": "^8.2.4",
"tsx": "^4.19.0",
"typescript": "^5.5.4"
"json-2-csv": "^5.5.7",
"prettier": "^3.4.1",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"koa-logger": "^3.2.1",
"koa-ratelimit": "^5.1.0",
"koa-router": "^12.0.1",
"lunary": "^0.7.2",
"lunary": "^0.7.15",
"node-cron": "^3.0.3",
"nodemailer": "^6.9.15",
"openai": "^4.28.4",
Expand Down
Loading

0 comments on commit 515dc6a

Please sign in to comment.