qc-trousse-sdg 1.4.1 → 1.4.3
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/README.md +21 -0
- package/dist/css/qc-sdg-no-grid.min.css +1 -1
- package/dist/css/qc-sdg.min.css +1 -1
- package/dist/js/qc-sdg.min.js +1 -1
- package/index.html +6 -0
- package/package.json +2 -2
- package/plugins/buildSvelteTests.js +36 -0
- package/public/css/qc-sdg-no-grid.css +42 -27
- package/public/css/qc-sdg.css +42 -27
- package/public/index.html +29 -4
- package/public/js/qc-doc-sdg.js +2888 -4618
- package/public/js/qc-sdg.js +759 -1796
- package/rollup.config.js +5 -0
- package/src/doc/components/TopNav.svelte +2 -2
- package/src/sdg/bases/Icon/Icon.svelte +1 -0
- package/src/sdg/bases/Icon/IconDoc.ejs +1 -1
- package/src/sdg/bases/Icon/_icon.html +1 -1
- package/src/sdg/components/Button/Test/{buttonTest.html → buttonBaselineTest.html} +3 -3
- package/src/sdg/components/Button/_button.html +28 -3
- package/src/sdg/components/Button/_button.scss +16 -6
- package/src/sdg/components/ChoiceGroup/_selectionButton.scss +5 -0
- package/src/sdg/components/DropdownList/DropdownListButton/_dropdownListButton.scss +1 -1
- package/src/sdg/components/DropdownList/_dropdownList.scss +4 -0
- package/src/sdg/components/Label/_label.scss +1 -1
- package/src/sdg/components/TextField/_textField.scss +3 -3
- package/src/sdg/components/ToTop/_toTop.scss +1 -0
- package/src/sdg/qc-sdg-test.js +1 -1
- package/src/sdg/scss/settings/_base.scss +0 -6
- package/tests/buildSvelteTestsIgnore.json +4 -0
- package/tests/{button.spec.ts → button-baseline.spec.ts} +2 -2
- package/tests/choice-group-baseline.spec.ts +20 -0
- package/tests/choice-group-svelte.spec.ts +20 -0
- package/tests/{icon.spec.ts → icon-baseline.spec.ts} +1 -9
- package/tests/icon-svelte.spec.ts +11 -0
- package/tests/piv-header-baseline.spec.ts +11 -0
- package/tests/piv-header-svelte.spec.ts +11 -0
- package/tests/{textfield.spec.ts → textfield-baseline.spec.ts} +1 -10
- package/tests/textfield-svelte.spec.ts +1 -1
- package/tests/toggle-switch-baseline.spec.ts +11 -0
- package/tests/toggle-switch-svelte.spec.ts +11 -0
- package/tests/choice-group.spec.ts +0 -36
- package/tests/pivHeader.spec.ts +0 -22
- package/tests/toggle-switch.spec.ts +0 -20
- /package/src/sdg/bases/Icon/Test/{IconEmbeddedTest.html → IconSvelteTest.html} +0 -0
- /package/src/sdg/bases/Icon/Test/{iconTest.html → iconBaselineTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{checkboxTest.html → checkboxBaselineTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{checkboxEmbeddedTest.html → checkboxSvelteTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{radiosTest.html → radiosBaselineTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{radiosEmbeddedTest.html → radiosSvelteTest.html} +0 -0
- /package/src/sdg/components/DropdownList/Test/{DropdownListEmbeddedTest.svelte → DropdownListSvelteTest.svelte} +0 -0
- /package/src/sdg/components/DropdownList/Test/{dropdownListEmbeddedTest.html → dropdownListSvelteTest.html} +0 -0
- /package/src/sdg/components/PivHeader/Test/{pivHeaderTest.html → pivHeaderBaselineTest.html} +0 -0
- /package/src/sdg/components/PivHeader/Test/{pivHeaderEmbeddedTest.html → pivHeaderSvelteTest.html} +0 -0
- /package/src/sdg/components/TextField/Test/{textFieldTest.html → textFieldBaselineTest.html} +0 -0
- /package/src/sdg/components/TextField/Test/{textFieldEmbeddedTest.html → textFieldSvelteTest.html} +0 -0
- /package/src/sdg/components/ToggleSwitch/Test/{toggleSwitchTest.html → toggleSwitchBaselineTest.html} +0 -0
- /package/src/sdg/components/ToggleSwitch/Test/{toggleSwitchEmbeddedTest.html → toggleSwitchSvelteTest.html} +0 -0
- /package/tests/{dropdown-list.spec.ts → dropdown-list-baseline.spec.ts} +0 -0
package/rollup.config.js
CHANGED
|
@@ -13,6 +13,7 @@ import fs from "fs";
|
|
|
13
13
|
import buildHtmlDoc from './plugins/buildHtmlDoc.js';
|
|
14
14
|
import buildDevDoc from "./plugins/buildDevDoc"; // adapte le chemin si besoin
|
|
15
15
|
import buildTestFixtures from "./plugins/buildTestFixtures";
|
|
16
|
+
import buildSvelteTests from "./plugins/buildSvelteTests";
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
const
|
|
@@ -221,6 +222,10 @@ if (!build_process) {
|
|
|
221
222
|
buildTestFixtures({
|
|
222
223
|
input: 'src/doc/_test.html'
|
|
223
224
|
}),
|
|
225
|
+
buildSvelteTests({
|
|
226
|
+
input: 'tests',
|
|
227
|
+
ignorePathsFile: 'buildSvelteTestsIgnore.json'
|
|
228
|
+
}),
|
|
224
229
|
svelte(svelteOptions),
|
|
225
230
|
resolve({
|
|
226
231
|
browser: true,
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
position: sticky;
|
|
31
31
|
z-index: 100;
|
|
32
32
|
top: 0;
|
|
33
|
-
background-color: token-value(color
|
|
34
|
-
color: token-value(color grey pale);
|
|
33
|
+
background-color: token-value(color background);
|
|
35
34
|
min-height: rem(72);
|
|
36
35
|
height: rem(72);
|
|
36
|
+
border-bottom: solid rem(1) token-value(color grey light);
|
|
37
37
|
}
|
|
38
38
|
.top-nav {
|
|
39
39
|
position: absolute;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<td>label</td>
|
|
64
64
|
<td>Texte</td>
|
|
65
65
|
<td>""</td>
|
|
66
|
-
<td>Texte alternatif pour l’accessibilité. Sert de libellé pour les lecteurs d’écran
|
|
66
|
+
<td>Texte alternatif pour l’accessibilité. Sert de libellé pour les lecteurs d’écran. Si absent, l'icône sera masquée au lecteur d'écran (via l'attribut <code>aria-hidden</code></td>
|
|
67
67
|
</tr>
|
|
68
68
|
<tr>
|
|
69
69
|
<td>rotate</td>
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<td>label</td>
|
|
64
64
|
<td>Texte</td>
|
|
65
65
|
<td>""</td>
|
|
66
|
-
<td>Texte alternatif pour l’accessibilité. Sert de libellé pour les lecteurs d’écran
|
|
66
|
+
<td>Texte alternatif pour l’accessibilité. Sert de libellé pour les lecteurs d’écran. Si absent, l'icône sera masquée au lecteur d'écran (via l'attribut <code>aria-hidden</code></td>
|
|
67
67
|
</tr>
|
|
68
68
|
<tr>
|
|
69
69
|
<td>rotate</td>
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
<br>
|
|
307
307
|
<br>
|
|
308
308
|
|
|
309
|
-
<div>
|
|
309
|
+
<div class="qc-button-group">
|
|
310
310
|
<button class="qc-button qc-primary">
|
|
311
311
|
<qc-icon type="plus"></qc-icon>
|
|
312
312
|
Ajouter
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
Questions
|
|
325
325
|
</button>
|
|
326
326
|
|
|
327
|
-
<div>
|
|
327
|
+
<div class="qc-button-group">
|
|
328
328
|
<button class="qc-button qc-simple">
|
|
329
329
|
<qc-icon type="information"></qc-icon>
|
|
330
330
|
Action
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
</button>
|
|
337
337
|
</div>
|
|
338
338
|
|
|
339
|
-
<div>
|
|
339
|
+
<div class="qc-button-group qc-compact">
|
|
340
340
|
<button class="qc-button qc-simple qc-compact">
|
|
341
341
|
<qc-icon type="information"></qc-icon>
|
|
342
342
|
Action
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
90
90
|
|
|
91
|
-
<div>
|
|
91
|
+
<div class="qc-button-group">
|
|
92
92
|
<button class="qc-button qc-simple">
|
|
93
93
|
<qc-icon type="information"></qc-icon>
|
|
94
94
|
Action
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
Action
|
|
100
100
|
</button>
|
|
101
101
|
</div>
|
|
102
|
-
<div>
|
|
102
|
+
<div class="qc-button-group qc-compact">
|
|
103
103
|
<button class="qc-button qc-simple qc-compact">
|
|
104
104
|
<qc-icon type="information"></qc-icon>
|
|
105
105
|
Action
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</qc-doc-exemple>
|
|
115
115
|
|
|
116
116
|
<qc-doc-exemple caption="Exemples de boutons avec icône.<br/>NB: voir la section <a href='#icons'>Icônes</a> pour plus de détails concernant le composant <code>qc-icon</code>.">
|
|
117
|
-
<div>
|
|
117
|
+
<div class="qc-button-group">
|
|
118
118
|
<button class="qc-button qc-primary">
|
|
119
119
|
<qc-icon type="arrow-up" rotate="-90"></qc-icon>
|
|
120
120
|
Précédent
|
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
</qc-doc-exemple>
|
|
129
129
|
|
|
130
130
|
<qc-doc-exemple caption="Exemples avec un lien et un bouton de soumission.">
|
|
131
|
+
<div class="qc-button-group">
|
|
131
132
|
<a href="javascript:void(0);"
|
|
132
133
|
class="qc-button qc-primary"
|
|
133
134
|
role="button"
|
|
@@ -135,11 +136,13 @@
|
|
|
135
136
|
Action
|
|
136
137
|
</a>
|
|
137
138
|
<input type="submit" value="Action" class="qc-button qc-primary" />
|
|
139
|
+
</div>
|
|
138
140
|
</qc-doc-exemple>
|
|
139
141
|
|
|
140
142
|
|
|
141
143
|
<h3>Classes CSS</h3>
|
|
142
144
|
|
|
145
|
+
<h4>Classes de boutons</h4>
|
|
143
146
|
<div class="table-overflow">
|
|
144
147
|
<table class="qc-table qc-striped">
|
|
145
148
|
<thead>
|
|
@@ -184,3 +187,25 @@
|
|
|
184
187
|
</tbody>
|
|
185
188
|
</table>
|
|
186
189
|
</div>
|
|
190
|
+
|
|
191
|
+
<h4>Classes pour le contenant parent d'un groupe de boutons</h4>
|
|
192
|
+
<div class="table-overflow">
|
|
193
|
+
<table class="qc-table qc-striped">
|
|
194
|
+
<thead>
|
|
195
|
+
<tr>
|
|
196
|
+
<th>Classe / Attribut</th>
|
|
197
|
+
<th>Description</th>
|
|
198
|
+
</tr>
|
|
199
|
+
</thead>
|
|
200
|
+
<tbody>
|
|
201
|
+
<tr>
|
|
202
|
+
<td><code>qc‑button-group</code></td>
|
|
203
|
+
<td>Gère les espacements horizontaux entre les boutons en groupe</td>
|
|
204
|
+
</tr>
|
|
205
|
+
<tr>
|
|
206
|
+
<td><code>qc‑compact</code></td>
|
|
207
|
+
<td>Espacements au format compact des boutons en groupe</td>
|
|
208
|
+
</tr>
|
|
209
|
+
</tbody>
|
|
210
|
+
</table>
|
|
211
|
+
</div>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
min-width: rem(112);
|
|
15
15
|
max-width: rem(360);
|
|
16
16
|
min-height: rem(56);
|
|
17
|
-
padding
|
|
17
|
+
// Compensation pour la bordure en retirant 2px de padding de chaque côté
|
|
18
|
+
padding: rem(14) rem(22);
|
|
18
19
|
vertical-align: middle;
|
|
19
|
-
border:
|
|
20
|
+
border: rem(2) solid transparent;
|
|
20
21
|
cursor: pointer;
|
|
21
|
-
margin-right: rem(32);
|
|
22
22
|
margin-bottom: token-value(spacer, md);
|
|
23
23
|
|
|
24
24
|
&:focus,
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
font-weight: token-value(font weight, semi-bold);
|
|
31
31
|
min-width: rem(80);
|
|
32
32
|
min-height: rem(40);
|
|
33
|
-
padding
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
// Compensation pour la bordure en retirant 1px de padding de chaque côté
|
|
34
|
+
padding: rem(7) rem(15);
|
|
35
|
+
border-width: rem(1);
|
|
36
36
|
margin-bottom: token-value(spacer, sm);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -200,3 +200,13 @@
|
|
|
200
200
|
text-decoration: none;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
+
|
|
204
|
+
.qc-button-group {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-wrap: wrap;
|
|
207
|
+
column-gap: rem(4 * $base-spacer);
|
|
208
|
+
|
|
209
|
+
&.qc-compact {
|
|
210
|
+
column-gap: token-value(spacer, md);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -17,6 +17,11 @@ label.qc-selection-button {
|
|
|
17
17
|
|
|
18
18
|
&:has(input:checked)::before {
|
|
19
19
|
background-color: token-value(color, blue, pale);
|
|
20
|
+
border-color: token-value(color, blue, light);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:focus, &:has(input:focus)::before {
|
|
24
|
+
border-color: inherit;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
&:has(input:disabled)::before {
|
|
@@ -28,7 +28,7 @@ textarea {
|
|
|
28
28
|
position: relative;
|
|
29
29
|
color: token-value(color text primary);
|
|
30
30
|
background-color: token-value(color background);
|
|
31
|
-
padding: rem(
|
|
31
|
+
padding: rem(7);
|
|
32
32
|
text-overflow: ellipsis;
|
|
33
33
|
overflow: hidden;
|
|
34
34
|
margin-top: rem(4);
|
|
@@ -43,7 +43,7 @@ textarea {
|
|
|
43
43
|
&:focus-visible {
|
|
44
44
|
outline: 2px solid token-value(color formfield focus outline);
|
|
45
45
|
border: 2px solid token-value(color formfield focus border);
|
|
46
|
-
padding: rem(
|
|
46
|
+
padding: rem(6);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&:disabled {
|
|
@@ -56,7 +56,7 @@ textarea {
|
|
|
56
56
|
[invalid] > & {
|
|
57
57
|
border-color: token-value(color, red, regular);
|
|
58
58
|
border-width: 2px;
|
|
59
|
-
padding: rem(
|
|
59
|
+
padding: rem(6);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
}
|
package/src/sdg/qc-sdg-test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './bases/Icon/Test/IconEmbeddedTest.svelte';
|
|
2
2
|
export * from './components/TextField/Test/TextFieldEmbededTest.svelte';
|
|
3
|
-
export * from "./components/DropdownList/Test/
|
|
3
|
+
export * from "./components/DropdownList/Test/DropdownListSvelteTest.svelte";
|
|
4
4
|
export * from "./components/ChoiceGroup/Test/ChoiceGroupeEmbededTest.svelte";
|
|
5
5
|
export * from "./components/ToggleSwitch/Test/ToggleSwitchEmbeddedTest.svelte";
|
|
6
6
|
export * from "./components/PivHeader/Test/pivHeaderEmbeddedTest.svelte";
|
|
@@ -22,9 +22,3 @@ $grid-aliases: (
|
|
|
22
22
|
mobile: xs
|
|
23
23
|
);
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
//TODO 1 -générer automatiquement cette map à partir du contenu du fichie img en javascript (avec gupl ou autre)
|
|
27
|
-
//TODO 2 - demander des nouvelles icône les plus neutres possibles
|
|
28
|
-
//TODO 3 - faire le ménage ; certaines icones sont présentées en 2 couleaurs, ce qui est inutile depuis l'introduction de qc-icon
|
|
29
|
-
|
|
30
|
-
|
|
@@ -2,10 +2,10 @@ import { test, expect } from '@playwright/test';
|
|
|
2
2
|
import path = require('path');
|
|
3
3
|
|
|
4
4
|
/* test des composants web de la trousse */
|
|
5
|
-
test('button
|
|
5
|
+
test('button baseline', {
|
|
6
6
|
tag: ['@baseline', '@button']
|
|
7
7
|
}, async ({ page }) => {
|
|
8
|
-
const htmlFilePath = path.resolve(__dirname, '../public/
|
|
8
|
+
const htmlFilePath = path.resolve(__dirname, '../public/buttonBaseline.test.html');
|
|
9
9
|
await page.goto(`file://${htmlFilePath}`);
|
|
10
10
|
await expect(page).toHaveScreenshot('button.png', { fullPage: true });
|
|
11
11
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
test('choice-group radios baseline', {
|
|
5
|
+
tag: ['@baseline', '@radios']
|
|
6
|
+
}, async ({ page }) => {
|
|
7
|
+
const htmlFilePath = path.resolve(__dirname, '../public/radiosBaseline.test.html');
|
|
8
|
+
// Navigue vers le fichier en utilisant le protocole file://
|
|
9
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
+
await expect(page).toHaveScreenshot('radios.png', {fullPage: true});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('choice-group checkbox baseline', {
|
|
14
|
+
tag: ['@baseline', '@checkbox']
|
|
15
|
+
}, async ({ page }) => {
|
|
16
|
+
const htmlFilePath = path.resolve(__dirname, '../public/checkboxBaseline.test.html');
|
|
17
|
+
// Navigue vers le fichier en utilisant le protocole file://
|
|
18
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
19
|
+
await expect(page).toHaveScreenshot('checkbox.png',{fullPage: true});
|
|
20
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
test('choice-group radios svelte', {
|
|
5
|
+
tag: ['@svelte', '@radios']
|
|
6
|
+
}, async ({ page }) => {
|
|
7
|
+
const htmlFilePath = path.resolve(__dirname, '../public/radiosSvelte.test.html');
|
|
8
|
+
// Navigue vers le fichier en utilisant le protocole file://
|
|
9
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
+
await expect(page).toHaveScreenshot('radios.png', {fullPage: true});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('choice-group checkbox svelte', {
|
|
14
|
+
tag: ['@svelte', '@checkbox']
|
|
15
|
+
}, async ({ page }) => {
|
|
16
|
+
const htmlFilePath = path.resolve(__dirname, '../public/checkboxSvelte.test.html');
|
|
17
|
+
// Navigue vers le fichier en utilisant le protocole file://
|
|
18
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
19
|
+
await expect(page).toHaveScreenshot('checkbox.png',{fullPage: true});
|
|
20
|
+
});
|
|
@@ -5,15 +5,7 @@ import path = require('path');
|
|
|
5
5
|
test('icon ref', {
|
|
6
6
|
tag: ['@baseline', '@icon']
|
|
7
7
|
}, async ({ page }) => {
|
|
8
|
-
const htmlFilePath = path.resolve(__dirname, '../public/
|
|
8
|
+
const htmlFilePath = path.resolve(__dirname, '../public/iconBaseline.test.html');
|
|
9
9
|
await page.goto(`file://${htmlFilePath}`);
|
|
10
10
|
await expect(page).toHaveScreenshot('icon.png', { fullPage: true });
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
test('icon svelte', {
|
|
14
|
-
tag: ['@svelte', '@icon']
|
|
15
|
-
}, async ({ page }) => {
|
|
16
|
-
const htmlFilePath = path.resolve(__dirname, '../public/iconEmbedded.test.html');
|
|
17
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
18
|
-
await expect(page).toHaveScreenshot('icon.png', { fullPage: true });
|
|
19
|
-
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
test('icon ref', {
|
|
6
|
+
tag: ['@svelte', '@icon']
|
|
7
|
+
}, async ({ page }) => {
|
|
8
|
+
const htmlFilePath = path.resolve(__dirname, '../public/iconSvelte.test.html');
|
|
9
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
+
await expect(page).toHaveScreenshot('icon.png', { fullPage: true });
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
test('pivHeader baseline', {
|
|
6
|
+
tag: ['@baseline', '@piv-header']
|
|
7
|
+
}, async ({ page }) => {
|
|
8
|
+
const htmlFilePath = path.resolve(__dirname, '../public/pivHeaderBaseline.test.html');
|
|
9
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
+
await expect(page).toHaveScreenshot('pivHeader.png', { fullPage: true });
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
test('pivHeader svelte', {
|
|
6
|
+
tag: ['@svelte', '@piv-header']
|
|
7
|
+
}, async ({ page }) => {
|
|
8
|
+
const htmlFilePath = path.resolve(__dirname, '../public/pivHeaderSvelte.test.html');
|
|
9
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
+
await expect(page).toHaveScreenshot('pivHeader.png', { fullPage: true });
|
|
11
|
+
});
|
|
@@ -7,16 +7,7 @@ test.beforeEach(async ({ page }) => {
|
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
/* test des composants web de la trousse */
|
|
10
|
-
test('textfield
|
|
11
|
-
tag: ['@baseline', '@textfield']
|
|
12
|
-
}, async ({ page }) => {
|
|
13
|
-
const htmlFilePath = path.resolve(__dirname, '../public/textField.test.html');
|
|
14
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
15
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
16
|
-
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
17
|
-
});
|
|
18
|
-
/* test des composants svelte */
|
|
19
|
-
test('textfield svelte', {
|
|
10
|
+
test('textfield baseline', {
|
|
20
11
|
tag: ['@baseline', '@textfield']
|
|
21
12
|
}, async ({ page }) => {
|
|
22
13
|
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
@@ -7,7 +7,7 @@ test.beforeEach(async ({ page }) => {
|
|
|
7
7
|
})
|
|
8
8
|
|
|
9
9
|
/* test des composants web de la trousse */
|
|
10
|
-
test('textfield
|
|
10
|
+
test('textfield svelte', {
|
|
11
11
|
tag: ['@svelte', '@textfield']
|
|
12
12
|
}, async ({ page }) => {
|
|
13
13
|
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {expect, test} from "@playwright/test";
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
test('toggleswitch baseline', {
|
|
5
|
+
tag: ['@baseline', '@toggleswitch']
|
|
6
|
+
}, async ({ page }) => {
|
|
7
|
+
const htmlFilePath = path.resolve(__dirname, '../public/toggleSwitchBaseline.test.html');
|
|
8
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
9
|
+
|
|
10
|
+
await expect(page).toHaveScreenshot('toggleSwitch.png', {fullPage: true});
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {expect, test} from "@playwright/test";
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
test('toggleswitch svelte', {
|
|
5
|
+
tag: ['@svelte', '@toggleswitch']
|
|
6
|
+
}, async ({ page }) => {
|
|
7
|
+
const htmlFilePath = path.resolve(__dirname, '../public/toggleSwitchSvelte.test.html');
|
|
8
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
9
|
+
|
|
10
|
+
await expect(page).toHaveScreenshot('toggleSwitch.png', {fullPage: true});
|
|
11
|
+
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { test, expect } from '@playwright/test';
|
|
2
|
-
import path = require('path');
|
|
3
|
-
|
|
4
|
-
test('choice-group radios ref', {
|
|
5
|
-
tag: ['@baseline', '@radios']
|
|
6
|
-
}, async ({ page }) => {
|
|
7
|
-
const htmlFilePath = path.resolve(__dirname, '../public/radios.test.html');
|
|
8
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
9
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
-
await expect(page).toHaveScreenshot('radios.png', {fullPage: true});
|
|
11
|
-
});
|
|
12
|
-
test('choice-group radios svelte', {
|
|
13
|
-
tag: ['@svelte', '@radios']
|
|
14
|
-
}, async ({ page }) => {
|
|
15
|
-
const htmlFilePath = path.resolve(__dirname, '../public/radiosEmbedded.test.html');
|
|
16
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
17
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
18
|
-
await expect(page).toHaveScreenshot('radios.png', {fullPage: true});
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
test('choice-group checkbox ref', {
|
|
22
|
-
tag: ['@baseline', '@checkbox']
|
|
23
|
-
}, async ({ page }) => {
|
|
24
|
-
const htmlFilePath = path.resolve(__dirname, '../public/checkbox.test.html');
|
|
25
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
26
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
27
|
-
await expect(page).toHaveScreenshot('checkbox.png',{fullPage: true});
|
|
28
|
-
});
|
|
29
|
-
test('choice-group checkbox svelte', {
|
|
30
|
-
tag: ['@svelte', '@checkbox']
|
|
31
|
-
}, async ({ page }) => {
|
|
32
|
-
const htmlFilePath = path.resolve(__dirname, '../public/checkboxEmbedded.test.html');
|
|
33
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
34
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
35
|
-
await expect(page).toHaveScreenshot('checkbox.png',{fullPage: true});
|
|
36
|
-
});
|
package/tests/pivHeader.spec.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { test, expect } from '@playwright/test';
|
|
2
|
-
import path = require('path');
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
test('pivHeader ref', {
|
|
6
|
-
tag: ['@baseline', '@piv-header']
|
|
7
|
-
}, async ({ page }) => {
|
|
8
|
-
const htmlFilePath = path.resolve(__dirname, '../public/pivHeader.test.html');
|
|
9
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
10
|
-
await expect(page).toHaveScreenshot('pivHeader.png', { fullPage: true });
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//TODO: test du composant svelte
|
|
15
|
-
|
|
16
|
-
// test('pivHeader svelte', {
|
|
17
|
-
// tag: ['@svelte', '@piv-header']
|
|
18
|
-
// }, async ({ page }) => {
|
|
19
|
-
// const htmlFilePath = path.resolve(__dirname, '../public/pivHeaderEmbedded.test.html');
|
|
20
|
-
// await page.goto(`file://${htmlFilePath}`);
|
|
21
|
-
// await expect(page).toHaveScreenshot('pivHeader.png', { fullPage: true });
|
|
22
|
-
// });
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {expect, test} from "@playwright/test";
|
|
2
|
-
import path = require('path');
|
|
3
|
-
|
|
4
|
-
test('toggleswitch ref', {
|
|
5
|
-
tag: ['@baseline', '@toggleswitch']
|
|
6
|
-
}, async ({ page }) => {
|
|
7
|
-
const htmlFilePath = path.resolve(__dirname, '../public/toggleSwitch.test.html');
|
|
8
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
9
|
-
|
|
10
|
-
await expect(page).toHaveScreenshot('toggleSwitch.png', {fullPage: true});
|
|
11
|
-
});
|
|
12
|
-
/* test des composants svelte */
|
|
13
|
-
test('toggleswitch svelte', {
|
|
14
|
-
tag: ['@svelte', '@toggleswitch']
|
|
15
|
-
}, async ({ page }) => {
|
|
16
|
-
const htmlFilePath = path.resolve(__dirname, '../public/toggleSwitchEmbedded.test.html');
|
|
17
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
18
|
-
|
|
19
|
-
await expect(page).toHaveScreenshot('toggleSwitch.png', {fullPage: true});
|
|
20
|
-
});
|
|
File without changes
|
|
File without changes
|
/package/src/sdg/components/ChoiceGroup/Test/{checkboxTest.html → checkboxBaselineTest.html}
RENAMED
|
File without changes
|
/package/src/sdg/components/ChoiceGroup/Test/{checkboxEmbeddedTest.html → checkboxSvelteTest.html}
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/sdg/components/ChoiceGroup/Test/{radiosEmbeddedTest.html → radiosSvelteTest.html}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/sdg/components/PivHeader/Test/{pivHeaderTest.html → pivHeaderBaselineTest.html}
RENAMED
|
File without changes
|
/package/src/sdg/components/PivHeader/Test/{pivHeaderEmbeddedTest.html → pivHeaderSvelteTest.html}
RENAMED
|
File without changes
|
/package/src/sdg/components/TextField/Test/{textFieldTest.html → textFieldBaselineTest.html}
RENAMED
|
File without changes
|
/package/src/sdg/components/TextField/Test/{textFieldEmbeddedTest.html → textFieldSvelteTest.html}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|