1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/e2e/pages/dynamic/utils/random.js
Tim Voronov d0caef8be7
Feature/#229 wait no element (#249)
* Added possibility to wait for an element or a class absence
2019-03-06 21:52:41 -05:00

13 lines
214 B
JavaScript

export default function random(min = 1000, max = 5000) {
const val = Math.random() * 1000 * 10;
if (val < min) {
return min;
}
if (val > max) {
return max;
}
return val;
}