@blockquote/create-wc 2.16.1 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/common-linting/templates/package.json +5 -5
- package/src/common-repo/templates/package.json +8 -8
- package/src/common-repo/templates/static/vite.config.js +2 -6
- package/src/testing/templates/my-el.test.js +15 -13
- package/src/testing-ts/templates/my-el.test.ts +15 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote/create-wc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "Web component with Lit scaffolding - Extending Open Web Component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@eslint/js": "^10.0.1",
|
|
61
61
|
"@open-wc/eslint-config": "^13.1.0",
|
|
62
|
-
"eslint": "^10.
|
|
62
|
+
"eslint": "^10.11.0",
|
|
63
63
|
"eslint-config-prettier": "^10.1.8",
|
|
64
|
-
"globals": "^17.
|
|
65
|
-
"prettier": "^3.9.
|
|
64
|
+
"globals": "^17.12.0",
|
|
65
|
+
"prettier": "^3.9.9"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@blockquote/eslint-config": "^0.1.
|
|
72
|
-
"eslint": "^10.
|
|
71
|
+
"@blockquote/eslint-config": "^0.1.9",
|
|
72
|
+
"eslint": "^10.11.0",
|
|
73
73
|
"husky": "^9.1.7",
|
|
74
|
-
"lint-staged": "^17.
|
|
75
|
-
"prettier": "^3.9.
|
|
76
|
-
"stylelint": "^17.
|
|
74
|
+
"lint-staged": "^17.6.0",
|
|
75
|
+
"prettier": "^3.9.9",
|
|
76
|
+
"stylelint": "^17.15.0",
|
|
77
77
|
"stylelint-config-standard-scss": "^17.0.0"
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
"@open-wc/semantic-dom-diff": "^0.21.0",
|
|
32
32
|
"@open-wc/testing-helpers": "^3.0.1",
|
|
33
33
|
"@types/mocha": "^10.0.10",
|
|
34
|
-
"@types/node": "^26.
|
|
35
|
-
"@vitest/browser-playwright": "^
|
|
36
|
-
"@vitest/coverage-istanbul": "^
|
|
37
|
-
"@vitest/coverage-v8": "^
|
|
38
|
-
"@vitest/ui": "^
|
|
34
|
+
"@types/node": "^26.6.3",
|
|
35
|
+
"@vitest/browser-playwright": "^5.0.2",
|
|
36
|
+
"@vitest/coverage-istanbul": "^5.0.2",
|
|
37
|
+
"@vitest/coverage-v8": "^5.0.2",
|
|
38
|
+
"@vitest/ui": "^5.0.2",
|
|
39
39
|
"chai-a11y-axe": "^1.5.0",
|
|
40
40
|
"concurrently": "^10.0.5",
|
|
41
|
-
"playwright": "^1.
|
|
41
|
+
"playwright": "^1.63.0",
|
|
42
42
|
"postcss-html": "^2.0.0",
|
|
43
43
|
"postcss-lit": "^1.4.1",
|
|
44
44
|
"rollup-plugin-node-externals": "^9.0.1",
|
|
45
45
|
"sort-package-json": "^4.0.0",
|
|
46
46
|
"tinyglobby": "^0.2.17",
|
|
47
|
-
"vite": "^8.
|
|
47
|
+
"vite": "^8.3.1",
|
|
48
48
|
"vite-plugin-static-copy": "^4.1.1",
|
|
49
|
-
"vitest": "^
|
|
49
|
+
"vitest": "^5.0.2"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
@@ -60,6 +60,7 @@ export default defineConfig(({command}) => ({
|
|
|
60
60
|
browser: {
|
|
61
61
|
enabled: true,
|
|
62
62
|
headless: true,
|
|
63
|
+
trace: 'off',
|
|
63
64
|
provider: playwright(),
|
|
64
65
|
screenshotFailures: false,
|
|
65
66
|
instances: [
|
|
@@ -67,12 +68,7 @@ export default defineConfig(({command}) => ({
|
|
|
67
68
|
browser: 'chromium',
|
|
68
69
|
provider: playwright({
|
|
69
70
|
launchOptions: {
|
|
70
|
-
args: [
|
|
71
|
-
'--auto-open-devtools-for-tabs',
|
|
72
|
-
'--no-sandbox',
|
|
73
|
-
'--disable-setuid-sandbox',
|
|
74
|
-
'--disable-gpu',
|
|
75
|
-
],
|
|
71
|
+
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu'],
|
|
76
72
|
},
|
|
77
73
|
}),
|
|
78
74
|
},
|
|
@@ -31,11 +31,17 @@ describe('<%= className %>', () => {
|
|
|
31
31
|
fixtureCleanup();
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
it('has a default heading "Hey there" and counter 5', () => {
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
it('has a default heading "Hey there" and counter 5', async () => {
|
|
35
|
+
const heading = elLocator.getByRole('heading', {
|
|
36
|
+
level: 1,
|
|
37
|
+
name: 'Hello, Hey there!',
|
|
38
|
+
});
|
|
39
|
+
const button = elLocator.getByRole('button', {
|
|
40
|
+
name: 'Counter: 5',
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
await expect.element(heading).toHaveAccessibleName('Hello, Hey there!');
|
|
44
|
+
await expect.element(button).toHaveAccessibleName('Counter: 5');
|
|
39
45
|
});
|
|
40
46
|
|
|
41
47
|
it('SHADOW DOM - Structure test', () => {
|
|
@@ -62,19 +68,15 @@ describe('<%= className %>', () => {
|
|
|
62
68
|
});
|
|
63
69
|
|
|
64
70
|
it('should increment value on click', async () => {
|
|
65
|
-
const button = elLocator.
|
|
66
|
-
|
|
67
|
-
if (!elButton) {
|
|
68
|
-
throw new Error('Button not found');
|
|
69
|
-
}
|
|
71
|
+
const button = elLocator.getByRole('button');
|
|
72
|
+
await expect.element(button).toHaveAccessibleName('Counter: 5');
|
|
70
73
|
await button.dblClick();
|
|
71
|
-
await
|
|
72
|
-
expect(elButton.textContent).toContain('Counter: 7');
|
|
74
|
+
await expect.element(button).toHaveAccessibleName('Counter: 7');
|
|
73
75
|
});
|
|
74
76
|
|
|
75
77
|
it('counterchange event is dispatched - vi', async () => {
|
|
76
78
|
const spyEvent = vi.spyOn(el, 'dispatchEvent');
|
|
77
|
-
const button = elLocator.
|
|
79
|
+
const button = elLocator.getByRole('button', {name: 'Counter: 5', exact: true});
|
|
78
80
|
await button.click();
|
|
79
81
|
expect(spyEvent).toHaveBeenCalledWith(expect.objectContaining({type: 'counterchange'}));
|
|
80
82
|
});
|
|
@@ -25,11 +25,17 @@ describe('<%= className %>', () => {
|
|
|
25
25
|
fixtureCleanup();
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
it('has a default heading "Hey there" and counter 5', () => {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
it('has a default heading "Hey there" and counter 5', async () => {
|
|
29
|
+
const heading = elLocator.getByRole('heading', {
|
|
30
|
+
level: 1,
|
|
31
|
+
name: 'Hello, Hey there!',
|
|
32
|
+
});
|
|
33
|
+
const button = elLocator.getByRole('button', {
|
|
34
|
+
name: 'Counter: 5',
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
await expect.element(heading).toHaveAccessibleName('Hello, Hey there!');
|
|
38
|
+
await expect.element(button).toHaveAccessibleName('Counter: 5');
|
|
33
39
|
});
|
|
34
40
|
|
|
35
41
|
it('SHADOW DOM - Structure test', () => {
|
|
@@ -56,16 +62,15 @@ describe('<%= className %>', () => {
|
|
|
56
62
|
});
|
|
57
63
|
|
|
58
64
|
it('should increment value on click', async () => {
|
|
59
|
-
const button = elLocator.
|
|
60
|
-
|
|
65
|
+
const button = elLocator.getByRole('button');
|
|
66
|
+
await expect.element(button).toHaveAccessibleName('Counter: 5');
|
|
61
67
|
await button.dblClick();
|
|
62
|
-
await
|
|
63
|
-
expect(elButton.textContent).toContain('Counter: 7');
|
|
68
|
+
await expect.element(button).toHaveAccessibleName('Counter: 7');
|
|
64
69
|
});
|
|
65
70
|
|
|
66
71
|
it('counterchange event is dispatched - vi', async () => {
|
|
67
72
|
const spyEvent = vi.spyOn(el, 'dispatchEvent');
|
|
68
|
-
const button = elLocator.
|
|
73
|
+
const button = elLocator.getByRole('button', {name: 'Counter: 5', exact: true});
|
|
69
74
|
await button.click();
|
|
70
75
|
expect(spyEvent).toHaveBeenCalledWith(expect.objectContaining({type: 'counterchange'}));
|
|
71
76
|
});
|