Commit 0406158
committed
fix(policy): resolve IdentifyService constructor injection and fix unit tests
- Restore PolicyService as constructor parameter in IdentifyService
(removed lazy Server::get() which bypassed DI mocking)
- Add getFriendlyNamesMap() to IdentifyMethodService that reads
friendly names directly from injected instances, avoiding circular
call chain (getSettings() -> PolicyService -> normalize() -> getSettings())
- Update IdentifyMethodsPolicyValue::normalize() to accept optional
IdentifyMethodService for enriching identify_methods entries that
lack friendly_name (e.g. values stored via provisioning API)
- Update IdentifyMethodsPolicyTest to inject IdentifyMethodService mock
in constructor
This fixes the Playwright E2E tests that timed out at
getByPlaceholder(Account) because the identify_methods values set
via provisioning API did not include friendly_name, which the
frontend uses as tab label and input placeholder text.
Signed-off-by: Vitor Mattos <[email protected]>1 parent d76bcd8 commit 0406158
4 files changed
Lines changed: 24 additions & 12 deletions
File tree
- lib/Service
- IdentifyMethod
- Policy/Provider/IdentifyMethods
- tests/php/Unit/Service/Policy/Provider/IdentifyMethods
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
368 | 373 | | |
369 | 374 | | |
370 | 375 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | 87 | | |
89 | | - | |
90 | | - | |
| 88 | + | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
15 | 24 | | |
16 | | - | |
| 25 | + | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
| |||
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | | - | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| |||
0 commit comments