Skip to content

Improve search tests with more recreatable search terms via Random Seed

Use @niskhakova's suggestion to generate search terms. The terms were the same on each test run. So we're consistently getting the same search terms which is good.

Note: this implementation currently allows repeated words, I tried to use a condition like:

var i = 0
while(i<=3){
    randomSeed(randomSeedParam + i);
    let randomWord = words[Math.floor(Math.random() * words.length)];
    if(!randomWords.includes(randomWord)){
        randWords.push(randomWord)
        i++
    }
  }
  return randWords;

in an effort to not allow duplicate words, but that didn't work for reasons I don't understand yet (not well versed in javascript).

closes #374 (closed)

Edited by Erick Banks

Merge request reports

Loading