Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c8f31c

Browse files
authored
test: add cypress (qwikifiers#38)
1 parentfd9144f commit5c8f31c

File tree

19 files changed

+1735
-530
lines changed

19 files changed

+1735
-530
lines changed

‎.eslintrc.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"root":true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx/nx"],
55
"overrides": [
66
{
77
"files": ["*.ts","*.tsx","*.js","*.jsx"],
88
"rules": {
9-
"@nrwl/nx/enforce-module-boundaries": [
9+
"@nx/nx/enforce-module-boundaries": [
1010
"error",
1111
{
1212
"enforceBuildableLibDependency":true,
@@ -23,12 +23,12 @@
2323
},
2424
{
2525
"files": ["*.ts","*.tsx"],
26-
"extends": ["plugin:@nrwl/nx/typescript"],
26+
"extends": ["plugin:@nx/nx/typescript"],
2727
"rules": {}
2828
},
2929
{
3030
"files": ["*.js","*.jsx"],
31-
"extends": ["plugin:@nrwl/nx/javascript"],
31+
"extends": ["plugin:@nx/nx/javascript"],
3232
"rules": {}
3333
},
3434
{

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,5 @@ testem.log
6464
# System Files
6565
.DS_Store
6666
Thumbs.db
67-
.env.local
67+
.env.local
68+
.nx/*

‎.vscode/settings.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.organizeImports":true,
4-
"source.fixAll":true
3+
"source.organizeImports":"explicit",
4+
"source.fixAll":"explicit"
55
},
66
"editor.formatOnSave":true
77
}

‎package.json‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,28 @@
99
},
1010
"private":false,
1111
"devDependencies": {
12-
"@builder.io/qwik":"1.2.13",
13-
"@builder.io/qwik-city":"1.2.13",
12+
"@builder.io/qwik":"1.4.1",
13+
"@builder.io/qwik-city":"1.4.1",
1414
"@commitlint/cli":"17.6.5",
1515
"@commitlint/config-angular":"17.6.5",
1616
"@commitlint/config-conventional":"17.6.5",
17+
"@cypress/code-coverage":"^3.12.19",
18+
"@cypress/vite-dev-server":"^5.0.7",
1719
"@frsource/autoresize-textarea":"^1.3.76",
1820
"@jscutlery/semver":"3.0.0",
1921
"@k11r/nx-cloudflare-wrangler":"2.4.2",
2022
"@mertasan/tailwindcss-variables":"2.6.1",
21-
"@nrwl/cypress":"16.3.2",
22-
"@nrwl/eslint-plugin-nx":"16.3.2",
23-
"@nrwl/linter":"16.3.2",
24-
"@nrwl/nx-cloud":"16.0.5",
25-
"@nrwl/vite":"16.3.2",
26-
"@nrwl/workspace":"16.3.2",
2723
"@nuxt/devtools":"latest",
2824
"@nuxt/kit":"^3.7.4",
25+
"@nx/cypress":"17.2.8",
26+
"@nx/eslint-plugin-nx":"16.0.0-beta.1",
27+
"@nx/linter":"17.2.8",
28+
"@nx/vite":"17.2.8",
29+
"@nx/workspace":"17.2.8",
2930
"@storefront-ui/tw-plugin-peer-next":"2.3.1",
3031
"@storefront-ui/vue":"^2.6.0",
32+
"@testing-library/cypress":"10.0.1",
33+
"@types/jest":"^29.5.11",
3134
"@types/node":"20.2.5",
3235
"@typescript-eslint/eslint-plugin":"5.59.9",
3336
"@typescript-eslint/parser":"5.59.9",
@@ -38,19 +41,21 @@
3841
"@vue/shared":"^3.3.4",
3942
"all-contributors-cli":"6.26.0",
4043
"autoprefixer":"10.4.14",
41-
"cypress":"12.13.0",
44+
"cypress":"~12.17.2",
45+
"cypress-ct-qwik":"~0.3.0",
46+
"cypress-real-events":"1.11.0",
4247
"cz-conventional-changelog":"3.3.0",
4348
"eslint":"8.42.0",
4449
"eslint-config-prettier":"8.8.0",
45-
"eslint-plugin-cypress":"2.13.3",
46-
"eslint-plugin-qwik":"1.2.13",
50+
"eslint-plugin-cypress":"2.15.1",
51+
"eslint-plugin-qwik":"1.4.1",
4752
"husky":"^8.0.0",
4853
"instantsearch.css":"8.1.0",
4954
"jsdom":"22.1.0",
5055
"ngx-deploy-npm":"6.0.0",
5156
"node-fetch":"3.3.1",
5257
"nuxt":"3.6.0",
53-
"nx":"16.3.2",
58+
"nx":"17.2.8",
5459
"postcss":"8.4.24",
5560
"prettier":"2.8.8",
5661
"pretty-quick":"^3.1.3",

‎packages/qwik-storefront-ui/.eslintrc.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
},
1717
"plugins": ["@typescript-eslint"],
18-
"ignorePatterns": ["!**/*"],
18+
"ignorePatterns": ["!**/*","cypress.config.ts"],
1919
"overrides": [
2020
{
2121
"files": ["*.ts","*.tsx","*.js","*.jsx"],
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import{defineConfig}from'cypress';
2+
3+
exportdefaultdefineConfig({
4+
component:{
5+
devServer:{
6+
framework:'cypress-ct-qwik'asany,
7+
bundler:'vite',
8+
},
9+
},
10+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name":"Using fixtures to represent data",
3+
"email":"hello@cypress.io",
4+
"body":"Fixtures are a great way to mock data for responses to routes"
5+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/// <reference types="cypress" />
2+
// ***********************************************
3+
// This example commands.ts shows you how to
4+
// create various custom commands and overwrite
5+
// existing commands.
6+
//
7+
// For more comprehensive examples of custom
8+
// commands please read more here:
9+
// https://on.cypress.io/custom-commands
10+
// ***********************************************
11+
//
12+
//
13+
// -- This is a parent command --
14+
// Cypress.Commands.add('login', (email, password) => { ... })
15+
//
16+
//
17+
// -- This is a child command --
18+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
19+
//
20+
//
21+
// -- This is a dual command --
22+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
23+
//
24+
//
25+
// -- This will overwrite an existing command --
26+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
27+
//
28+
// declare global {
29+
// namespace Cypress {
30+
// interface Chainable {
31+
// login(email: string, password: string): Chainable<void>
32+
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
33+
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
34+
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
35+
// }
36+
// }
37+
// }
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<metacharset="utf-8"/>
5+
<metahttp-equiv="X-UA-Compatible"content="IE=edge"/>
6+
<metaname="viewport"content="width=device-width,initial-scale=1.0"/>
7+
<title>Components App</title>
8+
</head>
9+
<body>
10+
<divdata-cy-root></div>
11+
</body>
12+
</html>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// ***********************************************************
2+
// This example support/component.ts is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
import{addQwikLoader}from'cypress-ct-qwik';
17+
addQwikLoader();
18+
19+
// Import commands.js using ES2015 syntax:
20+
import'./commands';
21+
22+
// Alternatively you can use CommonJS syntax:
23+
// require('./commands')
24+
25+
import{mount}from'cypress-ct-qwik';
26+
27+
// Augment the Cypress namespace to include type definitions for
28+
// your custom command.
29+
// Alternatively, can be defined in cypress/support/component.d.ts
30+
// with a <reference path="./component" /> at the top of your spec.
31+
declare global{
32+
namespaceCypress{
33+
interfaceChainable{
34+
mount:typeofmount;
35+
}
36+
}
37+
}
38+
39+
Cypress.Commands.add('mount',mount);
40+
41+
// Example use:
42+
// cy.mount(MyComponent)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp