forked from sir-dunxalot/ember-tooltips
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
import { assertContent } from '../../helpers/ember-tooltips'; | ||
|
||
moduleForComponent('tooltip-on-element', 'Integration | Option | content ryanlabouve', { | ||
integration: true | ||
}); | ||
|
||
test('assertContent correctly matches expected content', function(assert) { | ||
|
||
assert.expect(1); | ||
|
||
this.render(hbs` | ||
<div> | ||
:) | ||
{{tooltip-on-element text='Smiley face'}} | ||
</div> | ||
`); | ||
|
||
assertContent(assert, 'Smiley face'); | ||
}); | ||
|
||
test('assertContent correctly compares expected and discovered content of tooltip', function(assert) { | ||
|
||
assert.expect(2); | ||
|
||
this.render(hbs` | ||
<div> | ||
:) | ||
{{tooltip-on-element text='Smiley face'}} | ||
</div> | ||
`); | ||
|
||
const stubbedAssert = { | ||
equal(arg1, arg2/*, msg*/) { | ||
assert.equal( | ||
arg1, | ||
'Smiley face', | ||
'Helper correctly finds actual content of tooltip' | ||
); | ||
|
||
assert.equal( | ||
arg2, | ||
'Frowning face', | ||
'Helper correctly intends to compare to string we provide' | ||
); | ||
} | ||
}; | ||
|
||
assertContent(stubbedAssert, 'Frowning face'); | ||
}); |