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
4c240b2c
Commit
4c240b2c
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Update translation checking e2e test
parent
4ba4b273
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/check-translations.e2e-spec.ts
+24
-8
24 additions, 8 deletions
e2e/check-translations.e2e-spec.ts
with
24 additions
and
8 deletions
e2e/check-translations.e2e-spec.ts
+
24
−
8
View file @
4c240b2c
...
...
@@ -9,7 +9,7 @@ import { SideNav } from "./sidenav.po";
* For all calculators, try to calculate every parameter: check that only one parameter
* is set to CAL mode, trigger the calculation, check that result is not empty
*/
f
describe
(
"
ngHyd − check translation of all calculators
"
,
()
=>
{
describe
(
"
ngHyd − check translation of all calculators
"
,
()
=>
{
let
listPage
:
ListPage
;
let
calcPage
:
CalculatorPage
;
let
navBar
:
Navbar
;
...
...
@@ -37,15 +37,29 @@ fdescribe("ngHyd − check translation of all calculators", () => {
beforeAll
(
async
()
=>
{
await
prefPage
.
navigateTo
();
await
prefPage
.
changeLanguage
(
i
);
await
browser
.
sleep
(
2000
);
await
browser
.
sleep
(
200
);
await
navBar
.
clickNewCalculatorButton
();
});
beforeEach
(
function
()
{
jasmine
.
addMatchers
({
toContain
:
function
()
{
return
{
compare
:
function
(
actual
,
expected
)
{
const
result
=
{
pass
:
actual
.
includes
(
expected
),
message
:
"
error
"
// short message to avoid whole page source being dumped on expect() failure
};
return
result
;
}
};
}
});
});
// for each calculator
for
(
const
ct
of
calcTypes
)
{
it
(
"
− check translations of calculator type [
"
+
ct
+
"
]
"
,
async
()
=>
{
// go to list page
await
navBar
.
clickNewCalculatorButton
();
// click calculator button (instanciate)
await
listPage
.
clickMenuEntryForCalcType
(
ct
);
...
...
@@ -60,10 +74,12 @@ fdescribe("ngHyd − check translation of all calculators", () => {
const
hasResults
=
await
calcPage
.
hasResults
();
expect
(
hasResults
).
toBe
(
true
);
//
@TODO
check absence of "*** message not found" in whole DOM
expect
(
"
SOURCE CODE
"
).
not
.
toContain
(
"
*** message not found
"
);
// check absence of "*** message not found" in whole DOM
expect
(
await
browser
.
getPageSource
()
).
not
.
toContain
(
"
*** message not found
"
);
// close calc
// empty session
await
navBar
.
clickMenuButton
();
await
browser
.
sleep
(
200
);
await
sideNav
.
clickNewSessionButton
();
browser
.
sleep
(
200
);
});
...
...
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