本文整理匯總了TypeScript中wherehows-web/tests/helpers/dom-helpers.getText函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript getText函數的具體用法?TypeScript getText怎麽用?TypeScript getText使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了getText函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test
test('input shows text', async function(this: ISearchBoxTestContext, assert) {
const props = await getBaseTest(this, { text: 'search this' });
assert.equal(getText(this), 'Search');
assert.equal(getInput(this).placeholder, props.placeholder);
assert.equal(getInput(this).value, props.text);
});
示例2: test
test('it renders', async function(assert) {
await render(hbs`
{{#search/containers/search-box as |keyword placeholder onTypeahead onSearch|}}
template block text
{{/search/containers/search-box}}
`);
assert.equal(getText(this).trim(), 'template block text');
});
示例3: test
test('it renders and displays default value', async function(assert) {
const myObject = {};
this.setProperties({
object: myObject,
property: 'hello'
});
await render(hbs`
{{#get-yield object=object property=property default='world' as |text|}}
{{text}}
{{/get-yield}}
`);
assert.equal(getText(this), 'world');
});