mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[PM-15445] Fix storybook (#13338)
This commit is contained in:
@@ -10,6 +10,7 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga
|
|||||||
import { Provider } from "@bitwarden/common/admin-console/models/domain/provider";
|
import { Provider } from "@bitwarden/common/admin-console/models/domain/provider";
|
||||||
import { AccountService, Account } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService, Account } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { SyncService } from "@bitwarden/common/platform/sync";
|
import { SyncService } from "@bitwarden/common/platform/sync";
|
||||||
import { UserId } from "@bitwarden/common/types/guid";
|
import { UserId } from "@bitwarden/common/types/guid";
|
||||||
import { LayoutComponent, NavigationModule } from "@bitwarden/components";
|
import { LayoutComponent, NavigationModule } from "@bitwarden/components";
|
||||||
@@ -68,6 +69,12 @@ class MockAccountService implements Partial<AccountService> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MockPlatformUtilsService implements Partial<PlatformUtilsService> {
|
||||||
|
isSelfHost() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "story-layout",
|
selector: "story-layout",
|
||||||
template: `<ng-content></ng-content>`,
|
template: `<ng-content></ng-content>`,
|
||||||
@@ -105,6 +112,7 @@ export default {
|
|||||||
{ provide: AccountService, useClass: MockAccountService },
|
{ provide: AccountService, useClass: MockAccountService },
|
||||||
{ provide: ProviderService, useClass: MockProviderService },
|
{ provide: ProviderService, useClass: MockProviderService },
|
||||||
{ provide: SyncService, useClass: MockSyncService },
|
{ provide: SyncService, useClass: MockSyncService },
|
||||||
|
{ provide: PlatformUtilsService, useClass: MockPlatformUtilsService },
|
||||||
ProductSwitcherService,
|
ProductSwitcherService,
|
||||||
{
|
{
|
||||||
provide: I18nPipe,
|
provide: I18nPipe,
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga
|
|||||||
import { Provider } from "@bitwarden/common/admin-console/models/domain/provider";
|
import { Provider } from "@bitwarden/common/admin-console/models/domain/provider";
|
||||||
import { AccountService, Account } from "@bitwarden/common/auth/abstractions/account.service";
|
import { AccountService, Account } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||||
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { SyncService } from "@bitwarden/common/platform/sync";
|
import { SyncService } from "@bitwarden/common/platform/sync";
|
||||||
import { UserId } from "@bitwarden/common/types/guid";
|
import { UserId } from "@bitwarden/common/types/guid";
|
||||||
import { IconButtonModule, LinkModule, MenuModule } from "@bitwarden/components";
|
import { IconButtonModule, LinkModule, MenuModule } from "@bitwarden/components";
|
||||||
@@ -68,6 +69,12 @@ class MockAccountService implements Partial<AccountService> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class MockPlatformUtilsService implements Partial<PlatformUtilsService> {
|
||||||
|
isSelfHost() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "story-layout",
|
selector: "story-layout",
|
||||||
template: `<ng-content></ng-content>`,
|
template: `<ng-content></ng-content>`,
|
||||||
@@ -101,6 +108,8 @@ export default {
|
|||||||
{ provide: ProviderService, useClass: MockProviderService },
|
{ provide: ProviderService, useClass: MockProviderService },
|
||||||
MockProviderService,
|
MockProviderService,
|
||||||
{ provide: SyncService, useClass: MockSyncService },
|
{ provide: SyncService, useClass: MockSyncService },
|
||||||
|
{ provide: PlatformUtilsService, useClass: MockPlatformUtilsService },
|
||||||
|
MockPlatformUtilsService,
|
||||||
ProductSwitcherService,
|
ProductSwitcherService,
|
||||||
{
|
{
|
||||||
provide: I18nService,
|
provide: I18nService,
|
||||||
|
|||||||
Reference in New Issue
Block a user