本文整理匯總了TypeScript中@angular/core.DebugElement.default方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DebugElement.default方法的具體用法?TypeScript DebugElement.default怎麽用?TypeScript DebugElement.default使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@angular/core.DebugElement
的用法示例。
在下文中一共展示了DebugElement.default方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should show maxlength error when user input summary more than 72 character.', fakeAsync(() => {
ignoreAccountsGetting();
initVcsItemWith();
typeInElement(new Array(74).join('.'), getSummaryInputEl());
fixture.detectChanges();
expect(getVisibleErrorAt(getSummaryFormFieldDe()).errorName).toEqual('maxlength');
}));
示例2: fakeAsync
+ 'when user blurs file name input.', fakeAsync(() => {
fixture.detectChanges();
typeInElement('some-file-name', getFileNameInputEl());
getFileNameInputEl().blur();
fixture.detectChanges();
mockFs
.expect({
methodName: 'readDirectory',
args: [directoryPath],
})
.flush(['some-file-name']);
fixture.detectChanges();
const error = getVisibleErrorAt(getFileNameInputFormFieldDe());
expect(error).not.toBeNull();
expect(error.errorName).toEqual('fileAlreadyExists');
}));
示例3: fakeAsync
+ 'when submit remote setting form.', fakeAsync(() => {
ignoreFetchAccountGetting();
ignoreRemoteUrlGetting();
ignoreAccountsGetting();
fixture.detectChanges();
const fetchAccount = accountDummy.create();
const remoteUrl = 'https://github.com/seokju-na/geeks-diary.git';
component.remoteSettingForm.patchValue({
githubAccount: fetchAccount,
remoteUrl,
});
fixture.detectChanges();
(vcs.findRemoteRepository as Spy).and.returnValue(throwError(new VcsRepositoryNotExistsError()));
getSaveRemoteButtonEl().click();
flush();
fixture.detectChanges();
expect(vcs.findRemoteRepository).toHaveBeenCalledWith(remoteUrl, fetchAccount.authentication);
expect(getVisibleErrorAt(getRemoteUrlFormFieldDe()).errorName).toEqual('repositoryNotExists');
}));
示例4: getMenuItem
.map((className) => getMenuItem(`.${className}`))