mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
[PM-13016] Browser default match detection (#11569)
* update conditional to only exit early if value is null - The UriMatchStrategy for Domain was 0 and hitting the conditional * add baseDomain test
This commit is contained in:
parent
34e2d3dad2
commit
d8f1527db0
@ -58,6 +58,13 @@ describe("UriOptionComponent", () => {
|
|||||||
expect(component["uriMatchOptions"][0].label).toBe("default");
|
expect(component["uriMatchOptions"][0].label).toBe("default");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should update the default uri match strategy label when it is domain", () => {
|
||||||
|
component.defaultMatchDetection = UriMatchStrategy.Domain;
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
expect(component["uriMatchOptions"][0].label).toBe("defaultLabel baseDomain");
|
||||||
|
});
|
||||||
|
|
||||||
it("should update the default uri match strategy label", () => {
|
it("should update the default uri match strategy label", () => {
|
||||||
component.defaultMatchDetection = UriMatchStrategy.Exact;
|
component.defaultMatchDetection = UriMatchStrategy.Exact;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -84,7 +84,7 @@ export class UriOptionComponent implements ControlValueAccessor {
|
|||||||
@Input({ required: true })
|
@Input({ required: true })
|
||||||
set defaultMatchDetection(value: UriMatchStrategySetting) {
|
set defaultMatchDetection(value: UriMatchStrategySetting) {
|
||||||
// The default selection has a value of `null` avoid showing "Default (Default)"
|
// The default selection has a value of `null` avoid showing "Default (Default)"
|
||||||
if (!value) {
|
if (value === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user