Skip to content

Commit 72a36d9

Browse files
thejacksheltonshairez
authored andcommitted
refactor(select): improve types, update vite dep
fix(select): inline component fix! refactor(select): naming and perf improvements typo simplified component testing Co-authored-by: Jack Shelton <[email protected]> fix(tests): add styles to new testing area pw tests now run component-tests app refactored tests to use driver methods and removed assertions from driver test(headless/select): refactored dynamic users test test(headless/select): fix flaky tests test(headless/select): fixed flaky tests test(headless/select): removed unnecessary timers fix linting issues
1 parent 84ea488 commit 72a36d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1459
-810
lines changed

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["ms-playwright.playwright"]
2+
"recommendations": ["ms-playwright.playwright", "esbenp.prettier-vscode"]
33
}

apps/component-tests/.eslintrc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:qwik/recommended",
6+
"../../.eslintrc.json"
7+
],
8+
"parser": "@typescript-eslint/parser",
9+
"parserOptions": {
10+
"project": ["apps/component-tests/tsconfig.*?.json"],
11+
"ecmaVersion": 2021,
12+
"sourceType": "module",
13+
"ecmaFeatures": {
14+
"jsx": true
15+
}
16+
},
17+
"plugins": ["@typescript-eslint"],
18+
"ignorePatterns": ["!**/*"],
19+
"overrides": [
20+
{
21+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
22+
"rules": {}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"rules": {}
27+
},
28+
{
29+
"files": ["*.js", "*.jsx"],
30+
"rules": {}
31+
}
32+
]
33+
}

apps/component-tests/.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Files Prettier should not format
2+
**/*.log
3+
**/.DS_Store
4+
*.
5+
dist
6+
node_modules

apps/component-tests/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Qwik City App ⚡️
2+
3+
- [Qwik Docs](https://qwik.builder.io/)
4+
- [Discord](https://qwik.builder.io/chat)
5+
- [Qwik GitHub](https://github.com/BuilderIO/qwik)
6+
- [@QwikDev](https://twitter.com/QwikDev)
7+
- [Vite](https://vitejs.dev/)
8+
9+
---
10+
11+
## Project Structure
12+
13+
This project is using Qwik with [QwikCity](https://qwik.builder.io/qwikcity/overview/). QwikCity is just a extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more.
14+
15+
Inside your project, you'll see the following directory structure:
16+
17+
```
18+
├── public/
19+
│ └── ...
20+
└── src/
21+
├── components/
22+
│ └── ...
23+
└── routes/
24+
└── ...
25+
```
26+
27+
- `src/routes`: Provides the directory based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.builder.io/qwikcity/routing/overview/) for more info.
28+
29+
- `src/components`: Recommended directory for components.
30+
31+
- `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.
32+
33+
## Add Integrations and deployment
34+
35+
Use the `pnpm qwik add` command to add additional integrations. Some examples of integrations include: Cloudflare, Netlify or Express server, and the [Static Site Generator (SSG)](https://qwik.builder.io/qwikcity/static-site-generation/static-site-config/).
36+
37+
```shell
38+
pnpm qwik add # or `yarn qwik add`
39+
```
40+
41+
## Development
42+
43+
Development mode uses [Vite's development server](https://vitejs.dev/). During development, the `dev` command will server-side render (SSR) the output.
44+
45+
```shell
46+
npm start # or `yarn start`
47+
```
48+
49+
> Note: during dev mode, Vite may request a significant number of `.js` files. This does not represent a Qwik production build.
50+
51+
## Preview
52+
53+
The preview command will create a production build of the client modules, a production build of `src/entry.preview.tsx`, and run a local server. The preview server is only for convenience to locally preview a production build, and it should not be used as a production server.
54+
55+
```shell
56+
pnpm preview # or `yarn preview`
57+
```
58+
59+
## Production
60+
61+
The production build will generate client and server modules by running both client and server build commands. Additionally, the build command will use Typescript to run a type check on the source code.
62+
63+
```shell
64+
pnpm build # or `yarn build`
65+
```

apps/component-tests/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "componentTests"
3+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
plugins: {
5+
'tailwindcss/nesting': 'postcss-nested',
6+
tailwindcss: {
7+
config: path.join(__dirname, 'tailwind.config.cjs'),
8+
},
9+
autoprefixer: {},
10+
},
11+
};

apps/component-tests/project.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"name": "component-tests",
3+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "application",
5+
"sourceRoot": "apps/component-tests/src",
6+
"targets": {
7+
"build": {
8+
"executor": "qwik-nx:build",
9+
"options": {
10+
"runSequence": ["component-tests:build.client", "component-tests:build.ssr"],
11+
"outputPath": "dist/apps/component-tests"
12+
},
13+
"configurations": {
14+
"preview": {}
15+
}
16+
},
17+
"build.client": {
18+
"executor": "@nx/vite:build",
19+
"options": {
20+
"outputPath": "dist/apps/component-tests",
21+
"configFile": "apps/component-tests/vite.config.ts"
22+
}
23+
},
24+
"build.ssr": {
25+
"executor": "@nx/vite:build",
26+
"defaultConfiguration": "preview",
27+
"options": {
28+
"outputPath": "dist/apps/component-tests"
29+
},
30+
"configurations": {
31+
"preview": {
32+
"ssr": "src/entry.preview.tsx",
33+
"mode": "production"
34+
}
35+
}
36+
},
37+
"preview": {
38+
"executor": "@nx/vite:preview-server",
39+
"options": {
40+
"buildTarget": "component-tests:build",
41+
"port": 4173
42+
}
43+
},
44+
"serve": {
45+
"executor": "@nx/vite:dev-server",
46+
"options": {
47+
"buildTarget": "component-tests:build.client",
48+
"mode": "ssr",
49+
"port": 5173
50+
}
51+
},
52+
"serve.debug": {
53+
"executor": "nx:run-commands",
54+
"options": {
55+
"command": "node --inspect-brk ../../node_modules/vite/bin/vite.js --mode ssr --force",
56+
"cwd": "apps/component-tests"
57+
}
58+
},
59+
"lint": {
60+
"executor": "@nx/linter:eslint",
61+
"outputs": ["{options.outputFile}"],
62+
"options": {
63+
"lintFilePatterns": ["apps/component-tests/**/*.{ts,tsx,js,jsx}"]
64+
}
65+
}
66+
},
67+
"tags": []
68+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
3+
"name": "qwik-project-name",
4+
"short_name": "Welcome to Qwik",
5+
"start_url": ".",
6+
"display": "standalone",
7+
"background_color": "#fff",
8+
"description": "A Qwik project app."
9+
}

apps/component-tests/public/robots.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)