Skip to content

Commit

Permalink
ci(e2e): implement e2e structure
Browse files Browse the repository at this point in the history
  • Loading branch information
matthprost committed Jan 22, 2025
1 parent 3d37913 commit 572842f
Show file tree
Hide file tree
Showing 9 changed files with 345 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@examples/*", "@utils/*"],
"ignore": ["@examples/*", "@utils/*", "@ultraviolet/e2e"],
"privatePackages": {
"tag": false,
"version": true
Expand Down
3 changes: 3 additions & 0 deletions e2e/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const App = () => <>Welcome !</>

export default App
13 changes: 13 additions & 0 deletions e2e/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Playwright Test E2E - Ultraviolet</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/index.tsx"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions e2e/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.tsx'

createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
35 changes: 35 additions & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "@ultraviolet/e2e",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"start": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "11.14.0",
"@emotion/styled": "11.14.0",
"@ultraviolet/icons": "workspace:*",
"@ultraviolet/themes": "workspace:*",
"@ultraviolet/ui": "workspace:*",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@eslint/js": "9.17.0",
"@types/react": "19.0.5",
"@types/react-dom": "19.0.3",
"@vitejs/plugin-react": "4.3.4",
"eslint": "9.17.0",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-refresh": "0.4.16",
"globals": "15.14.0",
"typescript": "5.7.3",
"typescript-eslint": "^8.19.1",
"vite": "6.0.7",
"@emotion/babel-plugin": "11.13.5"
}
}
9 changes: 9 additions & 0 deletions e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"allowImportingTsExtensions": true
},
"include": ["src", "../../global.d.ts", "emotion.d.ts"],
"exclude": ["node_modules", "coverage", "dist"]
}
13 changes: 13 additions & 0 deletions e2e/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'

export default defineConfig({
plugins: [
react({
jsxImportSource: '@emotion/react',
babel: {
plugins: ['@emotion/babel-plugin'],
},
}),
],
})
Loading

0 comments on commit 572842f

Please sign in to comment.