ux4g-components-web 1.4.0 → 1.5.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/README.md +76 -0
- package/dist/__tests__/css-bundle.integration.test.d.ts +11 -0
- package/dist/__tests__/css-bundle.integration.test.js +1102 -0
- package/dist/__tests__/css-bundle.phase10.property.test.d.ts +9 -0
- package/dist/__tests__/css-bundle.phase10.property.test.js +64 -0
- package/dist/__tests__/css-bundle.phase5.property.test.d.ts +9 -0
- package/dist/__tests__/css-bundle.phase5.property.test.js +126 -0
- package/dist/__tests__/css-bundle.phase6.property.test.d.ts +9 -0
- package/dist/__tests__/css-bundle.phase6.property.test.js +73 -0
- package/dist/__tests__/css-bundle.phase7.property.test.d.ts +9 -0
- package/dist/__tests__/css-bundle.phase7.property.test.js +76 -0
- package/dist/__tests__/css-bundle.phase8.property.test.d.ts +9 -0
- package/dist/__tests__/css-bundle.phase8.property.test.js +67 -0
- package/dist/__tests__/css-bundle.phase9.property.test.d.ts +9 -0
- package/dist/__tests__/css-bundle.phase9.property.test.js +93 -0
- package/dist/__tests__/css-bundle.property.test.d.ts +14 -0
- package/dist/__tests__/css-bundle.property.test.js +393 -0
- package/dist/__tests__/dom-generators.determinism.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.determinism.property.test.js +71 -0
- package/dist/__tests__/dom-generators.id.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.id.property.test.js +99 -0
- package/dist/__tests__/dom-generators.otp.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.property.test.js +205 -0
- package/dist/__tests__/dom-generators.states.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.table.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.tier1.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.tier1.property.test.js +403 -0
- package/dist/__tests__/dom-generators.validation.property.test.d.ts +1 -0
- package/dist/__tests__/dom-generators.validation.property.test.js +327 -0
- package/dist/__tests__/megamenu.classbuilder.property.test.d.ts +1 -0
- package/dist/__tests__/megamenu.classbuilder.property.test.js +88 -0
- package/dist/__tests__/smoke.test.d.ts +1 -0
- package/dist/__tests__/smoke.test.js +65 -0
- package/dist/__tests__/types.phase10.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase10.property.test.js +166 -0
- package/dist/__tests__/types.phase10.test.d.ts +1 -0
- package/dist/__tests__/types.phase10.test.js +76 -0
- package/dist/__tests__/types.phase3.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase3.property.test.js +83 -0
- package/dist/__tests__/types.phase3.test.d.ts +1 -0
- package/dist/__tests__/types.phase3.test.js +76 -0
- package/dist/__tests__/types.phase4.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase4.property.test.js +119 -0
- package/dist/__tests__/types.phase4.test.d.ts +1 -0
- package/dist/__tests__/types.phase4.test.js +70 -0
- package/dist/__tests__/types.phase5.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase5.property.test.js +120 -0
- package/dist/__tests__/types.phase5.test.d.ts +1 -0
- package/dist/__tests__/types.phase5.test.js +64 -0
- package/dist/__tests__/types.phase6.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase6.property.test.js +189 -0
- package/dist/__tests__/types.phase6.test.d.ts +1 -0
- package/dist/__tests__/types.phase6.test.js +121 -0
- package/dist/__tests__/types.phase7.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase7.property.test.js +217 -0
- package/dist/__tests__/types.phase7.test.d.ts +1 -0
- package/dist/__tests__/types.phase7.test.js +106 -0
- package/dist/__tests__/types.phase8.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase8.property.test.js +224 -0
- package/dist/__tests__/types.phase8.test.d.ts +1 -0
- package/dist/__tests__/types.phase8.test.js +114 -0
- package/dist/__tests__/types.phase9.property.test.d.ts +1 -0
- package/dist/__tests__/types.phase9.property.test.js +347 -0
- package/dist/__tests__/types.phase9.test.d.ts +1 -0
- package/dist/__tests__/types.phase9.test.js +226 -0
- package/dist/__tests__/types.restructure.property.test.d.ts +1 -0
- package/dist/__tests__/types.restructure.property.test.js +76 -0
- package/dist/__tests__/types.test.d.ts +1 -0
- package/dist/__tests__/types.test.js +175 -0
- package/dist/dom-generators/accordion.d.ts +23 -0
- package/dist/dom-generators/avatar.d.ts +19 -0
- package/dist/dom-generators/carousel.d.ts +20 -0
- package/dist/dom-generators/chip.d.ts +18 -0
- package/dist/dom-generators/combobox.d.ts +28 -0
- package/dist/dom-generators/date-picker.d.ts +19 -0
- package/dist/dom-generators/dom-generators/accordion.d.ts +21 -0
- package/dist/dom-generators/dom-generators/avatar.d.ts +17 -0
- package/dist/dom-generators/dom-generators/carousel.d.ts +19 -0
- package/dist/dom-generators/dom-generators/chip.d.ts +16 -0
- package/dist/dom-generators/dom-generators/combobox.d.ts +26 -0
- package/dist/dom-generators/dom-generators/date-picker.d.ts +18 -0
- package/dist/dom-generators/dom-generators/drawer.d.ts +17 -0
- package/dist/dom-generators/dom-generators/dropdown.d.ts +26 -0
- package/dist/dom-generators/dom-generators/file-upload.d.ts +20 -0
- package/dist/dom-generators/dom-generators/id-generator.d.ts +9 -0
- package/dist/dom-generators/dom-generators/index.d.ts +27 -0
- package/dist/dom-generators/dom-generators/modal.d.ts +19 -0
- package/dist/dom-generators/dom-generators/otp.d.ts +16 -0
- package/dist/dom-generators/dom-generators/popover.d.ts +17 -0
- package/dist/dom-generators/dom-generators/progress.d.ts +16 -0
- package/dist/dom-generators/dom-generators/search.d.ts +20 -0
- package/dist/dom-generators/dom-generators/stepper.d.ts +21 -0
- package/dist/dom-generators/dom-generators/table.d.ts +23 -0
- package/dist/dom-generators/dom-generators/tabs.d.ts +21 -0
- package/dist/dom-generators/dom-generators/time-picker.d.ts +18 -0
- package/dist/dom-generators/dom-generators/tooltip.d.ts +17 -0
- package/dist/dom-generators/dom-generators/types.d.ts +27 -0
- package/dist/dom-generators/dom-generators/validate.d.ts +20 -0
- package/dist/dom-generators/drawer.d.ts +19 -0
- package/dist/dom-generators/dropdown.d.ts +28 -0
- package/dist/dom-generators/file-upload.d.ts +22 -0
- package/dist/dom-generators/id-generator.d.ts +9 -0
- package/dist/dom-generators/index.bundled.d.ts +654 -0
- package/dist/dom-generators/index.cjs +2029 -0
- package/dist/dom-generators/index.d.ts +27 -0
- package/dist/dom-generators/index.mjs +2001 -0
- package/dist/dom-generators/modal.d.ts +21 -0
- package/dist/dom-generators/otp.d.ts +18 -0
- package/dist/dom-generators/popover.d.ts +19 -0
- package/dist/dom-generators/progress.d.ts +18 -0
- package/dist/dom-generators/search.d.ts +22 -0
- package/dist/dom-generators/stepper.d.ts +23 -0
- package/dist/dom-generators/table.d.ts +25 -0
- package/dist/dom-generators/tabs.d.ts +23 -0
- package/dist/dom-generators/time-picker.d.ts +19 -0
- package/dist/dom-generators/tooltip.d.ts +19 -0
- package/dist/dom-generators/types.d.ts +155 -0
- package/dist/dom-generators/validate.d.ts +20 -0
- package/dist/runtime/bootstrap.js +59 -0
- package/dist/runtime/index.js +55 -0
- package/dist/types.d.ts +155 -0
- package/dist/types.js +552 -0
- package/package.json +12 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all Phase 10 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase10-components, Property 0
|
|
4
|
+
* Validates: Requirements 1.12, 2.14, 3.16, 6.1–6.6
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 10 component, assert a representative selector from that
|
|
7
|
+
* component's CSS file is present in the built styles/ux4g.css bundle.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all Phase 10 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase10-components, Property 0
|
|
4
|
+
* Validates: Requirements 1.12, 2.14, 3.16, 6.1–6.6
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 10 component, assert a representative selector from that
|
|
7
|
+
* component's CSS file is present in the built styles/ux4g.css bundle.
|
|
8
|
+
*/
|
|
9
|
+
import * as fc from 'fast-check';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
// Resolve path to styles/ux4g.css relative to this test file
|
|
13
|
+
const CSS_BUNDLE_PATH = path.resolve(__dirname, '../../styles/ux4g.css');
|
|
14
|
+
// Representative selectors for each of the 3 new Phase 10 CSS files
|
|
15
|
+
const PHASE10_SELECTORS = [
|
|
16
|
+
// time-slot.css
|
|
17
|
+
'.ux4g-time-slot-weekly-container',
|
|
18
|
+
'.ux4g-time-slot-compact-container',
|
|
19
|
+
// footer.css
|
|
20
|
+
'.ux4g-footer-primary',
|
|
21
|
+
'.ux4g-footer-dark',
|
|
22
|
+
// result-list.css
|
|
23
|
+
'.ux4g-result-list',
|
|
24
|
+
'.ux4g-result-list-v1',
|
|
25
|
+
];
|
|
26
|
+
/**
|
|
27
|
+
* Property 0: CSS bundle contains all Phase 10 component selectors
|
|
28
|
+
* Tag: Feature: ux4g-phase10-components, Property 0
|
|
29
|
+
* Validates: Requirements 1.12, 2.14, 3.16, 6.1–6.6
|
|
30
|
+
*/
|
|
31
|
+
describe('Property 0: CSS bundle contains all Phase 10 component selectors', () => {
|
|
32
|
+
let cssContent;
|
|
33
|
+
beforeAll(() => {
|
|
34
|
+
if (fs.existsSync(CSS_BUNDLE_PATH)) {
|
|
35
|
+
cssContent = fs.readFileSync(CSS_BUNDLE_PATH, 'utf8');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
cssContent = '';
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
it('styles/ux4g.css exists', () => {
|
|
42
|
+
expect(fs.existsSync(CSS_BUNDLE_PATH)).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* For any selector from the Phase 10 selector set,
|
|
46
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
47
|
+
*
|
|
48
|
+
* Uses fc.constant(true) as the trivial arbitrary since the CSS bundle is a
|
|
49
|
+
* static file read from disk on each run — the property holds unconditionally
|
|
50
|
+
* on every run.
|
|
51
|
+
*
|
|
52
|
+
* **Validates: Requirements 1.12, 2.14, 3.16, 6.1–6.6**
|
|
53
|
+
*/
|
|
54
|
+
it('Feature: ux4g-phase10-components, Property 0 — CSS bundle contains all Phase 10 component selectors', () => {
|
|
55
|
+
fc.assert(fc.property(fc.constant(true), (_) => {
|
|
56
|
+
for (const selector of PHASE10_SELECTORS) {
|
|
57
|
+
if (!cssContent.includes(selector)) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
}), { numRuns: 5 });
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 10: CSS bundle contains all new Phase 5 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase5-components, Property 10
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 5 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 10: CSS bundle contains all new Phase 5 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase5-components, Property 10
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 5 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
import * as fc from 'fast-check';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
// Resolve path to styles/ux4g.css relative to this test file
|
|
13
|
+
const CSS_BUNDLE_PATH = path.resolve(__dirname, '../../styles/ux4g.css');
|
|
14
|
+
// Representative selectors for each Phase 5 component
|
|
15
|
+
const CHECKBOX_SELECTORS = [
|
|
16
|
+
'.ux4g-checkbox',
|
|
17
|
+
'.ux4g-checkbox-sm',
|
|
18
|
+
'.ux4g-checkbox-md',
|
|
19
|
+
'.ux4g-checkbox-lg',
|
|
20
|
+
'.ux4g-checkbox-error',
|
|
21
|
+
];
|
|
22
|
+
const RADIO_SELECTORS = [
|
|
23
|
+
'.ux4g-radio',
|
|
24
|
+
'.ux4g-radio-sm',
|
|
25
|
+
'.ux4g-radio-md',
|
|
26
|
+
'.ux4g-radio-lg',
|
|
27
|
+
'.ux4g-radio-error',
|
|
28
|
+
];
|
|
29
|
+
const SWITCH_SELECTORS = [
|
|
30
|
+
'.ux4g-switch',
|
|
31
|
+
'.ux4g-switch-sm',
|
|
32
|
+
'.ux4g-switch-md',
|
|
33
|
+
'.ux4g-switch-lg',
|
|
34
|
+
];
|
|
35
|
+
const CARD_SELECTORS = [
|
|
36
|
+
'.ux4g-card',
|
|
37
|
+
'.ux4g-card-solid',
|
|
38
|
+
'.ux4g-card-outline',
|
|
39
|
+
'.ux4g-card-vertical',
|
|
40
|
+
'.ux4g-card-horizontal',
|
|
41
|
+
];
|
|
42
|
+
const INPUT_SELECTORS = [
|
|
43
|
+
'.ux4g-input-container',
|
|
44
|
+
'.ux4g-input-sm',
|
|
45
|
+
'.ux4g-input-md',
|
|
46
|
+
'.ux4g-input-lg',
|
|
47
|
+
'.ux4g-input-xl',
|
|
48
|
+
'.ux4g-input-default',
|
|
49
|
+
'.ux4g-input-error',
|
|
50
|
+
'.ux4g-input-success',
|
|
51
|
+
'.ux4g-input-warning',
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Property 10: CSS bundle contains all new Phase 5 component selectors
|
|
55
|
+
* Tag: Feature: ux4g-phase5-components, Property 10
|
|
56
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5
|
|
57
|
+
*/
|
|
58
|
+
describe('Property 10: CSS bundle contains all new Phase 5 component selectors', () => {
|
|
59
|
+
let cssContent;
|
|
60
|
+
beforeAll(() => {
|
|
61
|
+
if (fs.existsSync(CSS_BUNDLE_PATH)) {
|
|
62
|
+
cssContent = fs.readFileSync(CSS_BUNDLE_PATH, 'utf8');
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
cssContent = '';
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
it('styles/ux4g.css exists', () => {
|
|
69
|
+
expect(fs.existsSync(CSS_BUNDLE_PATH)).toBe(true);
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* For any selector from the Checkbox selector set,
|
|
73
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
74
|
+
*
|
|
75
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5**
|
|
76
|
+
*/
|
|
77
|
+
it('Feature: ux4g-phase5-components, Property 10 — CSS bundle contains Checkbox selectors', () => {
|
|
78
|
+
fc.assert(fc.property(fc.constantFrom(...CHECKBOX_SELECTORS), (selector) => {
|
|
79
|
+
return cssContent.includes(selector);
|
|
80
|
+
}), { numRuns: 20 });
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* For any selector from the Radio selector set,
|
|
84
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
85
|
+
*
|
|
86
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5**
|
|
87
|
+
*/
|
|
88
|
+
it('Feature: ux4g-phase5-components, Property 10 — CSS bundle contains Radio selectors', () => {
|
|
89
|
+
fc.assert(fc.property(fc.constantFrom(...RADIO_SELECTORS), (selector) => {
|
|
90
|
+
return cssContent.includes(selector);
|
|
91
|
+
}), { numRuns: 20 });
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* For any selector from the Switch selector set,
|
|
95
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
96
|
+
*
|
|
97
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5**
|
|
98
|
+
*/
|
|
99
|
+
it('Feature: ux4g-phase5-components, Property 10 — CSS bundle contains Switch selectors', () => {
|
|
100
|
+
fc.assert(fc.property(fc.constantFrom(...SWITCH_SELECTORS), (selector) => {
|
|
101
|
+
return cssContent.includes(selector);
|
|
102
|
+
}), { numRuns: 20 });
|
|
103
|
+
});
|
|
104
|
+
/**
|
|
105
|
+
* For any selector from the Card selector set,
|
|
106
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
107
|
+
*
|
|
108
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5**
|
|
109
|
+
*/
|
|
110
|
+
it('Feature: ux4g-phase5-components, Property 10 — CSS bundle contains Card selectors', () => {
|
|
111
|
+
fc.assert(fc.property(fc.constantFrom(...CARD_SELECTORS), (selector) => {
|
|
112
|
+
return cssContent.includes(selector);
|
|
113
|
+
}), { numRuns: 20 });
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* For any selector from the Input selector set,
|
|
117
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
118
|
+
*
|
|
119
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5**
|
|
120
|
+
*/
|
|
121
|
+
it('Feature: ux4g-phase5-components, Property 10 — CSS bundle contains Input selectors', () => {
|
|
122
|
+
fc.assert(fc.property(fc.constantFrom(...INPUT_SELECTORS), (selector) => {
|
|
123
|
+
return cssContent.includes(selector);
|
|
124
|
+
}), { numRuns: 20 });
|
|
125
|
+
});
|
|
126
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 6 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase6-components, Property 0
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 6 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 6 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase6-components, Property 0
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 6 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
import * as fc from 'fast-check';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
// Resolve path to styles/ux4g.css relative to this test file
|
|
13
|
+
const CSS_BUNDLE_PATH = path.resolve(__dirname, '../../styles/ux4g.css');
|
|
14
|
+
// Representative selectors for each Phase 6 component
|
|
15
|
+
// Note: .ux4g-dropdown-selection does NOT exist as a standalone class in the vendor CSS —
|
|
16
|
+
// the selection type is styled implicitly via :not(.ux4g-dropdown-button):not(.ux4g-dropdown-overflow).
|
|
17
|
+
// We use .ux4g-dropdown-button as the representative dropdown type selector instead.
|
|
18
|
+
const PHASE6_SELECTORS = [
|
|
19
|
+
// List
|
|
20
|
+
'.ux4g-list',
|
|
21
|
+
'.ux4g-list-default',
|
|
22
|
+
'.ux4g-list-m',
|
|
23
|
+
// Dropdown
|
|
24
|
+
'.ux4g-dropdown',
|
|
25
|
+
'.ux4g-dropdown-button',
|
|
26
|
+
'.ux4g-dropdown-md',
|
|
27
|
+
// Combobox
|
|
28
|
+
'.ux4g-combobox',
|
|
29
|
+
'.ux4g-combobox-single',
|
|
30
|
+
'.ux4g-combobox-md',
|
|
31
|
+
// Modal
|
|
32
|
+
'.ux4g-modal-backdrop',
|
|
33
|
+
'.ux4g-modal-m',
|
|
34
|
+
'.ux4g-modal-backdrop-50',
|
|
35
|
+
// Alert / Toast
|
|
36
|
+
'.ux4g-alert',
|
|
37
|
+
'.ux4g-alert-info',
|
|
38
|
+
'.ux4g-context-alert',
|
|
39
|
+
'.ux4g-alert-container',
|
|
40
|
+
// Search
|
|
41
|
+
'.ux4g-search-container',
|
|
42
|
+
'.ux4g-search-m',
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* Property 0: CSS bundle contains all new Phase 6 component selectors
|
|
46
|
+
* Tag: Feature: ux4g-phase6-components, Property 0
|
|
47
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
|
48
|
+
*/
|
|
49
|
+
describe('Property 0: CSS bundle contains all new Phase 6 component selectors', () => {
|
|
50
|
+
let cssContent;
|
|
51
|
+
beforeAll(() => {
|
|
52
|
+
if (fs.existsSync(CSS_BUNDLE_PATH)) {
|
|
53
|
+
cssContent = fs.readFileSync(CSS_BUNDLE_PATH, 'utf8');
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
cssContent = '';
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
it('styles/ux4g.css exists', () => {
|
|
60
|
+
expect(fs.existsSync(CSS_BUNDLE_PATH)).toBe(true);
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* For any selector from the Phase 6 selector set,
|
|
64
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
65
|
+
*
|
|
66
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6**
|
|
67
|
+
*/
|
|
68
|
+
it('Feature: ux4g-phase6-components, Property 0 — CSS bundle contains all Phase 6 component selectors', () => {
|
|
69
|
+
fc.assert(fc.property(fc.constantFrom(...PHASE6_SELECTORS), (selector) => {
|
|
70
|
+
return cssContent.includes(selector);
|
|
71
|
+
}), { numRuns: 20 });
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 7 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase7-components, Property 0
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 7 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 7 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase7-components, Property 0
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 7 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
import * as fc from 'fast-check';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
// Resolve path to styles/ux4g.css relative to this test file
|
|
13
|
+
const CSS_BUNDLE_PATH = path.resolve(__dirname, '../../styles/ux4g.css');
|
|
14
|
+
// Representative selectors for each Phase 7 component
|
|
15
|
+
const PHASE7_SELECTORS = [
|
|
16
|
+
// Pagination
|
|
17
|
+
'.ux4g-pagination',
|
|
18
|
+
'.ux4g-pagination-dotted',
|
|
19
|
+
'.ux4g-pagination-solid',
|
|
20
|
+
'.ux4g-pagination-translucent',
|
|
21
|
+
// Table
|
|
22
|
+
'.ux4g-table',
|
|
23
|
+
'.ux4g-table-m',
|
|
24
|
+
'.ux4g-table-column-dividers',
|
|
25
|
+
'.ux4g-table-zebra-rows',
|
|
26
|
+
'.ux4g-table-interactive',
|
|
27
|
+
// Popover
|
|
28
|
+
'.ux4g-popover',
|
|
29
|
+
'.ux4g-popover-bottom',
|
|
30
|
+
'.ux4g-popover-top-start',
|
|
31
|
+
// Tooltip
|
|
32
|
+
'.ux4g-tooltip-wrapper',
|
|
33
|
+
'.ux4g-tooltip',
|
|
34
|
+
'.ux4g-tooltip-top-center',
|
|
35
|
+
'.ux4g-tooltip-s',
|
|
36
|
+
// Tab
|
|
37
|
+
'.ux4g-tab',
|
|
38
|
+
'.ux4g-tab-underline',
|
|
39
|
+
'.ux4g-tab-md',
|
|
40
|
+
'.ux4g-tab-vertical',
|
|
41
|
+
// Icon Button
|
|
42
|
+
'.ux4g-icon-btn',
|
|
43
|
+
'.ux4g-icon-btn-primary',
|
|
44
|
+
'.ux4g-icon-btn-md',
|
|
45
|
+
'.ux4g-icon-btn-pill',
|
|
46
|
+
];
|
|
47
|
+
/**
|
|
48
|
+
* Property 0: CSS bundle contains all new Phase 7 component selectors
|
|
49
|
+
* Tag: Feature: ux4g-phase7-components, Property 0
|
|
50
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
|
|
51
|
+
*/
|
|
52
|
+
describe('Property 0: CSS bundle contains all new Phase 7 component selectors', () => {
|
|
53
|
+
let cssContent;
|
|
54
|
+
beforeAll(() => {
|
|
55
|
+
if (fs.existsSync(CSS_BUNDLE_PATH)) {
|
|
56
|
+
cssContent = fs.readFileSync(CSS_BUNDLE_PATH, 'utf8');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
cssContent = '';
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
it('styles/ux4g.css exists', () => {
|
|
63
|
+
expect(fs.existsSync(CSS_BUNDLE_PATH)).toBe(true);
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* For any selector from the Phase 7 selector set,
|
|
67
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
68
|
+
*
|
|
69
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6**
|
|
70
|
+
*/
|
|
71
|
+
it('Feature: ux4g-phase7-components, Property 0 — CSS bundle contains all Phase 7 component selectors', () => {
|
|
72
|
+
fc.assert(fc.property(fc.constantFrom(...PHASE7_SELECTORS), (selector) => {
|
|
73
|
+
return cssContent.includes(selector);
|
|
74
|
+
}), { numRuns: 20 });
|
|
75
|
+
});
|
|
76
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 8 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase8-components, Property 0
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 8 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 8 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase8-components, Property 0
|
|
4
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 8 component, generate a representative selector from that
|
|
7
|
+
* component's set and assert it is present in the CSS bundle.
|
|
8
|
+
*/
|
|
9
|
+
import * as fc from 'fast-check';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
// Resolve path to styles/ux4g.css relative to this test file
|
|
13
|
+
const CSS_BUNDLE_PATH = path.resolve(__dirname, '../../styles/ux4g.css');
|
|
14
|
+
// Representative selectors for each Phase 8 component
|
|
15
|
+
const PHASE8_SELECTORS = [
|
|
16
|
+
// Accessibility Bar
|
|
17
|
+
'.ux4g-topbar',
|
|
18
|
+
'.ux4g-topbar__wrap',
|
|
19
|
+
'.ux4g-topbar__skip',
|
|
20
|
+
// Accordion
|
|
21
|
+
'.ux4g-accordion',
|
|
22
|
+
'.ux4g-accordion-arrow-left',
|
|
23
|
+
'.ux4g-accordion-bordered',
|
|
24
|
+
// Stepper
|
|
25
|
+
'.ux4g-stepper',
|
|
26
|
+
'.ux4g-stepper-vertical',
|
|
27
|
+
'.ux4g-stepper-horizontal',
|
|
28
|
+
'.ux4g-stepper-center',
|
|
29
|
+
'.ux4g-stepper-bottom-line',
|
|
30
|
+
// Slider
|
|
31
|
+
'.ux4g-slider-field',
|
|
32
|
+
'.ux4g-slider-md',
|
|
33
|
+
// Drawer
|
|
34
|
+
'.ux4g-drawer',
|
|
35
|
+
'.ux4g-drawer-right',
|
|
36
|
+
'.ux4g-drawer-open',
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Property 0: CSS bundle contains all new Phase 8 component selectors
|
|
40
|
+
* Tag: Feature: ux4g-phase8-components, Property 0
|
|
41
|
+
* Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5
|
|
42
|
+
*/
|
|
43
|
+
describe('Property 0: CSS bundle contains all new Phase 8 component selectors', () => {
|
|
44
|
+
let cssContent;
|
|
45
|
+
beforeAll(() => {
|
|
46
|
+
if (fs.existsSync(CSS_BUNDLE_PATH)) {
|
|
47
|
+
cssContent = fs.readFileSync(CSS_BUNDLE_PATH, 'utf8');
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
cssContent = '';
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
it('styles/ux4g.css exists', () => {
|
|
54
|
+
expect(fs.existsSync(CSS_BUNDLE_PATH)).toBe(true);
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* For any selector from the Phase 8 selector set,
|
|
58
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
59
|
+
*
|
|
60
|
+
* **Validates: Requirements 2.1, 2.2, 2.3, 2.4, 2.5**
|
|
61
|
+
*/
|
|
62
|
+
it('Feature: ux4g-phase8-components, Property 0 — CSS bundle contains all Phase 8 component selectors', () => {
|
|
63
|
+
fc.assert(fc.property(fc.constantFrom(...PHASE8_SELECTORS), (selector) => {
|
|
64
|
+
return cssContent.includes(selector);
|
|
65
|
+
}), { numRuns: 20 });
|
|
66
|
+
});
|
|
67
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 9 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase9-components, Property 0
|
|
4
|
+
* Validates: Requirements 16.5-16.18
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 9 component, assert a representative selector from that
|
|
7
|
+
* component's CSS file is present in the built styles/ux4g.css bundle.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 0: CSS bundle contains all new Phase 9 component selectors
|
|
3
|
+
* Tag: Feature: ux4g-phase9-components, Property 0
|
|
4
|
+
* Validates: Requirements 16.5-16.18
|
|
5
|
+
*
|
|
6
|
+
* For each Phase 9 component, assert a representative selector from that
|
|
7
|
+
* component's CSS file is present in the built styles/ux4g.css bundle.
|
|
8
|
+
*/
|
|
9
|
+
import * as fc from 'fast-check';
|
|
10
|
+
import * as fs from 'fs';
|
|
11
|
+
import * as path from 'path';
|
|
12
|
+
// Resolve path to styles/ux4g.css relative to this test file
|
|
13
|
+
const CSS_BUNDLE_PATH = path.resolve(__dirname, '../../styles/ux4g.css');
|
|
14
|
+
// Representative selectors for each of the 14 new Phase 9 CSS files
|
|
15
|
+
const PHASE9_SELECTORS = [
|
|
16
|
+
// date-time.css
|
|
17
|
+
'.ux4g-date-picker-container',
|
|
18
|
+
'.ux4g-time-picker-container',
|
|
19
|
+
// status-pipeline.css
|
|
20
|
+
'.ux4g-status-pipeline-stepper',
|
|
21
|
+
'.ux4g-status-pipeline-vertical',
|
|
22
|
+
// journey-timeline.css
|
|
23
|
+
'.ux4g-journey-timeline',
|
|
24
|
+
'.ux4g-journey-timeline--vertical',
|
|
25
|
+
// form-field-group.css
|
|
26
|
+
'.ux4g-form-group',
|
|
27
|
+
// otp.css
|
|
28
|
+
'.ux4g-otp',
|
|
29
|
+
'.ux4g-otp-success',
|
|
30
|
+
// upload.css
|
|
31
|
+
'.ux4g-upload',
|
|
32
|
+
'.ux4g-upload-state-error',
|
|
33
|
+
// progress-indicator.css
|
|
34
|
+
'.ux4g-progress-bar',
|
|
35
|
+
'.ux4g-progress-circle',
|
|
36
|
+
// feedback.css
|
|
37
|
+
'.ux4g-feedback',
|
|
38
|
+
// draft-status-bar.css
|
|
39
|
+
'.ux4g-draft-status-bar',
|
|
40
|
+
'.ux4g-auto-draft-status-bar',
|
|
41
|
+
'.ux4g-success-draft-status-bar',
|
|
42
|
+
// sla-progress-indicator.css
|
|
43
|
+
'.ux4g-sla-circle',
|
|
44
|
+
'.ux4g-sla-linear',
|
|
45
|
+
'.ux4g-sla-badge',
|
|
46
|
+
// carousel.css
|
|
47
|
+
'.ux4g-carousel',
|
|
48
|
+
// empty-state.css
|
|
49
|
+
'.ux4g-empty-state',
|
|
50
|
+
// chips-group.css
|
|
51
|
+
'.ux4g-filter-chip-group',
|
|
52
|
+
'.ux4g-choice-chip-group',
|
|
53
|
+
// navbar.css
|
|
54
|
+
'.ux4g-navbar',
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* Property 0: CSS bundle contains all new Phase 9 component selectors
|
|
58
|
+
* Tag: Feature: ux4g-phase9-components, Property 0
|
|
59
|
+
* Validates: Requirements 16.5-16.18
|
|
60
|
+
*/
|
|
61
|
+
describe('Property 0: CSS bundle contains all new Phase 9 component selectors', () => {
|
|
62
|
+
let cssContent;
|
|
63
|
+
beforeAll(() => {
|
|
64
|
+
if (fs.existsSync(CSS_BUNDLE_PATH)) {
|
|
65
|
+
cssContent = fs.readFileSync(CSS_BUNDLE_PATH, 'utf8');
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
cssContent = '';
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
it('styles/ux4g.css exists', () => {
|
|
72
|
+
expect(fs.existsSync(CSS_BUNDLE_PATH)).toBe(true);
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* For any selector from the Phase 9 selector set,
|
|
76
|
+
* that selector SHALL appear in styles/ux4g.css.
|
|
77
|
+
*
|
|
78
|
+
* Uses fc.constant(null) as the trivial arbitrary since the CSS bundle is a
|
|
79
|
+
* static file — the property holds unconditionally on every run.
|
|
80
|
+
*
|
|
81
|
+
* **Validates: Requirements 16.5-16.18**
|
|
82
|
+
*/
|
|
83
|
+
it('Feature: ux4g-phase9-components, Property 0 — CSS bundle contains all Phase 9 component selectors', () => {
|
|
84
|
+
fc.assert(fc.property(fc.constant(null), (_) => {
|
|
85
|
+
for (const selector of PHASE9_SELECTORS) {
|
|
86
|
+
if (!cssContent.includes(selector)) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}), { numRuns: 20 });
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property 1: CSS bundle contains all button class names
|
|
3
|
+
* Tag: Feature: ux4g-button-npm-package, Property 1
|
|
4
|
+
* Validates: Requirements 2.3, 2.5, 2.6
|
|
5
|
+
*
|
|
6
|
+
* Property 2: CSS class names are ux4g-prefixed
|
|
7
|
+
* Tag: Feature: ux4g-button-npm-package, Property 2
|
|
8
|
+
* Validates: Requirements 2.8
|
|
9
|
+
*
|
|
10
|
+
* Property 3: CSS bundle preserves layer ordering
|
|
11
|
+
* Tag: Feature: ux4g-button-npm-package, Property 3
|
|
12
|
+
* Validates: Requirements 2.1
|
|
13
|
+
*/
|
|
14
|
+
export {};
|