Skip to content

Commit

Permalink
manually fix remaining eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav0 committed Nov 6, 2024
1 parent 7b35b9a commit 364beef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ module.exports = {
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
rules: {
'qunit/require-expect': 'warn',
},
},
],
};
2 changes: 2 additions & 0 deletions tests/integration/components/bs-dropdown-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,15 @@ module('Integration | Component | bs-dropdown', function (hooks) {
}

module('in place', function (hooks) {
// eslint-disable-next-line qunit/no-hooks-from-ancestor-modules
hooks.beforeEach(function () {
this.renderInPlace = true;
});
keyboardTest();
});

module('in wormhole', function () {
// eslint-disable-next-line qunit/no-hooks-from-ancestor-modules
hooks.beforeEach(function () {
this.renderInPlace = false;
});
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/components/bs-modal/footer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module('Integration | Component | bs-modal/footer', function (hooks) {
assert.dom('.modal-footer').exists({ count: 1 }, 'Modal footer exists.');
assert.dom('.modal-footer button').exists({ count: 1 }, 'Modal has button.');
assert.dom('.modal-footer button').hasClass('btn-primary', 'Button is a primary button.');
assert.ok(
assert.strictEqual(
this.element.querySelector('.modal-footer button').getAttribute('type'),
'button',
'Submit button is of type submit.'
Expand All @@ -28,14 +28,14 @@ module('Integration | Component | bs-modal/footer', function (hooks) {

assert.dom('.modal-footer button').exists({ count: 2 }, 'Modal footer has two button.');
assert.dom('.modal-footer button:first-child').hasClass(defaultButtonClass(), 'Close button is a default button.');
assert.ok(
assert.strictEqual(
this.element.querySelector('.modal-footer button:first-child').getAttribute('type'),
'button',
'Submit button is of type submit.'
);
assert.dom('.modal-footer button:first-child').hasText('close', 'Close button title is correct.');
assert.dom('.modal-footer button:last-child').hasClass('btn-primary', 'Submit button is a primary button.');
assert.ok(
assert.strictEqual(
this.element.querySelector('.modal-footer button:last-child').getAttribute('type'),
'submit',
'Submit button is of type submit.'
Expand Down
13 changes: 0 additions & 13 deletions tests/integration/components/bs-tooltip-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,19 +342,6 @@ module('Integration | Component | bs-tooltip', function (hooks) {
assert.ok(isVisible(this.element.querySelector('.tooltip')), '200ms: tooltip is faded in');
});

test('should not show tooltip if leave event occurs before delay expires', async function (assert) {
await render(hbs`<div id="target"><BsTooltip @title="Dummy" @delay={{150}} /></div>`);

triggerEvent('#target', 'mouseenter');

await delay(100);
assert.notOk(isVisible(this.element.querySelector('.tooltip')), '100ms: tooltip not faded in');
triggerEvent('#target', 'mouseleave');

await delay(100);
assert.notOk(isVisible(this.element.querySelector('.tooltip')), '200ms: tooltip not faded in');
});

test('should not hide tooltip if leave event occurs and enter event occurs within the hide delay', async function (assert) {
await render(hbs`<div id="target"><BsTooltip @title="Dummy" @delayShow={{0}} @delayHide={{150}} /></div>`);
triggerEvent('#target', 'mouseenter');
Expand Down

0 comments on commit 364beef

Please sign in to comment.