Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
80b6e4ef
Commit
80b6e4ef
authored
1 year ago
by
François Grand
Browse files
Options
Downloads
Patches
Plain Diff
test(e2e): predams: check ZDV input value does not change after calculation
refs
#620
parent
513d2b96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
e2e/predam.e2e-spec.ts
+60
-0
60 additions, 0 deletions
e2e/predam.e2e-spec.ts
with
60 additions
and
0 deletions
e2e/predam.e2e-spec.ts
0 → 100644
+
60
−
0
View file @
80b6e4ef
import
{
browser
,
$
,
$$
,
expect
}
from
'
@wdio/globals
'
import
{
PreferencesPage
}
from
'
./preferences.po
'
;
import
{
Navbar
}
from
'
./navbar.po
'
;
import
{
CalculatorPage
}
from
'
./calculator.po
'
;
import
{
changeSelectValue
,
scrollToElement
}
from
'
./util.po
'
;
describe
(
"
predams -
"
,
()
=>
{
let
prefPage
:
PreferencesPage
;
let
navBar
:
Navbar
;
let
calcPage
:
CalculatorPage
;
beforeAll
(()
=>
{
prefPage
=
new
PreferencesPage
();
navBar
=
new
Navbar
();
calcPage
=
new
CalculatorPage
();
});
beforeEach
(
async
()
=>
{
// disable evil option "empty fields on module creation"
await
prefPage
.
setEmptyFields
(
false
);
await
navBar
.
clickNewCalculatorButton
();
await
browser
.
pause
(
200
);
});
it
(
"
bug nghyd#620
"
,
async
()
=>
{
// open predams example
const
examples
=
await
$
$
(
"
#examples-list .load-example
"
);
await
examples
[
6
].
click
();
await
browser
.
pause
(
200
);
// select "Amont-B1" basin
const
nodes
=
await
$
$
(
"
g.nodes > g
"
);
await
nodes
[
8
].
click
();
await
browser
.
pause
(
200
);
// modify 1st structure discharge law
const
sel
=
await
calcPage
.
getSelectById
(
"
select_loidebit
"
);
await
changeSelectValue
(
sel
,
3
);
// Larinier
await
browser
.
pause
(
200
);
// check 2nd structure ZDV
const
inpZDV2
=
await
calcPage
.
getInputById
(
"
1_ZDV
"
);
expect
(
await
inpZDV2
.
getValue
()).
toEqual
(
"
96.25
"
)
// run computation
const
calcBtn
=
await
calcPage
.
getCalculateButton
();
await
calcBtn
.
click
();
await
browser
.
pause
(
300
);
// back to inputs tab
const
resSelectors
=
await
$
$
(
"
#pb-data-results-selector div div
"
);
scrollToElement
(
resSelectors
[
0
]);
await
browser
.
pause
(
200
);
await
resSelectors
[
0
].
click
();
await
browser
.
pause
(
200
);
// check 2nd structure ZDV didn't change
expect
(
await
inpZDV2
.
getValue
()).
toEqual
(
"
96.25
"
)
});
});
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