我一直在使用有关 ContentDefinitions 的b2c 入门包和MSDN 文档,以及 Azure B2C 产品的各个其他方面。
正如任何曾经尝试实施自定义策略的人所意识到的那样,文档并不总是那么彻底或明确,并且通常在语法上不正确或缺少细节。
考虑到这一点,我想知道:
<Item Key="setting.showSignupLink">false</Item>元数据来将“注册”屏幕链接添加到 ContentDefinition,但在使用 ContentDefinition 时,该链接似乎是开箱即用的api.signuporsignin。<Item Key="setting.showSigninLink">false</Item>到我的 ContentDefinition 的元数据块中,但无济于事(我没有在任何地方的 MSDN 文档中找到此内容,只是想尝试一下)。为了澄清,在注册/登录流程中,我想在启动策略后立即显示“注册”屏幕,然后可以选择导航到“登录”页面。
任何建议将不胜感激。
我尝试了下面的代码,但是当我在浏览器中启动页面时,没有任何东西弹出
<script>
$(function () { //ready
toastr.info('For more information, see our FAQ guide located below.');
});
</script>
Run Code Online (Sandbox Code Playgroud) 在运行单元测试并在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) angular ×1
azure ×1
azure-ad-b2c ×1
jasmine ×1
jquery ×1
mocking ×1
ngrx ×1
toastr ×1
unit-testing ×1