qc-trousse-sdg 1.4.0 → 1.4.2
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 +9 -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 +18 -28
- package/public/css/qc-sdg.css +18 -28
- package/public/js/qc-doc-sdg.js +1382 -451
- package/public/js/qc-sdg.js +1832 -797
- package/rollup.config.js +5 -0
- package/src/sdg/components/DropdownList/DropdownListButton/DropdownListButton.svelte +7 -8
- package/src/sdg/components/DropdownList/DropdownListButton/_dropdownListButton.scss +2 -12
- package/src/sdg/components/TextField/TextField.svelte +7 -5
- package/src/sdg/components/TextField/TextFieldWC.svelte +1 -1
- package/src/sdg/qc-sdg-test.js +1 -1
- 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/{dropdown-list.spec.ts → dropdown-list-baseline.spec.ts} +1 -1
- 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-baseline.spec.ts +28 -0
- package/tests/textfield-svelte.spec.ts +28 -0
- 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/textfield.spec.ts +0 -21
- 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/Button/Test/{buttonTest.html → buttonBaselineTest.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/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,
|
|
@@ -25,19 +25,18 @@
|
|
|
25
25
|
bind:this={button}
|
|
26
26
|
{...rest}
|
|
27
27
|
>
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
{/if}
|
|
34
|
-
</span>
|
|
28
|
+
{#if selectedOptionsText.length > 0}
|
|
29
|
+
<span class="qc-dropdown-choice">{@html selectedOptionsText}</span>
|
|
30
|
+
{:else}
|
|
31
|
+
<span class="qc-dropdown-placeholder">{@html placeholder}</span>
|
|
32
|
+
{/if}
|
|
35
33
|
|
|
36
|
-
<span class={["qc-dropdown-button-icon"
|
|
34
|
+
<span class={["qc-dropdown-button-icon"]}>
|
|
37
35
|
<Icon
|
|
38
36
|
type="chevron-up-thin"
|
|
39
37
|
color={disabled ? "grey-regular" : "blue-piv"}
|
|
40
38
|
size="sm"
|
|
39
|
+
rotate={expanded ? 0 : 180}
|
|
41
40
|
/>
|
|
42
41
|
</span>
|
|
43
42
|
</button>
|
|
@@ -30,12 +30,6 @@ $min-height: 40;
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.qc-dropdown-text {
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-items: start;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
33
|
%dropdown-placeholder-text {
|
|
40
34
|
display: block;
|
|
41
35
|
justify-content: start;
|
|
@@ -56,10 +50,6 @@ $min-height: 40;
|
|
|
56
50
|
}
|
|
57
51
|
|
|
58
52
|
.qc-dropdown-button-icon {
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
display: flex;
|
|
54
|
+
align-content: center;
|
|
61
55
|
}
|
|
62
|
-
|
|
63
|
-
.qc-dropdown-button-icon-expanded {
|
|
64
|
-
transform: rotate(180deg);
|
|
65
|
-
}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
let {
|
|
11
11
|
label = '',
|
|
12
|
-
required = $bindable(),
|
|
12
|
+
required = $bindable(false),
|
|
13
13
|
description,
|
|
14
14
|
size,
|
|
15
15
|
maxlength,
|
|
16
16
|
maxlengthReached = $bindable(false),
|
|
17
17
|
invalidAtSubmit = $bindable(false),
|
|
18
|
-
value = "",
|
|
19
|
-
invalid = $bindable(),
|
|
18
|
+
value = $bindable(""),
|
|
19
|
+
invalid = $bindable(false),
|
|
20
20
|
invalidText,
|
|
21
21
|
describedBy = $bindable([]),
|
|
22
22
|
labelElement = $bindable(),
|
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
}
|
|
72
72
|
})
|
|
73
73
|
|
|
74
|
+
|
|
75
|
+
|
|
74
76
|
$effect(() => {
|
|
75
77
|
charCountText = ''
|
|
76
78
|
if (!maxlength) return;
|
|
@@ -107,8 +109,8 @@
|
|
|
107
109
|
].filter(Boolean)
|
|
108
110
|
.join(' ')
|
|
109
111
|
)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
input.setAttribute('aria-invalid', invalid)
|
|
113
|
+
input.setAttribute('aria-required', required)
|
|
112
114
|
})
|
|
113
115
|
|
|
114
116
|
</script>
|
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";
|
|
@@ -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
|
+
});
|
|
@@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test';
|
|
|
2
2
|
import path = require('path');
|
|
3
3
|
|
|
4
4
|
test.beforeEach(async ({ page }) => {
|
|
5
|
-
const htmlFilePath = path.resolve(__dirname, '../public/
|
|
5
|
+
const htmlFilePath = path.resolve(__dirname, '../public/dropdownListBaseline.test.html');
|
|
6
6
|
await page.goto(`file://${htmlFilePath}`);
|
|
7
7
|
});
|
|
8
8
|
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
test.beforeEach(async ({ page }) => {
|
|
5
|
+
const htmlFilePath = path.resolve(__dirname, '../public/textFieldBaseline.test.html');
|
|
6
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
/* test des composants web de la trousse */
|
|
10
|
+
test('textfield baseline', {
|
|
11
|
+
tag: ['@baseline', '@textfield']
|
|
12
|
+
}, async ({ page }) => {
|
|
13
|
+
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test.describe('Aria', () => {
|
|
17
|
+
test('aria-required', async ({ page }) => {
|
|
18
|
+
await expect(page.getByRole('textbox', { name: 'Large', exact: true })).toHaveAttribute('aria-required', 'true');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('aria-invalid', async ({ page }) => {
|
|
22
|
+
await expect(page.getByRole('textbox', { name: 'Moyen', exact: true })).toHaveAttribute('aria-invalid', 'true');
|
|
23
|
+
|
|
24
|
+
await page.getByRole('textbox', { name: 'Moyen' }).click();
|
|
25
|
+
await page.getByRole('textbox', { name: 'Moyen' }).fill('1');
|
|
26
|
+
await expect(page.getByRole('textbox', { name: 'Moyen', exact: true })).toHaveAttribute('aria-invalid', 'false');
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test';
|
|
2
|
+
import path = require('path');
|
|
3
|
+
|
|
4
|
+
test.beforeEach(async ({ page }) => {
|
|
5
|
+
const htmlFilePath = path.resolve(__dirname, '../public/textFieldSvelte.test.html');
|
|
6
|
+
await page.goto(`file://${htmlFilePath}`);
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
/* test des composants web de la trousse */
|
|
10
|
+
test('textfield svelte', {
|
|
11
|
+
tag: ['@svelte', '@textfield']
|
|
12
|
+
}, async ({ page }) => {
|
|
13
|
+
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test.describe('Aria', () => {
|
|
17
|
+
test('aria-required', async ({ page }) => {
|
|
18
|
+
await expect(page.getByRole('textbox', { name: 'Large', exact: true })).toHaveAttribute('aria-required', 'true');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('aria-invalid', async ({ page }) => {
|
|
22
|
+
await expect(page.getByRole('textbox', { name: 'Moyen', exact: true })).toHaveAttribute('aria-invalid', 'true');
|
|
23
|
+
|
|
24
|
+
await page.getByRole('textbox', { name: 'Moyen' }).click();
|
|
25
|
+
await page.getByRole('textbox', { name: 'Moyen' }).fill('1');
|
|
26
|
+
await expect(page.getByRole('textbox', { name: 'Moyen', exact: true })).toHaveAttribute('aria-invalid', 'false');
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -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
|
-
// });
|
package/tests/textfield.spec.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { test, expect } from '@playwright/test';
|
|
2
|
-
import path = require('path');
|
|
3
|
-
|
|
4
|
-
/* test des composants web de la trousse */
|
|
5
|
-
test('textfield ref', {
|
|
6
|
-
tag: ['@baseline', '@textfield']
|
|
7
|
-
}, async ({ page }) => {
|
|
8
|
-
const htmlFilePath = path.resolve(__dirname, '../public/textField.test.html');
|
|
9
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
10
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
11
|
-
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
12
|
-
});
|
|
13
|
-
/* test des composants svelte */
|
|
14
|
-
test('textfield svelte', {
|
|
15
|
-
tag: ['@svelte', '@textfield']
|
|
16
|
-
}, async ({ page }) => {
|
|
17
|
-
const htmlFilePath = path.resolve(__dirname, '../public/textFieldEmbedded.test.html');
|
|
18
|
-
// Navigue vers le fichier en utilisant le protocole file://
|
|
19
|
-
await page.goto(`file://${htmlFilePath}`);
|
|
20
|
-
await expect(page).toHaveScreenshot('textField.png', {fullPage: true});
|
|
21
|
-
});
|
|
@@ -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
|
|
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
|