avoid instability of tests due to Alert callback testing, which can prevent notifications from getting displayed
This commit is contained in:
@@ -4556,8 +4556,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||
function isBadBot() {
|
||||
// check whether a bot user agent part can be found in the current
|
||||
// user agent
|
||||
for (let i = 0; i < badBotUA.length; ++i) {
|
||||
if (navigator.userAgent.indexOf(badBotUA[i]) >= 0) {
|
||||
for (const UAfragment of badBotUA) {
|
||||
if (navigator.userAgent.indexOf(UAfragment) >= 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,6 +218,7 @@ describe('Alert', function () {
|
||||
return jsc.random(0, 1) ? true : $element;
|
||||
});
|
||||
functions[trigger](message);
|
||||
$.PrivateBin.Alert.setCustomHandler(null);
|
||||
return handlerCalled;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user