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
Show more breadcrumbs
Cassiopée
nghyd
Commits
aeca6044
Commit
aeca6044
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
MàJ tests e2e
parent
934ec95c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/load-linked-params.e2e-spec.ts
+9
-9
9 additions, 9 deletions
e2e/load-linked-params.e2e-spec.ts
e2e/pab.e2e-spec.ts
+14
-9
14 additions, 9 deletions
e2e/pab.e2e-spec.ts
with
23 additions
and
18 deletions
e2e/load-linked-params.e2e-spec.ts
+
9
−
9
View file @
aeca6044
...
...
@@ -47,7 +47,7 @@ describe("ngHyd − load session with multiple linked parameters − ", () => {
// check target params values
const
sp_lb
=
calcPage
.
getSelectById
(
"
linked_LargeurBerge
"
);
const
sp_lbv
=
await
calcPage
.
getSelectValueText
(
sp_lb
);
expect
(
sp_lbv
).
to
Equal
(
"
L
(Ouvrages, ouvrage 3)
"
);
expect
(
sp_lbv
).
to
Contain
(
"
Largeur du déversoir
(Ouvrages, ouvrage 3)
"
);
// 2. check Passe à macro-rugosités
await
navbar
.
clickCalculatorTab
(
1
);
...
...
@@ -56,11 +56,11 @@ describe("ngHyd − load session with multiple linked parameters − ", () => {
// check target params values
const
mr_zf1
=
calcPage
.
getSelectById
(
"
linked_ZF1
"
);
const
mr_zf1v
=
await
calcPage
.
getSelectValueText
(
mr_zf1
);
expect
(
mr_zf1v
).
to
Equal
(
"
Z1
(Ouvrages)
"
);
expect
(
mr_zf1v
).
to
Contain
(
"
Cote de l'eau amont
(Ouvrages)
"
);
const
mr_q
=
calcPage
.
getSelectById
(
"
linked_Q
"
);
const
mr_qv
=
await
calcPage
.
getSelectValueText
(
mr_q
);
expect
(
mr_qv
).
to
Equal
(
"
Q
(Sec. param., section)
"
);
expect
(
mr_qv
).
to
Contain
(
"
Débit
(Sec. param., section)
"
);
// 3. check Lois d'ouvrages
await
navbar
.
clickCalculatorTab
(
2
);
...
...
@@ -69,19 +69,19 @@ describe("ngHyd − load session with multiple linked parameters − ", () => {
// check target params values
const
lo_z2
=
calcPage
.
getSelectById
(
"
linked_Z2
"
);
const
lo_z2v
=
await
calcPage
.
getSelectValueText
(
lo_z2
);
expect
(
lo_z2v
).
to
Equal
(
"
ZF1
(Macro-rugo.)
"
);
expect
(
lo_z2v
).
to
Contain
(
"
Cote de fond aval
(Macro-rugo.)
"
);
const
lo_l
=
calcPage
.
getSelectById
(
"
1_linked_L
"
);
const
lo_lv
=
await
calcPage
.
getSelectValueText
(
lo_l
);
expect
(
lo_lv
).
to
Equal
(
"
L (résultat de
Ouvrages)
"
);
expect
(
lo_lv
).
to
Contain
(
"
Largeur du déversoir (
Ouvrages)
"
);
const
lo_w
=
calcPage
.
getSelectById
(
"
2_linked_W
"
);
const
lo_wv
=
await
calcPage
.
getSelectValueText
(
lo_w
);
expect
(
lo_wv
).
to
Equal
(
"
W
(Ouvrages, ouvrage 2)
"
);
expect
(
lo_wv
).
to
Contain
(
"
Ouverture de vanne
(Ouvrages, ouvrage 2)
"
);
const
lo_cd
=
calcPage
.
getSelectById
(
"
2_linked_Cd
"
);
const
lo_cdv
=
await
calcPage
.
getSelectValueText
(
lo_cd
);
expect
(
lo_cdv
).
to
Equal
(
"
Cd
(Ouvrages, ouvrage 1)
"
);
expect
(
lo_cdv
).
to
Contain
(
"
Coefficient de débit
(Ouvrages, ouvrage 1)
"
);
// 4. check Régime uniforme
await
navbar
.
clickCalculatorTab
(
3
);
...
...
@@ -90,7 +90,7 @@ describe("ngHyd − load session with multiple linked parameters − ", () => {
// check target params values
const
lo_q
=
calcPage
.
getSelectById
(
"
linked_Q
"
);
const
lo_qv
=
await
calcPage
.
getSelectValueText
(
lo_q
);
expect
(
lo_qv
).
to
Equal
(
"
CvQT (Déver. dénoyés, résultat complémentaire
)
"
);
expect
(
lo_qv
).
to
Contain
(
"
Débit corrigé (Déver. dénoyés
)
"
);
// 5. check Déver. dénoyés
await
navbar
.
clickCalculatorTab
(
4
);
...
...
@@ -99,7 +99,7 @@ describe("ngHyd − load session with multiple linked parameters − ", () => {
// check target params values
const
lo_br
=
calcPage
.
getSelectById
(
"
linked_BR
"
);
const
lo_brv
=
await
calcPage
.
getSelectValueText
(
lo_br
);
expect
(
lo_brv
).
to
Equal
(
"
Largeur
Berge
(Sec. param.
, section
)
"
);
expect
(
lo_brv
).
to
Contain
(
"
Largeur
au miroir
(Sec. param.)
"
);
});
});
This diff is collapsed.
Click to expand it.
e2e/pab.e2e-spec.ts
+
14
−
9
View file @
aeca6044
...
...
@@ -99,8 +99,12 @@ describe("ngHyd − Passe à Bassins", () => {
const
debit
=
calcPage
.
getInputById
(
"
generatePabDebit
"
);
expect
(
await
debit
.
getAttribute
(
"
value
"
)).
toBe
(
"
1.5
"
);
await
debit
.
clear
();
await
debit
.
sendKeys
(
"
1.
"
);
await
debit
.
sendKeys
(
"
6
"
);
// send "1.6" in 2 movements, because "." triggers an error that interrupts sendKeys() !
// send "1.6" in 3 movements, because "." triggers an error and Angular can't cope with the subsequent keys
await
debit
.
sendKeys
(
"
1
"
);
await
browser
.
sleep
(
300
);
await
debit
.
sendKeys
(
"
.
"
);
await
browser
.
sleep
(
300
);
await
debit
.
sendKeys
(
"
6
"
);
await
browser
.
sleep
(
300
);
const
coteAmont
=
calcPage
.
getInputById
(
"
generatePabCoteAmont
"
);
expect
(
await
coteAmont
.
getAttribute
(
"
value
"
)).
toBe
(
"
114
"
);
...
...
@@ -156,14 +160,14 @@ describe("ngHyd − Passe à Bassins", () => {
// check <select> and QA values
const
expectedCloisons
=
[
"
Cloisons 1
"
,
"
Cloisons 2
"
,
"
Cloisons
"
,
"
Cloisons 2
"
,
"
Cloisons 1
"
];
const
expectedQA
=
[
2
,
1
,
3
,
5
,
4
];
let
i
=
0
;
innerFieldsets
.
each
(
async
(
inf
)
=>
{
for
(
let
i
=
0
;
i
<
innerFieldsets
.
length
;
i
++
)
{
const
inf
=
innerFieldsets
[
i
];
const
smc
=
inf
.
element
(
by
.
css
(
"
mat-select#select_modele_cloisons
"
));
expect
(
await
calcPage
.
getSelectValueText
(
smc
)).
toEqual
(
expectedCloisons
[
i
]);
const
QA
=
inf
.
element
(
by
.
css
(
"
input
#
QA
"
));
const
QA
=
inf
.
element
(
by
.
css
(
"
input
[id$=
QA
]
"
));
expect
(
Number
(
await
QA
.
getAttribute
(
"
value
"
))).
toBe
(
expectedQA
[
i
]);
i
++
;
}
);
}
// check downstream wall
const
smca
=
calcPage
.
getSelectById
(
"
select_modele_cloison_aval
"
);
expect
(
await
calcPage
.
getSelectValueText
(
smca
)).
toEqual
(
"
Ouvrages 1
"
);
...
...
@@ -194,13 +198,14 @@ describe("ngHyd − Passe à Bassins", () => {
const
expectedCloisons
=
[
"
Cloisons 1
"
,
"
Cloisons 2
"
,
"
Cloisons
"
,
"
Cloisons 2
"
,
"
Cloisons 1
"
];
const
expectedQA
=
[
2
,
1
,
3
,
5
,
4
];
let
i
=
0
;
innerFieldsets
.
each
(
async
(
inf
)
=>
{
for
(
let
i
=
0
;
i
<
innerFieldsets
.
length
;
i
++
)
{
const
inf
=
innerFieldsets
[
i
];
const
smc
=
inf
.
element
(
by
.
css
(
"
mat-select#select_modele_cloisons
"
));
expect
(
await
calcPage
.
getSelectValueText
(
smc
)).
toEqual
(
expectedCloisons
[
i
]);
const
QA
=
inf
.
element
(
by
.
css
(
"
input
#
QA
"
));
const
QA
=
inf
.
element
(
by
.
css
(
"
input
[id$=
QA
]
"
));
expect
(
Number
(
await
QA
.
getAttribute
(
"
value
"
))).
toBe
(
expectedQA
[
i
]);
i
++
;
}
);
}
// check downstream wall
const
smca
=
calcPage
.
getSelectById
(
"
select_modele_cloison_aval
"
);
expect
(
await
calcPage
.
getSelectValueText
(
smca
)).
toEqual
(
"
Ouvrages 1
"
);
...
...
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