Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit c7072fd

Browse files
author
DEWITTE Pierre-Alban
committed
[Tests]Add a tempo after export when testing prompter
1 parent 425dfda commit c7072fd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ _examples:
118118

119119
_selenium_launch:
120120
@echo "Starting selenium container selenium_hub_1! Launch a VNC viewer on port 5900 (password is : secret) to view test execution."
121+
docker pull $(SELENIUM_STANDALONE_DOCKERREPOSITORY)
121122
@docker run -d $(DOCKER_SELENIUM_PARAMETERS) --name $(TEST_DOCKER_SELENIUM_INSTANCE_NAME) $(SELENIUM_STANDALONE_DOCKERREPOSITORY)
122123
@docker run --rm --link $(TEST_DOCKER_SELENIUM_INSTANCE_NAME):WAITHOST -e "WAIT_PORT=4444" -e "WAIT_SERVICE=Selenium hub" $(WAITTCP_DOCKERREPOSITORY)
123124

test/nightwatch/lib/inkPlayer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function checkSmartGuide(browser, config, strokes, labels, component = '#editor'
154154
})
155155
.click('#ellipsis')
156156
.click('#convert')
157+
.pause(1000 * globalconfig.timeoutAmplificator)
157158
.waitUntilElementPropertyEqual('#editorSupervisor', 'state', 'EXPORTED', 3000 * globalconfig.timeoutAmplificator)
158159
.getProperty('#prompter-text', 'textContent', (res) => {
159160
console.log('res.value= ' + res.value.toString());
@@ -171,12 +172,12 @@ function checkSmartGuide(browser, config, strokes, labels, component = '#editor'
171172
.getNumberOfSpans('#candidates', (nbCand) => {
172173
console.log('number of candidates= ' + nbCand.value);
173174
// a random candidate in the smartGuide
174-
const candIdx = Math.floor(Math.random() * nbCand.value);
175+
const candIdx = Math.floor(1 + (Math.random() * (nbCand.value - 1)));
175176
browser.getProperty('#cdt-' + candIdx, 'textContent', (cand) => {
176177
console.log(candIdx + 'th candidate selected: ' + cand.value.toString());
177178
browser
178179
.click('#cdt-' + candIdx)
179-
.pause(1000)
180+
.pause(1000 * globalconfig.timeoutAmplificator)
180181
.getProperty('#prompter-text', 'textContent', (textModified) => {
181182
console.log('textModified= ' + textModified.value.toString());
182183
browser.verify.equal(textModified.value.indexOf(cand.value.toString()) !== -1, true);

0 commit comments

Comments
 (0)