29 lines
802 B
Plaintext
29 lines
802 B
Plaintext
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'dashtab/tests/helpers';
|
|
import { render } from '@ember/test-helpers';
|
|
import Result from 'dashtab/components/settings/integrations/result';
|
|
|
|
module(
|
|
'Integration | Component | settings/integrations/result',
|
|
function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it renders an error result', async function (assert) {
|
|
const noop = () => {};
|
|
|
|
await render(
|
|
<template>
|
|
<Result
|
|
@props={{hash result=(hash error="Something went wrong")}}
|
|
@close={{noop}}
|
|
/>
|
|
</template>
|
|
);
|
|
|
|
assert.dom().containsText('Integration Failed');
|
|
assert.dom().containsText('Something went wrong');
|
|
assert.dom('button').hasText('Close');
|
|
});
|
|
}
|
|
);
|