New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4 : Making .tooltip('show') throw an error on elements with display:none #20940
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,4 +320,16 @@ $(function () { | |
.bootstrapPopover('show') | ||
}) | ||
|
||
QUnit.test('should throw an error when show is called on hidden elements', function (assert) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'QUnit' is not defined no-undef There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'QUnit' is not defined no-undef |
||
assert.expect(1) | ||
var done = assert.async() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var |
||
|
||
try { | ||
$('<div data-toggle="popover" data-title="some title" data-content="@Johann-S" style="display: none"/>').bootstrapPopover('show') | ||
} | ||
catch (err) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing curly brace does not appear on the same line as the subsequent block brace-style There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing curly brace does not appear on the same line as the subsequent block brace-style There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing curly brace does not appear on the same line as the subsequent block brace-style |
||
assert.strictEqual(err.message, 'Please use show on visible elements') | ||
done() | ||
} | ||
}) | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,6 +185,19 @@ $(function () { | |
.bootstrapTooltip('show') | ||
}) | ||
|
||
QUnit.test('should throw an error when show is called on hidden elements', function (assert) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'QUnit' is not defined no-undef There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'QUnit' is not defined no-undef There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'QUnit' is not defined no-undef |
||
assert.expect(1) | ||
var done = assert.async() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected var, use let or const instead no-var |
||
|
||
try { | ||
$('<div title="tooltip title" style="display: none"/>').bootstrapTooltip('show') | ||
} | ||
catch (err) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing curly brace does not appear on the same line as the subsequent block brace-style There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing curly brace does not appear on the same line as the subsequent block brace-style There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing curly brace does not appear on the same line as the subsequent block brace-style |
||
assert.strictEqual(err.message, 'Please use show on visible elements') | ||
done() | ||
} | ||
}) | ||
|
||
QUnit.test('should fire inserted event', function (assert) { | ||
assert.expect(2) | ||
var done = assert.async() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'QUnit' is not defined no-undef
Unexpected function expression prefer-arrow-callback