Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
When(/^I randomly enter (\d+) words$/, async function (noOfWords) {
for (let i = 1; i <= noOfWords; i++) {
for (let dieNo = 1; dieNo <= 11; dieNo++) {
await browser.setValue(`#d${dieNo}`, step_helpers.randomDiceTrow())
}
await step_helpers.sleep_for_debug(50)
await browser.click('#add_word')
}
console.log('');
});
Then(/^the phrase should have (\d+) words$/, async function (expectedLength) {
Given(/^I enter 23 valid words$/, async () => {
await browser.setValue('#seedphrase_input', validWords)
});
When(/^I click the Calculate button$/, async () => {
Given(/^I enter (\d+) in dice number (\d+)$/, async (dieValue, diceNo) => {
await browser.setValue(`#d${diceNo}`, dieValue)
});
Then(/^the word list should contain (\d+) (?:word|words)$/, async noOfWords => {
Given(/^I enter the words "([^"]*)"$/, async words => {
await browser.setValue('#seedphrase_input', words)
});
Given(/^I enter 23 valid words$/, async () => {
When(/^I leave the phrase field empty$/, async () => {
await browser.setValue('#seedphrase_input', "")
});
Then(/^the phrase input should contain (\d+) words$/, async function (noOfWords) {