本文整理汇总了TypeScript中emberclear/tests/helpers/pages/app.app类的典型用法代码示例。如果您正苦于以下问题:TypeScript app类的具体用法?TypeScript app怎么用?TypeScript app使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了app类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('an error message appears', function(assert) {
const text = app.toastText();
const expected = 'There was a problem logging in...';
assert.contains(text, expected);
percySnapshot(assert as any);
});
示例2: function
hooks.beforeEach(async function() {
// loginForm.submit must not be awaited because it
// calls an ember-concurrency task which will
// also be awaited and not allow us to test the
// side-effects
loginForm.submit();
await app.waitForToast();
});
示例3: test
test('a message is displayed', async function(assert) {
await waitFor(app.selectors.toast);
const toastText = app.toast()!.textContent;
assert.ok(
toastText!.match(/not be located/),
'toast is displayed saying the user is not found'
);
percySnapshot(assert as any);
});
示例4: test
test('a toast is displayed', function(assert) {
assert.ok(app.toastText()!.match(/a test message/));
});
示例5: skip
skip('confirmation is display', function(assert) {
const text = app.toast()!.textContent!;
assert.ok(text.includes('Identity Updated'));
});
示例6: test
test('the top of the page is visible', function(assert) {
const position = app.scrollContainer().scrollTop;
assert.equal(position, 0, 'the scroll container is at the top');
});
示例7:
hooks.afterEach(function() {
(app.scrollContainer()!.style as any) = '';
});