From a04946e23e479fd09f89eb2b2f541c38ebd62799 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Mon, 11 Nov 2019 10:53:20 +1100 Subject: Add test for Pull Request 279 split phrase cards --- tests/spec/tests.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'tests') diff --git a/tests/spec/tests.js b/tests/spec/tests.js index 07918c2..0ddbdba 100644 --- a/tests/spec/tests.js +++ b/tests/spec/tests.js @@ -4140,4 +4140,35 @@ fit('Converts mnemonics into raw entropy', function(done) { }); }); +// Pull Request 279 +// Added Split Phrase Card Output +fit('Shows split prase cards', function(done) { + var originalPhrase = "ugly charge strong giant once anchor capable october thumb inject dwarf legal alley mixture shoot"; + var originalWords = originalPhrase.split(' '); + driver.findElement(By.css('.phrase')) + .sendKeys(originalPhrase); + driver.sleep(generateDelay).then(function() { + driver.findElement(By.css('.phraseSplit')) + .getAttribute("value") + .then(function(cardsStr) { + var cards = cardsStr.split("\n"); + expect(cards.length).toBe(3); + // test all 2-of-3 combos can be used to form full phrase + var combos = [[0,1],[0,2],[1,2]]; + for (var i=0; i