小编Ois*_*ley的帖子

Azure B2C 在统一注册/登录流程中首先显示注册页面

我一直在使用有关 ContentDefinitions 的b2c 入门包MSDN 文档,以及 Azure B2C 产品的各个其他方面。

正如任何曾经尝试实施自定义策略的人所意识到的那样,文档并不总是那么彻底或明确,并且通常在语法上不正确或缺少细节。

考虑到这一点,我想知道:

  • 在统一的注册/登录流程中,是否可以在“登录”屏幕之前触发“注册”屏幕?
  • 另外,是否可以将“登录”屏幕链接添加到“注册”屏幕?
    我知道可以通过添加<Item Key="setting.showSignupLink">false</Item>元数据来将“注册”屏幕链接添加到 ContentDefinition,但在使用 ContentDefinition 时,该链接似乎是开箱即用的api.signuporsignin
    到目前为止,我已经尝试将 a 添加<Item Key="setting.showSigninLink">false</Item>到我的 ContentDefinition 的元数据块中,但无济于事(我没有在任何地方的 MSDN 文档中找到此内容,只是想尝试一下)。

为了澄清,在注册/登录流程中,我想在启动策略后立即显示“注册”屏幕,然后可以选择导航到“登录”页面。

任何建议将不胜感激。

azure azure-ad-b2c azure-ad-b2c-custom-policy

6
推荐指数
2
解决办法
1465
查看次数

Toastr通知无效

我尝试了下面的代码,但是当我在浏览器中启动页面时,没有任何东西弹出

<script>
            $(function () { //ready
                toastr.info('For more information, see our FAQ guide located below.');
            });



</script>
Run Code Online (Sandbox Code Playgroud)

model-view-controller jquery toastr

5
推荐指数
1
解决办法
1万
查看次数

NgRx 测试 - 检查分派动作的顺序

在运行单元测试并在store.dispatch()函数上创建 Jasmine 间谍时,我正在嘲笑我的 NgRx 存储。
有了这个,我当然能够验证:
一。通过 store.dispatch() 和
b。调用模拟 store.dispatch() 函数的次数。

这可以在以下代码段中看到:

let storeMock;
beforeEach(() => {
  storeMock = {
    dispatch: jasmine.createSpy('dispatch')
  };

  TestBed.configureTestingModule({
    imports: [],
    declarations: [HeaderComponent],
    providers: [
      { provide: Store, useValue: storeMock }
    ]
  });
  TestBed.compileComponents();
});

it(`should dispatch "Loading" and "StoreRecipes" actions when button is clicked`,
      async(() => {
        const fixture = TestBed.createComponent(HeaderComponent);
        fixture.detectChanges();
        const debugElement = queryToGetButton();
        debugElement.nativeElement.click();

        // this works as expected, tests are passing
        expect(storeMock.dispatch).toHaveBeenCalledTimes(2);
        expect(storeMock.dispatch).toHaveBeenCalledWith(
          new RecipeActions.Loading()
        );
        expect(storeMock.dispatch).toHaveBeenCalledWith( …
Run Code Online (Sandbox Code Playgroud)

unit-testing mocking jasmine ngrx angular

4
推荐指数
1
解决办法
4160
查看次数