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
81b39985
Commit
81b39985
authored
2 years ago
by
François Grand
Browse files
Options
Downloads
Patches
Plain Diff
test(e2e): check that notes are displayed properly
refs
#602
parent
b141bf1f
No related branches found
No related tags found
2 merge requests
!225
Release v4.17.0
,
!204
Resolve "Notes de session : la note ne s'affiche pas directement"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/notes.e2e-spec.ts
+92
-0
92 additions, 0 deletions
e2e/notes.e2e-spec.ts
e2e/sidenav.po.ts
+10
-0
10 additions, 0 deletions
e2e/sidenav.po.ts
with
102 additions
and
0 deletions
e2e/notes.e2e-spec.ts
0 → 100644
+
92
−
0
View file @
81b39985
import
{
browser
,
by
,
element
}
from
"
protractor
"
;
import
{
AppPage
}
from
"
./app.po
"
;
import
{
Navbar
}
from
"
./navbar.po
"
;
import
{
ListPage
}
from
"
./list.po
"
;
import
{
SideNav
}
from
"
./sidenav.po
"
;
describe
(
"
check calculator notes
"
,
()
=>
{
let
startPage
:
AppPage
;
let
navBar
:
Navbar
;
let
listPage
:
ListPage
;
let
sidenav
:
SideNav
;
beforeEach
(()
=>
{
startPage
=
new
AppPage
();
navBar
=
new
Navbar
();
listPage
=
new
ListPage
();
sidenav
=
new
SideNav
();
});
it
(
"
- notes should display properly when opened from a calculator
"
,
async
()
=>
{
await
startPage
.
navigateTo
();
await
browser
.
sleep
(
200
);
// open PAB: chute calculator
await
listPage
.
clickMenuEntryForCalcType
(
12
);
await
browser
.
sleep
(
200
);
// open notes
await
navBar
.
clickMenuButton
();
await
browser
.
sleep
(
200
);
await
sidenav
.
clickNotesButton
();
await
browser
.
sleep
(
200
);
// input some text
const
ta
=
element
(
by
.
css
(
"
textarea
"
));
await
ta
.
clear
();
await
ta
.
sendKeys
(
"
azerty123
"
);
await
browser
.
sleep
(
200
);
// reopen calculator
await
navBar
.
openNthCalculator
(
0
);
await
browser
.
sleep
(
200
);
// reopen notes
await
navBar
.
clickMenuButton
();
await
browser
.
sleep
(
200
);
await
sidenav
.
clickNotesButton
();
await
browser
.
sleep
(
200
);
// check text
const
md
=
element
(
by
.
css
(
"
markdown p
"
));
await
browser
.
sleep
(
200
);
expect
(
await
md
.
getText
()).
toEqual
(
"
azerty123
"
);
});
it
(
"
- notes should display properly when opened from modules diagram
"
,
async
()
=>
{
await
startPage
.
navigateTo
();
await
browser
.
sleep
(
200
);
// open PAB: chute calculator
await
listPage
.
clickMenuEntryForCalcType
(
12
);
await
browser
.
sleep
(
200
);
// open notes
await
navBar
.
clickMenuButton
();
await
browser
.
sleep
(
200
);
await
sidenav
.
clickNotesButton
();
await
browser
.
sleep
(
200
);
// input some text
const
ta
=
element
(
by
.
css
(
"
textarea
"
));
await
ta
.
clear
();
await
ta
.
sendKeys
(
"
azerty123
"
);
await
browser
.
sleep
(
200
);
// open modules diagram
await
navBar
.
clickMenuButton
();
await
browser
.
sleep
(
200
);
await
sidenav
.
clickDiagramButton
();
await
browser
.
sleep
(
200
);
// open notes
const
notesLink
=
element
(
by
.
css
(
"
#show-notes a
"
));
notesLink
.
click
();
await
browser
.
sleep
(
200
);
// check text
const
md
=
element
(
by
.
css
(
"
markdown p
"
));
await
browser
.
sleep
(
200
);
expect
(
await
md
.
getText
()).
toEqual
(
"
azerty123
"
);
});
});
This diff is collapsed.
Click to expand it.
e2e/sidenav.po.ts
+
10
−
0
View file @
81b39985
...
...
@@ -31,6 +31,10 @@ export class SideNav {
return
element
(
by
.
css
(
`button#confirm-new-session`
));
}
getNotesButton
()
{
return
element
(
by
.
css
(
"
#side-nav-session-props
"
));
}
async
clickLoadSessionButton
()
{
const
ncb
=
this
.
getLoadSessionButton
();
await
browser
.
sleep
(
500
);
...
...
@@ -60,4 +64,10 @@ export class SideNav {
await
this
.
getFileLoadButton
().
click
();
}
}
async
clickNotesButton
()
{
const
nb
=
this
.
getNotesButton
();
await
browser
.
sleep
(
200
);
await
nb
.
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