03f2e8a10e
When no timeout was given "show()" used the default timeout of "OCP.Toast", which is 7 seconds instead of indefinitely as stated in the documentation of "show()". "showHtml()" should also indefinitely show the notification if no timeout is given, but due to the strict comparison the notification was indefinitely shown only when a timeout of 0 was explicitly given. Now both methods show the notification indefinitely (or until it is explicitly hidden) when no timeout is given. The unit tests did not catch this error because "showHtml()" had no tests (as before the move to Toastify it was called from "show()" and thus implicitly tested), and because "show()" verified that "hide()" was not called after some time; "hide()" is no longer called from "show()" since "OCP.Toast" is used internally, so the test always passed even if the notification was indeed hidden. Now the test is based on whether the element is found or not, and explicit tests were added too for "showHtml()". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> |
||
---|---|---|
.. | ||
files | ||
public | ||
systemtags | ||
appsSpec.js | ||
contactsmenuSpec.js | ||
coreSpec.js | ||
jquery.avatarSpec.js | ||
jquery.contactsmenuSpec.js | ||
l10nSpec.js | ||
mimeTypeSpec.js | ||
oc-backbone-webdavSpec.js | ||
setupchecksSpec.js | ||
sharedialoglinkshareview.js | ||
sharedialogshareelistview.js | ||
sharedialogviewSpec.js | ||
shareitemmodelSpec.js | ||
shareSpec.js |