Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
7db84343
Commit
7db84343
authored
12 years ago
by
Joël Krähemann
Browse files
Options
Downloads
Patches
Plain Diff
OO-348: fixed unsafe waitForPageToLoad() in test
parent
8d64248e
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
src/test/java/org/olat/repository/FunctionalCatalogTest.java
+12
-6
12 additions, 6 deletions
src/test/java/org/olat/repository/FunctionalCatalogTest.java
with
12 additions
and
6 deletions
src/test/java/org/olat/repository/FunctionalCatalogTest.java
+
12
−
6
View file @
7db84343
...
@@ -169,6 +169,8 @@ public class FunctionalCatalogTest {
...
@@ -169,6 +169,8 @@ public class FunctionalCatalogTest {
/* verify resources */
/* verify resources */
for
(
int
i
=
0
;
i
<
courses
;
i
++){
for
(
int
i
=
0
;
i
<
courses
;
i
++){
functionalUtil
.
idle
(
browser
);
/* click on catalog root */
/* click on catalog root */
StringBuffer
selectorBuffer
=
new
StringBuffer
();
StringBuffer
selectorBuffer
=
new
StringBuffer
();
...
@@ -176,8 +178,6 @@ public class FunctionalCatalogTest {
...
@@ -176,8 +178,6 @@ public class FunctionalCatalogTest {
.
append
(
functionalRepositorySiteUtil
.
getCatalogNavigationCss
())
.
append
(
functionalRepositorySiteUtil
.
getCatalogNavigationCss
())
.
append
(
"')]//a"
);
.
append
(
"')]//a"
);
functionalUtil
.
idle
(
browser
);
if
(
browser
.
isElementPresent
(
selectorBuffer
.
toString
())){
if
(
browser
.
isElementPresent
(
selectorBuffer
.
toString
())){
browser
.
click
(
selectorBuffer
.
toString
());
browser
.
click
(
selectorBuffer
.
toString
());
}
}
...
@@ -186,11 +186,13 @@ public class FunctionalCatalogTest {
...
@@ -186,11 +186,13 @@ public class FunctionalCatalogTest {
String
[]
selectors
=
functionalRepositorySiteUtil
.
createCatalogSelectors
(
SUBCATEGORY_PATHS_INCLUDING_RESOURCE
[
i
]);
String
[]
selectors
=
functionalRepositorySiteUtil
.
createCatalogSelectors
(
SUBCATEGORY_PATHS_INCLUDING_RESOURCE
[
i
]);
for
(
String
currentSelector:
selectors
){
for
(
String
currentSelector:
selectors
){
functionalUtil
.
idle
(
browser
);
functionalUtil
.
waitForPageToLoadElement
(
browser
,
currentSelector
.
toString
());
functionalUtil
.
waitForPageToLoadElement
(
browser
,
currentSelector
.
toString
());
browser
.
click
(
currentSelector
);
browser
.
click
(
currentSelector
);
}
}
functionalUtil
.
waitForPageToLoad
(
browser
);
functionalUtil
.
idle
(
browser
);
/* click first course and retrieve business path */
/* click first course and retrieve business path */
selectorBuffer
=
new
StringBuffer
();
selectorBuffer
=
new
StringBuffer
();
...
@@ -203,12 +205,16 @@ public class FunctionalCatalogTest {
...
@@ -203,12 +205,16 @@ public class FunctionalCatalogTest {
String
businessPath0
=
functionalUtil
.
getDeploymentUrl
()
+
"/url/RepositoryEntry/"
+
courseVO
[
i
].
getRepoEntryKey
();
String
businessPath0
=
functionalUtil
.
getDeploymentUrl
()
+
"/url/RepositoryEntry/"
+
courseVO
[
i
].
getRepoEntryKey
();
boolean
found
=
false
;
boolean
found
=
false
;
/* click show all */
//FIXME:JK: implement me
for
(
int
j
=
0
;
j
<
browser
.
getXpathCount
(
selectorBuffer
.
toString
().
substring
(
6
)).
intValue
();
j
++){
for
(
int
j
=
0
;
j
<
browser
.
getXpathCount
(
selectorBuffer
.
toString
().
substring
(
6
)).
intValue
();
j
++){
functionalUtil
.
idle
(
browser
);
functionalUtil
.
waitForPageToLoadElement
(
browser
,
selectorBuffer
.
toString
()
+
"["
+
(
j
+
1
)
+
"]"
);
functionalUtil
.
waitForPageToLoadElement
(
browser
,
selectorBuffer
.
toString
()
+
"["
+
(
j
+
1
)
+
"]"
);
browser
.
click
(
selectorBuffer
.
toString
()
+
"["
+
(
j
+
1
)
+
"]"
);
browser
.
click
(
selectorBuffer
.
toString
()
+
"["
+
(
j
+
1
)
+
"]"
);
functionalUtil
.
waitForPageToLoad
(
browser
);
functionalUtil
.
idle
(
browser
);
String
businessPath1
=
functionalUtil
.
currentBusinessPath
(
browser
);
String
businessPath1
=
functionalUtil
.
currentBusinessPath
(
browser
);
functionalCourseUtil
.
closeActiveTab
(
browser
);
functionalCourseUtil
.
closeActiveTab
(
browser
);
...
...
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