diff --git a/addon/components/pix-tooltip.hbs b/addon/components/pix-tooltip.hbs
index 82c9c05ad..e28c4bf06 100644
--- a/addon/components/pix-tooltip.hbs
+++ b/addon/components/pix-tooltip.hbs
@@ -1,5 +1,5 @@
+
## Is Light
diff --git a/app/stories/pix-tooltip.stories.js b/app/stories/pix-tooltip.stories.js
index 7c3b3ec97..7f3139b42 100644
--- a/app/stories/pix-tooltip.stories.js
+++ b/app/stories/pix-tooltip.stories.js
@@ -118,6 +118,23 @@ const TemplateWithIconElement = (args) => {
};
};
+const TemplateWithInputElement = (args) => {
+ return {
+ template: hbs`
+ <:triggerElement>
+
+ <:label>{{this.label}}
+
+
+
+ <:tooltip>
+ {{this.text}}
+
+`,
+ context: args,
+ };
+};
+
export const Default = Template.bind({});
Default.args = {
text: 'Hello World',
@@ -184,6 +201,12 @@ WithIcon.args = {
label: 'À survoler pour voir la tooltip',
};
+export const WithInput = TemplateWithInputElement.bind({});
+WithInput.args = {
+ text: 'Hello World',
+ label: 'À survoler pour voir la tooltip',
+};
+
export const hide = Template.bind({});
hide.args = {
label: "Survoler ici n'affiche pas tooltip",
diff --git a/tests/integration/components/pix-tooltip-test.js b/tests/integration/components/pix-tooltip-test.js
index eadd97ba7..37a4dd758 100644
--- a/tests/integration/components/pix-tooltip-test.js
+++ b/tests/integration/components/pix-tooltip-test.js
@@ -60,21 +60,20 @@ module('Integration | Component | pix-tooltip', function (hooks) {
test('it dismissed tooltip on escape keyup', async function (assert) {
// given
- const screen = await render(hbs`
+ const screen = await render(hbs`
<:triggerElement>
- template block text
+ Trigger
- <:tooltip>
+ <:tooltip>Some tooltip
`);
// when
- await screen.getByText('template block text').focus();
+ await screen.getByRole('button', { name: 'Trigger' }).focus();
await userEvent.keyboard('[Escape]');
// then
- assert.contains('template block text');
- assert.dom('.pix-tooltip__content').isNotVisible();
+ assert.dom('.pix-tooltip').doesNotHaveClass('pix-tooltip--visible');
});
module('tooltip position', function () {