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
9c0567f2
Commit
9c0567f2
authored
9 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1839: add a selenium test
parent
788e8fd5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/java/org/olat/selenium/CourseTest.java
+47
-0
47 additions, 0 deletions
src/test/java/org/olat/selenium/CourseTest.java
src/test/java/org/olat/selenium/page/NavigationPage.java
+7
-0
7 additions, 0 deletions
src/test/java/org/olat/selenium/page/NavigationPage.java
with
54 additions
and
0 deletions
src/test/java/org/olat/selenium/CourseTest.java
+
47
−
0
View file @
9c0567f2
...
@@ -164,6 +164,53 @@ public class CourseTest {
...
@@ -164,6 +164,53 @@ public class CourseTest {
.
clickTree
();
.
clickTree
();
}
}
/**
* Check if we can create and open a course with this
* name: It's me, the "course".
* @see https://jira.openolat.org/browse/OO-1839
*
* @param loginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public
void
createCourseWithSpecialCharacters
(
@InitialPage
LoginPage
loginPage
)
throws
IOException
,
URISyntaxException
{
UserVO
author
=
new
UserRestClient
(
deploymentUrl
).
createAuthor
();
loginPage
.
loginAs
(
author
.
getLogin
(),
author
.
getPassword
());
//go to authoring
AuthoringEnvPage
authoringEnv
=
navBar
.
assertOnNavigationPage
()
.
openAuthoringEnvironment
();
String
marker
=
Long
.
toString
(
System
.
currentTimeMillis
());
String
title
=
"It's me, the \"course\" number "
+
marker
;
//create course
RepositoryEditDescriptionPage
editDescription
=
authoringEnv
.
openCreateDropDown
()
.
clickCreate
(
ResourceType
.
course
)
.
fillCreateForm
(
title
)
.
assertOnGeneralTab
();
//from description editor, back to the course
editDescription
.
clickToolbarBack
();
//close the course
navBar
.
closeTab
();
//select the authoring
navBar
.
openAuthoringEnvironment
()
.
selectResource
(
marker
);
new
CoursePageFragment
(
browser
)
.
assertOnCoursePage
();
}
/**
/**
* Create a course, use the course wizard, select all course
* Create a course, use the course wizard, select all course
* elements and go further with the standard settings.
* elements and go further with the standard settings.
...
...
This diff is collapsed.
Click to expand it.
src/test/java/org/olat/selenium/page/NavigationPage.java
+
7
−
0
View file @
9c0567f2
...
@@ -176,4 +176,11 @@ public class NavigationPage {
...
@@ -176,4 +176,11 @@ public class NavigationPage {
OOGraphene
.
closeBlueMessageWindow
(
browser
);
OOGraphene
.
closeBlueMessageWindow
(
browser
);
return
this
;
return
this
;
}
}
public
NavigationPage
closeTab
()
{
By
closeBy
=
By
.
xpath
(
"//li//a[contains(@class,'o_navbar_tab_close')]"
);
browser
.
findElement
(
closeBy
).
click
();
return
this
;
}
}
}
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