Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.editor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
beat
beat.editor
Commits
4f3eab03
Commit
4f3eab03
authored
6 years ago
by
Jaden DIEFENBAUGH
Browse files
Options
Downloads
Patches
Plain Diff
[js] finish first part of E2E testing from the tutorial (the means exp),
#119
parent
f2b8075b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
JS & Python Testing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
conda/js/test/selenium_tutorial_test.js
+40
-3
40 additions, 3 deletions
conda/js/test/selenium_tutorial_test.js
with
40 additions
and
3 deletions
conda/js/test/selenium_tutorial_test.js
+
40
−
3
View file @
4f3eab03
...
@@ -3,14 +3,16 @@ const {Builder, By, Key, until} = require('selenium-webdriver');
...
@@ -3,14 +3,16 @@ const {Builder, By, Key, until} = require('selenium-webdriver');
const
firefox
=
require
(
'
selenium-webdriver/firefox
'
);
const
firefox
=
require
(
'
selenium-webdriver/firefox
'
);
const
options
=
new
firefox
.
Options
();
const
options
=
new
firefox
.
Options
();
//
options.addArguments('-headless');
options
.
addArguments
(
'
-headless
'
);
(
async
function
example
()
{
(
async
function
example
()
{
let
driver
=
await
new
Builder
().
forBrowser
(
'
firefox
'
).
setFirefoxOptions
(
options
).
build
();
let
driver
=
await
new
Builder
().
forBrowser
(
'
firefox
'
).
setFirefoxOptions
(
options
).
build
();
try
{
try
{
await
driver
.
get
(
'
http://localhost:9101/
'
);
await
driver
.
get
(
'
http://localhost:9101/
'
);
// create the means experiment
/**************************************************************
* MEANS EXP
*/
// navigate to exp list
// navigate to exp list
await
driver
.
findElement
(
By
.
linkText
(
'
experiments
'
)).
click
();
await
driver
.
findElement
(
By
.
linkText
(
'
experiments
'
)).
click
();
//.sendKeys('webdriver', Key.RETURN);
//.sendKeys('webdriver', Key.RETURN);
...
@@ -37,7 +39,42 @@ const options = new firefox.Options();
...
@@ -37,7 +39,42 @@ const options = new firefox.Options();
await
driver
.
findElement
(
By
.
linkText
(
'
selenium/test/iris/1/means
'
)).
click
();
await
driver
.
findElement
(
By
.
linkText
(
'
selenium/test/iris/1/means
'
)).
click
();
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
div.experimentEditor
'
)),
2000
);
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
div.experimentEditor
'
)),
2000
);
// CLEANUP
// click on training_alg block
await
driver
.
findElement
(
By
.
css
(
'
rect#block_training_alg
'
)).
click
();
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
div.block_training_alg
'
)),
2000
);
// set the algorithm to the new one
await
driver
.
findElement
(
By
.
css
(
'
select.custom-select
'
)).
click
();
await
driver
.
findElement
(
By
.
css
(
'
select.custom-select option[value="test/means_training/1"]
'
)).
click
();
// do same for testing_alg block
await
driver
.
findElement
(
By
.
css
(
'
rect#block_testing_alg
'
)).
click
();
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
div.block_testing_alg
'
)),
2000
);
await
driver
.
findElement
(
By
.
css
(
'
select.custom-select
'
)).
click
();
await
driver
.
findElement
(
By
.
css
(
'
select.custom-select option[value="test/means_testing/1"]
'
)).
click
();
// make sure the exp is still valid
await
driver
.
wait
(
until
.
elementLocated
(
By
.
css
(
'
.badge-success
'
)),
2000
);
// save exp
await
driver
.
findElement
(
By
.
css
(
'
div.experimentEditor > div.d-flex > button.btn-outline-secondary
'
)).
click
();
await
driver
.
sleep
(
1000
);
/**************************************************************
* ADVANCED IRIS TOOLCHAIN
*/
/**************************************************************
* ADVANCED IRIS PREPROCESSOR ALGORITHM
*/
/**************************************************************
* ADVANCED IRIS EXPERIMENT
*/
/**************************************************************
* CLEANUP
*/
// go back and delete exp
// go back and delete exp
await
driver
.
findElement
(
By
.
linkText
(
'
experiments
'
)).
click
();
await
driver
.
findElement
(
By
.
linkText
(
'
experiments
'
)).
click
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment