Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resources/dist
resources/dist-dev
resources/dist-frontend
resources/dist-package
resources/js/tests/browser/__screenshots__
packages/cms/src/ui.css
composer.lock
.env
Expand Down
3 changes: 2 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const config: StorybookConfig = {
],
addons: [
'@storybook/addon-docs',
'@storybook/addon-a11y'
'@storybook/addon-a11y',
'@storybook/addon-vitest'
],
staticDirs: ['./public'],
framework: {
Expand Down
202 changes: 199 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"devDependencies": {
"@storybook/addon-a11y": "^10.1.2",
"@storybook/addon-docs": "^10.1.2",
"@storybook/addon-vitest": "^10.1.10",
"@storybook/vue3-vite": "^10.1.2",
"@tailwindcss/vite": "^4.1.8",
"@vitejs/plugin-vue": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/ui/Combobox/Combobox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ defineExpose({
@mount-auto-focus.prevent
@unmount-auto-focus="(event) => {
if (event.defaultPrevented) return;
$refs.trigger.$el.focus();
$refs.trigger?.$el?.focus();
event.preventDefault();
}"
>
Expand Down
66 changes: 66 additions & 0 deletions resources/js/tests/browser/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import '../setup.js';

import { config as browserConfig } from 'vitest-browser-vue';

import '../../../css/app.css';
import '../../../css/ui.css';

browserConfig.global.mocks = {
__: (key) => key,
};

browserConfig.global.directives = {
tooltip: () => {},
};

if (typeof window !== 'undefined') {
window.__ = (key) => key;
}

if (typeof document !== 'undefined') {
const style = document.createElement('style');
style.textContent = `
:root {
/* Basic theme colors */
--theme-color-primary: #3b82f6;
--theme-color-success: #10b981;
--theme-color-gray-50: #f9fafb;
--theme-color-gray-100: #f3f4f6;
--theme-color-gray-150: #e8ebef;
--theme-color-gray-200: #e5e7eb;
--theme-color-gray-300: #d1d5db;
--theme-color-gray-400: #9ca3af;
--theme-color-gray-500: #6b7280;
--theme-color-gray-600: #4b5563;
--theme-color-gray-700: #374151;
--theme-color-gray-800: #1f2937;
--theme-color-gray-850: #1a202c;
--theme-color-gray-900: #111827;
--theme-color-gray-925: #0d1117;

/* UI specific colors */
--theme-color-body-bg: #ffffff;
--theme-color-body-border: #e5e7eb;
--theme-color-content-border: #e5e7eb;
--theme-color-focus-outline: #3b82f6;

/* Z-index values */
--z-index-above: 10;
--z-index-portal: 1000;
--z-index-modal: 1050;
}

/* Ensure body has a white background */
body {
background-color: white;
color: #111827;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Basic button/input styling for visibility */
button, input, select {
font-family: inherit;
}
`;
document.head.appendChild(style);
}
Loading
Loading