@ibgib/web-gib 0.0.59 → 0.0.60
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/dist/AUTO-GENERATED-version.d.mts +1 -1
- package/dist/AUTO-GENERATED-version.mjs +1 -1
- package/dist/identity/custodian-delegate-helper.d.mts.map +1 -1
- package/dist/identity/custodian-delegate-helper.mjs +20 -3
- package/dist/identity/custodian-delegate-helper.mjs.map +1 -1
- package/dist/identity/identity-constants.mjs +2 -2
- package/dist/identity/identity-constants.mjs.map +1 -1
- package/dist/identity/identity-types.d.mts +4 -4
- package/dist/identity/identity-types.d.mts.map +1 -1
- package/dist/ui/component/identity/add-device/add-device.css +93 -17
- package/dist/ui/component/identity/add-device/add-device.d.mts +24 -7
- package/dist/ui/component/identity/add-device/add-device.d.mts.map +1 -1
- package/dist/ui/component/identity/add-device/add-device.html +97 -23
- package/dist/ui/component/identity/add-device/add-device.mjs +490 -186
- package/dist/ui/component/identity/add-device/add-device.mjs.map +1 -1
- package/dist/ui/component/identity/keystone-creator/keystone-creator.d.mts.map +1 -1
- package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs +7 -4
- package/dist/ui/component/identity/keystone-creator/keystone-creator.mjs.map +1 -1
- package/dist/ui/component/identity/keystone-details/keystone-details.css +1 -1
- package/dist/ui/component/identity/keystone-details/keystone-details.d.mts +8 -8
- package/dist/ui/component/identity/keystone-details/keystone-details.d.mts.map +1 -1
- package/dist/ui/component/identity/keystone-details/keystone-details.html +29 -20
- package/dist/ui/component/identity/keystone-details/keystone-details.mjs +51 -51
- package/dist/ui/component/identity/keystone-details/keystone-details.mjs.map +1 -1
- package/dist/ui/component/identity/remove-device/remove-device.d.mts +1 -1
- package/dist/ui/component/identity/remove-device/remove-device.d.mts.map +1 -1
- package/dist/ui/component/identity/remove-device/remove-device.html +3 -3
- package/dist/ui/component/identity/remove-device/remove-device.mjs +7 -7
- package/dist/ui/component/identity/remove-device/remove-device.mjs.map +1 -1
- package/dist/util/device-helper.d.mts +30 -0
- package/dist/util/device-helper.d.mts.map +1 -0
- package/dist/util/device-helper.mjs +90 -0
- package/dist/util/device-helper.mjs.map +1 -0
- package/dist/util/device-helper.respec.d.mts +2 -0
- package/dist/util/device-helper.respec.d.mts.map +1 -0
- package/dist/util/device-helper.respec.mjs +83 -0
- package/dist/util/device-helper.respec.mjs.map +1 -0
- package/package.json +3 -3
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/identity/custodian-delegate-helper.mts +28 -3
- package/src/identity/identity-constants.mts +2 -2
- package/src/identity/identity-types.mts +4 -4
- package/src/ui/component/identity/add-device/add-device.css +93 -17
- package/src/ui/component/identity/add-device/add-device.html +97 -23
- package/src/ui/component/identity/add-device/add-device.mts +577 -194
- package/src/ui/component/identity/keystone-creator/keystone-creator.mts +7 -4
- package/src/ui/component/identity/keystone-details/keystone-details.css +1 -1
- package/src/ui/component/identity/keystone-details/keystone-details.html +29 -20
- package/src/ui/component/identity/keystone-details/keystone-details.mts +57 -57
- package/src/ui/component/identity/remove-device/remove-device.html +3 -3
- package/src/ui/component/identity/remove-device/remove-device.mts +8 -8
- package/src/util/device-helper.mts +104 -0
- package/src/util/device-helper.respec.mts +90 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
respecfully, iReckon, ifWeMight, ifWe // DO NOT REMOVE ifWeMight or ifWe even if no longer used. We constantly change these when focusing tests
|
|
3
|
+
} from '@ibgib/helper-gib/dist/respec-gib/respec-gib.mjs';
|
|
4
|
+
const maam = `[${import.meta.url}]`, sir = maam;
|
|
5
|
+
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
6
|
+
import { generateDefaultDeviceTag } from './device-helper.mjs';
|
|
7
|
+
|
|
8
|
+
await respecfully(sir, 'device-helper', async () => {
|
|
9
|
+
|
|
10
|
+
await ifWe(sir, 'generate clean tag for Desktop Windows Chrome', async () => {
|
|
11
|
+
const lc = `[generate clean tag for Desktop Windows Chrome]`;
|
|
12
|
+
try {
|
|
13
|
+
const tag = generateDefaultDeviceTag({
|
|
14
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
15
|
+
userAgentData: { platform: 'Windows', mobile: false },
|
|
16
|
+
randomSuffix: 'a1b2'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
iReckon(sir, tag).asTo('tag value').isGonnaBe('chrome-win-a1b2');
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
await ifWe(sir, 'generate clean tag for Mobile iOS Safari (iPhone)', async () => {
|
|
27
|
+
const lc = `[generate clean tag for Mobile iOS Safari (iPhone)]`;
|
|
28
|
+
try {
|
|
29
|
+
const tag = generateDefaultDeviceTag({
|
|
30
|
+
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1',
|
|
31
|
+
userAgentData: { platform: 'iOS', mobile: true },
|
|
32
|
+
randomSuffix: '3c4d'
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
iReckon(sir, tag).asTo('tag value').isGonnaBe('mobile-safari-ios-3c4d');
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
await ifWe(sir, 'generate clean tag for Android Chrome Phone', async () => {
|
|
43
|
+
const lc = `[generate clean tag for Android Chrome Phone]`;
|
|
44
|
+
try {
|
|
45
|
+
const tag = generateDefaultDeviceTag({
|
|
46
|
+
userAgent: 'Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36',
|
|
47
|
+
userAgentData: { platform: 'Android', mobile: true },
|
|
48
|
+
randomSuffix: '9e8f'
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
iReckon(sir, tag).asTo('tag value').isGonnaBe('mobile-chrome-android-9e8f');
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
await ifWe(sir, 'generate clean tag for iPad / Tablet', async () => {
|
|
59
|
+
const lc = `[generate clean tag for iPad / Tablet]`;
|
|
60
|
+
try {
|
|
61
|
+
const tag = generateDefaultDeviceTag({
|
|
62
|
+
userAgent: 'Mozilla/5.0 (iPad; CPU OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1',
|
|
63
|
+
maxTouchPoints: 5,
|
|
64
|
+
screenWidth: 1024,
|
|
65
|
+
randomSuffix: '7a8b'
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
iReckon(sir, tag).asTo('tag value').isGonnaBe('tablet-safari-ios-7a8b');
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
await ifWe(sir, 'generate fallback tag with random 4-char suffix when no hints are present', async () => {
|
|
76
|
+
const lc = `[generate fallback tag with random 4-char suffix]`;
|
|
77
|
+
try {
|
|
78
|
+
const tag = generateDefaultDeviceTag({
|
|
79
|
+
userAgent: '',
|
|
80
|
+
randomSuffix: '1234'
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
iReckon(sir, tag).asTo('tag value').isGonnaBe('device-1234');
|
|
84
|
+
} catch (error) {
|
|
85
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
});
|