@descope-ui/descope-trusted-devices 3.4.0 → 3.5.1

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 CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@descope-ui/descope-trusted-devices",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
+ "files": [
5
+ "src",
6
+ "stories"
7
+ ],
4
8
  "exports": {
5
9
  ".": {
6
10
  "import": "./src/component/index.js"
@@ -14,17 +18,17 @@
14
18
  },
15
19
  "devDependencies": {
16
20
  "@playwright/test": "1.58.2",
17
- "e2e-utils": "3.4.0"
21
+ "e2e-utils": "3.5.1"
18
22
  },
19
23
  "dependencies": {
20
- "@descope-ui/theme-globals": "3.4.0",
21
- "@descope-ui/descope-list-item": "3.4.0",
22
- "@descope-ui/common": "3.4.0",
23
- "@descope-ui/descope-list": "3.4.0",
24
- "@descope-ui/descope-text": "3.4.0",
25
- "@descope-ui/descope-link": "3.4.0",
26
- "@descope-ui/descope-icon": "3.4.0",
27
- "@descope-ui/descope-badge": "3.4.0"
24
+ "@descope-ui/theme-globals": "3.5.1",
25
+ "@descope-ui/descope-list": "3.5.1",
26
+ "@descope-ui/descope-list-item": "3.5.1",
27
+ "@descope-ui/common": "3.5.1",
28
+ "@descope-ui/descope-text": "3.5.1",
29
+ "@descope-ui/descope-link": "3.5.1",
30
+ "@descope-ui/descope-badge": "3.5.1",
31
+ "@descope-ui/descope-icon": "3.5.1"
28
32
  },
29
33
  "publishConfig": {
30
34
  "link-workspace-packages": false
package/CHANGELOG.md DELETED
@@ -1,264 +0,0 @@
1
- # Changelog
2
-
3
- This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
-
5
- ## [3.4.0](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.5...web-components-ui-3.4.0) (2026-05-07)
6
-
7
- ## [3.3.5](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.4...web-components-ui-3.3.5) (2026-05-06)
8
-
9
- ## [3.3.4](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.3...web-components-ui-3.3.4) (2026-05-06)
10
-
11
- ## [3.3.3](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.2...web-components-ui-3.3.3) (2026-05-03)
12
-
13
- ## [3.3.2](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.1...web-components-ui-3.3.2) (2026-04-26)
14
-
15
- ## [3.3.1](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.0...web-components-ui-3.3.1) (2026-04-23)
16
-
17
- ## [3.3.0](https://github.com/descope/web-components-ui/compare/web-components-ui-3.2.2...web-components-ui-3.3.0) (2026-04-19)
18
-
19
- ## [3.2.2](https://github.com/descope/web-components-ui/compare/web-components-ui-3.2.1...web-components-ui-3.2.2) (2026-04-16)
20
-
21
- ## [3.2.1](https://github.com/descope/web-components-ui/compare/web-components-ui-3.2.0...web-components-ui-3.2.1) (2026-04-16)
22
-
23
- ## [3.2.0](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.13...web-components-ui-3.2.0) (2026-04-16)
24
-
25
- ## [3.1.13](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.12...web-components-ui-3.1.13) (2026-04-15)
26
-
27
- ## [3.1.12](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.11...web-components-ui-3.1.12) (2026-04-15)
28
-
29
- ## [3.1.11](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.10...web-components-ui-3.1.11) (2026-04-15)
30
-
31
- ## [3.1.10](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.9...web-components-ui-3.1.10) (2026-04-14)
32
-
33
- ## [3.1.9](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.8...web-components-ui-3.1.9) (2026-04-13)
34
-
35
- ## [3.1.8](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.7...web-components-ui-3.1.8) (2026-04-13)
36
-
37
- ## [3.1.7](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.6...web-components-ui-3.1.7) (2026-04-13)
38
-
39
- ## [3.1.6](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.5...web-components-ui-3.1.6) (2026-04-13)
40
-
41
- ## [3.1.5](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.4...web-components-ui-3.1.5) (2026-04-07)
42
-
43
- ## [3.1.4](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.3...web-components-ui-3.1.4) (2026-04-07)
44
-
45
- ## [3.1.3](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.2...web-components-ui-3.1.3) (2026-04-06)
46
-
47
- ## [3.1.2](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.1...web-components-ui-3.1.2) (2026-04-06)
48
-
49
- ## [3.1.1](https://github.com/descope/web-components-ui/compare/web-components-ui-3.1.0...web-components-ui-3.1.1) (2026-03-31)
50
-
51
- ## [3.1.0](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.10...web-components-ui-3.1.0) (2026-03-31)
52
-
53
- ## [3.0.10](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.9...web-components-ui-3.0.10) (2026-03-30)
54
-
55
- ## [3.0.9](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.8...web-components-ui-3.0.9) (2026-03-26)
56
-
57
- ## [3.0.8](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.7...web-components-ui-3.0.8) (2026-03-26)
58
-
59
- ## [3.0.7](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.6...web-components-ui-3.0.7) (2026-03-25)
60
-
61
- ## [3.0.6](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.5...web-components-ui-3.0.6) (2026-03-23)
62
-
63
- ## [3.0.5](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.4...web-components-ui-3.0.5) (2026-03-22)
64
-
65
- ## [3.0.4](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.3...web-components-ui-3.0.4) (2026-03-22)
66
-
67
- ## [3.0.3](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.2...web-components-ui-3.0.3) (2026-03-18)
68
-
69
- ## [3.0.2](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.1...web-components-ui-3.0.2) (2026-03-08)
70
-
71
- ## [3.0.1](https://github.com/descope/web-components-ui/compare/web-components-ui-3.0.0...web-components-ui-3.0.1) (2026-03-08)
72
-
73
- ## [3.0.0](https://github.com/descope/web-components-ui/compare/web-components-ui-2.3.3...web-components-ui-3.0.0) (2026-03-08)
74
-
75
- ## [2.3.3](https://github.com/descope/web-components-ui/compare/web-components-ui-2.3.2...web-components-ui-2.3.3) (2026-03-05)
76
-
77
- ## [2.3.2](https://github.com/descope/web-components-ui/compare/web-components-ui-2.3.1...web-components-ui-2.3.2) (2026-03-05)
78
-
79
- ## [2.3.1](https://github.com/descope/web-components-ui/compare/web-components-ui-2.3.0...web-components-ui-2.3.1) (2026-03-01)
80
-
81
- ## [2.3.0](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.59...web-components-ui-2.3.0) (2026-03-01)
82
-
83
- ## [2.2.59](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.58...web-components-ui-2.2.59) (2026-02-28)
84
-
85
- ## [2.2.58](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.57...web-components-ui-2.2.58) (2026-02-26)
86
-
87
- ## [2.2.57](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.56...web-components-ui-2.2.57) (2026-02-25)
88
-
89
- ## [2.2.56](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.55...web-components-ui-2.2.56) (2026-02-24)
90
-
91
- ## [2.2.55](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.54...web-components-ui-2.2.55) (2026-02-23)
92
-
93
- ## [2.2.54](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.53...web-components-ui-2.2.54) (2026-02-23)
94
-
95
- ## [2.2.53](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.52...web-components-ui-2.2.53) (2026-02-23)
96
-
97
- ## [2.2.52](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.51...web-components-ui-2.2.52) (2026-02-23)
98
-
99
- ## [2.2.51](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.50...web-components-ui-2.2.51) (2026-02-21)
100
-
101
- ## [2.2.50](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.49...web-components-ui-2.2.50) (2026-02-10)
102
-
103
- ## [2.2.49](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.48...web-components-ui-2.2.49) (2026-02-09)
104
-
105
- ## [2.2.48](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.47...web-components-ui-2.2.48) (2026-02-09)
106
-
107
- ## [2.2.47](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.46...web-components-ui-2.2.47) (2026-02-05)
108
-
109
- ### Bug Fixes
110
-
111
- - Migrate to Playwright 1.58.1 ([#873](https://github.com/descope/web-components-ui/issues/873)) ([ff16007](https://github.com/descope/web-components-ui/commit/ff16007b6316abd82050ce9bcbce8180a5660d95))
112
-
113
- ## [2.2.46](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.45...web-components-ui-2.2.46) (2026-02-05)
114
-
115
- ## [2.2.45](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.44...web-components-ui-2.2.45) (2026-02-05)
116
-
117
- ## [2.2.44](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.43...web-components-ui-2.2.44) (2026-02-05)
118
-
119
- ## [2.2.43](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.42...web-components-ui-2.2.43) (2026-02-04)
120
-
121
- ## [2.2.42](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.41...web-components-ui-2.2.42) (2026-02-04)
122
-
123
- ## [2.2.41](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.40...web-components-ui-2.2.41) (2026-02-01)
124
-
125
- ## [2.2.40](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.39...web-components-ui-2.2.40) (2026-01-29)
126
-
127
- ## [2.2.39](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.38...web-components-ui-2.2.39) (2026-01-29)
128
-
129
- ## [2.2.38](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.37...web-components-ui-2.2.38) (2026-01-28)
130
-
131
- ## [2.2.37](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.36...web-components-ui-2.2.37) (2026-01-28)
132
-
133
- ## [2.2.36](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.35...web-components-ui-2.2.36) (2026-01-28)
134
-
135
- ## [2.2.35](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.34...web-components-ui-2.2.35) (2026-01-22)
136
-
137
- ## [2.2.34](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.33...web-components-ui-2.2.34) (2026-01-21)
138
-
139
- ## [2.2.33](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.32...web-components-ui-2.2.33) (2026-01-21)
140
-
141
- ## [2.2.32](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.31...web-components-ui-2.2.32) (2026-01-21)
142
-
143
- ## [2.2.31](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.30...web-components-ui-2.2.31) (2026-01-21)
144
-
145
- ## [2.2.30](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.29...web-components-ui-2.2.30) (2026-01-19)
146
-
147
- ## [2.2.29](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.28...web-components-ui-2.2.29) (2026-01-19)
148
-
149
- ## [2.2.28](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.27...web-components-ui-2.2.28) (2026-01-19)
150
-
151
- ## [2.2.27](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.26...web-components-ui-2.2.27) (2026-01-18)
152
-
153
- ## [2.2.26](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.25...web-components-ui-2.2.26) (2026-01-18)
154
-
155
- ## [2.2.25](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.24...web-components-ui-2.2.25) (2026-01-15)
156
-
157
- ## [2.2.24](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.23...web-components-ui-2.2.24) (2026-01-13)
158
-
159
- ## [2.2.23](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.22...web-components-ui-2.2.23) (2026-01-13)
160
-
161
- ## [2.2.22](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.21...web-components-ui-2.2.22) (2026-01-13)
162
-
163
- ## [2.2.21](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.20...web-components-ui-2.2.21) (2026-01-12)
164
-
165
- ## [2.2.20](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.19...web-components-ui-2.2.20) (2026-01-12)
166
-
167
- ## [2.2.19](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.18...web-components-ui-2.2.19) (2026-01-11)
168
-
169
- ## [2.2.18](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.17...web-components-ui-2.2.18) (2026-01-06)
170
-
171
- ## [2.2.17](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.16...web-components-ui-2.2.17) (2026-01-05)
172
-
173
- ## [2.2.16](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.15...web-components-ui-2.2.16) (2025-12-28)
174
-
175
- ## [2.2.15](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.14...web-components-ui-2.2.15) (2025-12-23)
176
-
177
- ## [2.2.14](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.13...web-components-ui-2.2.14) (2025-12-22)
178
-
179
- ## [2.2.13](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.12...web-components-ui-2.2.13) (2025-12-21)
180
-
181
- ## [2.2.12](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.11...web-components-ui-2.2.12) (2025-12-18)
182
-
183
- ## [2.2.11](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.10...web-components-ui-2.2.11) (2025-12-02)
184
-
185
- ## [2.2.10](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.9...web-components-ui-2.2.10) (2025-11-10)
186
-
187
- ## [2.2.9](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.8...web-components-ui-2.2.9) (2025-11-09)
188
-
189
- ## [2.2.8](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.7...web-components-ui-2.2.8) (2025-11-06)
190
-
191
- ## [2.2.7](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.6...web-components-ui-2.2.7) (2025-11-05)
192
-
193
- ## [2.2.6](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.5...web-components-ui-2.2.6) (2025-11-05)
194
-
195
- ## [2.2.5](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.4...web-components-ui-2.2.5) (2025-10-30)
196
-
197
- ## [2.2.4](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.3...web-components-ui-2.2.4) (2025-10-30)
198
-
199
- ## [2.2.3](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.2...web-components-ui-2.2.3) (2025-10-29)
200
-
201
- ## [2.2.2](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.1...web-components-ui-2.2.2) (2025-10-28)
202
-
203
- ## [2.2.1](https://github.com/descope/web-components-ui/compare/web-components-ui-2.2.0...web-components-ui-2.2.1) (2025-10-27)
204
-
205
- ## [2.2.0](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.18...web-components-ui-2.2.0) (2025-10-26)
206
-
207
- ## [2.1.18](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.17...web-components-ui-2.1.18) (2025-10-26)
208
-
209
- ## [2.1.17](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.16...web-components-ui-2.1.17) (2025-10-20)
210
-
211
- ## [2.1.16](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.15...web-components-ui-2.1.16) (2025-10-19)
212
-
213
- ## [2.1.15](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.14...web-components-ui-2.1.15) (2025-10-16)
214
-
215
- ## [2.1.14](https://github.com/descope/web-components-ui/compare/web-components-ui-2.1.13...web-components-ui-2.1.14) (2025-10-12)
216
-
217
- ## [1.139.1](https://github.com/descope/web-components-ui/compare/web-components-ui-1.139.0...web-components-ui-1.139.1) (2025-10-08)
218
-
219
- ## [0.1.3](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-trusted-devices-0.1.2...@descope-ui/descope-trusted-devices-0.1.3) (2025-09-30)
220
-
221
- ### Dependency Updates
222
-
223
- - `@descope-ui/common` updated to version `0.1.2`
224
- - `@descope-ui/theme-globals` updated to version `0.0.22`
225
- - `@descope-ui/descope-list` updated to version `0.1.2`
226
- - `@descope-ui/descope-list-item` updated to version `0.1.2`
227
- - `@descope-ui/descope-text` updated to version `0.0.22`
228
- - `@descope-ui/descope-link` updated to version `0.1.2`
229
- - `@descope-ui/descope-badge` updated to version `0.1.2`
230
- - `@descope-ui/descope-icon` updated to version `0.0.20`
231
-
232
- ## [0.1.2](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-trusted-devices-0.1.1...@descope-ui/descope-trusted-devices-0.1.2) (2025-09-29)
233
-
234
- ### Dependency Updates
235
-
236
- - `@descope-ui/common` updated to version `0.1.1`
237
- - `@descope-ui/theme-globals` updated to version `0.0.21`
238
- - `@descope-ui/descope-list` updated to version `0.1.1`
239
- - `@descope-ui/descope-list-item` updated to version `0.1.1`
240
- - `@descope-ui/descope-text` updated to version `0.0.21`
241
- - `@descope-ui/descope-link` updated to version `0.1.1`
242
- - `@descope-ui/descope-badge` updated to version `0.1.1`
243
- - `@descope-ui/descope-icon` updated to version `0.0.19`
244
-
245
- ## [0.1.1](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-trusted-devices-0.1.0...@descope-ui/descope-trusted-devices-0.1.1) (2025-09-10)
246
-
247
- ## 0.1.0 (2025-09-02)
248
-
249
- ### Dependency Updates
250
-
251
- - `e2e-utils` updated to version `0.1.0`
252
- - `@descope-ui/common` updated to version `0.1.0`
253
- - `@descope-ui/theme-globals` updated to version `0.0.20`
254
- - `@descope-ui/descope-list` updated to version `0.1.0`
255
- - `@descope-ui/descope-list-item` updated to version `0.1.0`
256
- - `@descope-ui/descope-text` updated to version `0.0.20`
257
- - `@descope-ui/descope-link` updated to version `0.1.0`
258
- - `@descope-ui/descope-badge` updated to version `0.1.0`
259
-
260
- ### Features
261
-
262
- - Trusted Devices ([#697](https://github.com/descope/web-components-ui/issues/697)) ([fb2f0eb](https://github.com/descope/web-components-ui/commit/fb2f0eb6773ed624354ed9f0b97d713bb8b10fce))
263
-
264
- # Changelog
@@ -1,163 +0,0 @@
1
- import { test, expect } from '@playwright/test';
2
- import { getStoryUrl, loopConfig, loopPresets } from 'e2e-utils';
3
-
4
- const componentAttributes = {
5
- direction: ['ltr', 'rtl'],
6
- format: ['MM-DD-YYYY', 'DD-MM-YYYY', 'YYYY-MM-DD'],
7
- readonly: ['false', 'true'],
8
- useLongNames: ['false', 'true'],
9
- 'hide-actions': ['false', 'true'],
10
- 'full-width': ['false', 'true'],
11
- numberOfItems: [0, 1, 2, 5, 10],
12
- 'st-list-items-gap': ['0', '4px', '16px', '50px'],
13
- 'st-item-horizontal-padding': ['0', '4px', '16px', '50px'],
14
- 'st-item-vertical-padding': ['0', '4px', '16px', '50px'],
15
- 'remove-device-label': [
16
- '',
17
- 'Remove',
18
- 'Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long Sign out',
19
- ],
20
- 'current-device-label': [
21
- '',
22
- 'This device',
23
- 'Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long current device',
24
- ],
25
- 'last-login-label': [
26
- '',
27
- 'Last seen',
28
- 'Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long last login',
29
- ],
30
- };
31
-
32
- const customLabels = {
33
- 'remove-device-label': componentAttributes['remove-device-label'][2],
34
- 'current-device-label': componentAttributes['current-device-label'][2],
35
- 'last-login-label': componentAttributes['last-login-label'][2],
36
- }
37
-
38
- const presets = {
39
- 'long content ltr': {
40
- useLongNames: 'true',
41
- ...customLabels
42
- },
43
- 'long content rtl': {
44
- direction: 'rtl',
45
- useLongNames: 'true',
46
- ...customLabels
47
- },
48
- };
49
-
50
- const storyName = 'descope-trusted-devices';
51
- const componentName = 'descope-trusted-devices';
52
-
53
- test.describe('theme', () => {
54
- loopConfig(componentAttributes, (attr, value) => {
55
- test.describe(`${attr}: ${value}`, () => {
56
- test.beforeEach(async ({ page }) => {
57
- await page.goto(getStoryUrl(storyName, { [attr]: value }), {
58
- waitUntil: 'networkidle',
59
- });
60
- });
61
-
62
- test('style', async ({ page }) => {
63
- const componentParent = page.locator(componentName);
64
- await page.waitForTimeout(2000);
65
-
66
- expect(await componentParent.screenshot()).toMatchSnapshot();
67
- });
68
- });
69
- });
70
- });
71
-
72
- const setupEventListener = (eventName: string) => {
73
- return `
74
- window.eventDetails = [];
75
- document.addEventListener('${eventName}', (event) => {
76
- window.eventDetails.push(event.detail);
77
- });
78
- `;
79
- };
80
-
81
- test.describe('logic', () => {
82
- test('dispatch remove action with appId', async ({ page }) => {
83
- await page.goto(getStoryUrl(storyName), {
84
- waitUntil: 'networkidle',
85
- });
86
-
87
- await page.addInitScript(setupEventListener('remove-device-clicked'));
88
-
89
- await page.reload({ waitUntil: 'networkidle' });
90
-
91
- await page.getByText('Sign out').first().click();
92
- await page.waitForTimeout(500);
93
-
94
- const eventDetail = await page.evaluate(
95
- () => (window as any).eventDetails[0],
96
- );
97
-
98
- expect(eventDetail).toBeDefined();
99
- expect(eventDetail).toHaveProperty('action', 'remove-device');
100
- expect(eventDetail).toHaveProperty('id', 'device-id-5');
101
- });
102
-
103
- test('prevent dispatch when readonly', async ({ page }) => {
104
- await page.goto(getStoryUrl(storyName, { readonly: 'true' }), {
105
- waitUntil: 'networkidle',
106
- });
107
-
108
- await page.addInitScript(setupEventListener('remove-device-clicked'));
109
-
110
- await page.reload({ waitUntil: 'networkidle' });
111
-
112
- await page.getByText('Sign out').first().click();
113
- await page.waitForTimeout(500);
114
-
115
- const eventDetail = await page.evaluate(
116
- () => (window as any).eventDetails[0],
117
- );
118
-
119
- expect(eventDetail).not.toBeDefined();
120
- });
121
- });
122
-
123
- test.describe('presets', () => {
124
- loopPresets(presets, (preset, name) => {
125
- test(name, async ({ page }) => {
126
- await page.goto(getStoryUrl(storyName, preset));
127
- await page.waitForSelector(componentName);
128
-
129
- const component = page.locator(componentName);
130
-
131
- expect(
132
- await component.screenshot({
133
- animations: 'disabled',
134
- timeout: 3000,
135
- }),
136
- ).toMatchSnapshot();
137
- });
138
- });
139
-
140
- test('empty state', async ({ page, browserName }) => {
141
- test.skip(browserName === 'webkit');
142
- await page.goto(
143
- getStoryUrl(storyName, {
144
- numberOfItems: 0,
145
- 'empty-state': 'No devices found!',
146
- }),
147
- {
148
- waitUntil: 'networkidle',
149
- },
150
- );
151
-
152
- await page.waitForSelector(componentName);
153
-
154
- const component = page.locator(componentName);
155
-
156
- expect(
157
- await component.screenshot({
158
- animations: 'disabled',
159
- timeout: 3000,
160
- }),
161
- ).toMatchSnapshot();
162
- });
163
- });
package/project.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "name": "@descope-ui/descope-trusted-devices",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/web-components/components/descope-trusted-devices/src",
5
- "projectType": "library",
6
- "targets": {},
7
- "tags": []
8
- }