Skip to content

Commit

Permalink
Feat: Add Unit Tests (4) (#48)
Browse files Browse the repository at this point in the history
* Create test stubs for orders endpoints

* Add tests for unauthorized access for orders GET endpoints

* Commit more progress

* Add helper function to extract hx-post value from input element on
create order

* FIx issue with safe attribute on label affecting inventory items checkbox css

* Fix prettier formatting to only run on source and tests

* Fix tests broken by correctly removing safe from top component inorder creation

* Fix flaky tests
  • Loading branch information
nigelnindodev authored Mar 22, 2024
1 parent 1b6fb90 commit 89fe66a
Show file tree
Hide file tree
Showing 15 changed files with 1,106 additions and 6,441 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build": "tsc",
"dev": "bun run --watch src/index.ts",
"format": "bun run prettier . --write",
"format": "cd src && bun run prettier . --write && cd .. && cd test && bun run prettier . --write",
"setup-run-test": "bun run setup_and_run_tests.ts",
"test": "source .env.test && bun test",
"test-run-server": "source .env.test && bun run --watch src/index.ts"
Expand All @@ -28,12 +28,14 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@babel/eslint-parser": "^7.23.10",
"@types/bun": "^1.0.3",
"autoprefixer": "^10.4.17",
"bun-types": "latest",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"typescript": "^5.4.2",
"vite": "^5.1.4"
"typescript-eslint": "^7.3.0"
},
"module": "src/index.ts"
}
42 changes: 21 additions & 21 deletions public/custom.css
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
.center {
display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: center;
align-items: center;
}

/* Teal Light scheme (Default) */
/* Can be forced with data-theme="light" */
[data-theme="light"],
:root:not([data-theme="dark"]) {
--primary: #00897b;
--primary-hover: #00796b;
--primary-focus: rgba(0, 137, 123, 0.125);
--primary-inverse: #fff;
--primary: #00897b;
--primary-hover: #00796b;
--primary-focus: rgba(0, 137, 123, 0.125);
--primary-inverse: #FFF;
}

/* Teal Dark scheme (Auto) */
/* Automatically enabled if user has Dark mode enabled */
@media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme]) {
--primary: #00897b;
--primary-hover: #009688;
--primary-focus: rgba(0, 137, 123, 0.25);
--primary-inverse: #fff;
}
:root:not([data-theme]) {
--primary: #00897b;
--primary-hover: #009688;
--primary-focus: rgba(0, 137, 123, 0.25);
--primary-inverse: #FFF;
}
}

/* Teal Dark scheme (Forced) */
/* Enabled if forced with data-theme="dark" */
[data-theme="dark"] {
--primary: #00897b;
--primary-hover: #009688;
--primary-focus: rgba(0, 137, 123, 0.25);
--primary-inverse: #fff;
--primary: #00897b;
--primary-hover: #009688;
--primary-focus: rgba(0, 137, 123, 0.25);
--primary-inverse: #FFF;
}

/* Teal (Common styles) */
:root {
--form-element-active-border-color: var(--primary);
--form-element-focus-color: var(--primary-focus);
--switch-color: var(--primary-inverse);
--switch-checked-background-color: var(--primary);
--form-element-active-border-color: var(--primary);
--form-element-focus-color: var(--primary-focus);
--switch-color: var(--primary-inverse);
--switch-checked-background-color: var(--primary);
}
Loading

0 comments on commit 89fe66a

Please sign in to comment.