forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LPD-27912 Migrate to integration tests
- Loading branch information
1 parent
2004d65
commit bd83dba
Showing
2 changed files
with
94 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3448,104 +3448,6 @@ definition { | |
DMDocument.viewCategories(categoryNameList = "Apple,Dragon Fruit"); | ||
} | ||
|
||
@description = "This test ensures that the user can view an expired document." | ||
@priority = 4 | ||
test CanViewExpiredDocument { | ||
property custom.properties = "company.default.time.zone=America/Los_Angeles"; | ||
property test.liferay.virtual.instance = "false"; | ||
property test.run.type = "single"; | ||
|
||
DMDocument.updateCheckInterval(fieldValue = 1); | ||
|
||
DMNavigator.openToAddEntry( | ||
groupName = "Guest", | ||
siteURLKey = "guest"); | ||
|
||
WaitForPageLoad(); | ||
|
||
DMDocument.editDocument( | ||
dmDocumentDescription = "DM Document Description", | ||
dmDocumentFile = "Document_1.txt", | ||
dmDocumentTitle = "Document_1.txt"); | ||
|
||
DMDocument.setExpirationDate( | ||
enableExpirationDate = "true", | ||
increaseMinutes = 1); | ||
|
||
Navigator.openURL(); | ||
|
||
Notifications.waitForNotificationFlexibly(flexibleRefreshingTime = 20000); | ||
|
||
Notifications.viewBadgeCount(notificationCount = 1); | ||
|
||
Notifications.gotoNotifications(); | ||
|
||
Notifications.viewExpiredContent(contentBody = "Document_1.txt"); | ||
|
||
DMNavigator.openDocumentsAndMediaAdmin(siteURLKey = "guest"); | ||
|
||
DMDocument.viewStatus( | ||
dmDocumentStatus = "Expired", | ||
dmDocumentTitle = "Document_1.txt"); | ||
} | ||
|
||
@description = "This test ensures that a user who has content review permissions can see an expired document." | ||
@priority = 4 | ||
test CanViewExpiredDocumentAsContentReviewer { | ||
property custom.properties = "company.default.time.zone=America/Los_Angeles${line.separator}jsonws.web.service.paths.excludes="; | ||
property test.liferay.virtual.instance = "false"; | ||
property test.run.type = "single"; | ||
|
||
JSONUser.addUser( | ||
userEmailAddress = "[email protected]", | ||
userFirstName = "userfn", | ||
userLastName = "userln", | ||
userScreenName = "usersn"); | ||
|
||
JSONUser.setFirstPassword( | ||
agreeToTermsAndAnswerReminderQuery = "true", | ||
requireReset = "false", | ||
userEmailAddress = "[email protected]"); | ||
|
||
JSONRole.assignRoleToUser( | ||
roleTitle = "Portal Content Reviewer", | ||
userEmailAddress = "[email protected]"); | ||
|
||
JSONDocument.addFileWithUploadedFile( | ||
dmDocumentDescription = "DM Document Description", | ||
dmDocumentTitle = "Document_5.txt", | ||
groupName = "Guest", | ||
mimeType = "text/plain", | ||
sourceFileName = "Document_5.txt"); | ||
|
||
DMDocument.updateCheckInterval(fieldValue = 1); | ||
|
||
DMNavigator.openToEditEntryInSite( | ||
dmDocumentTitle = "Document_5.txt", | ||
groupName = "Guest", | ||
siteURLKey = "guest"); | ||
|
||
WaitForPageLoad(); | ||
|
||
DMDocument.setExpirationDate( | ||
enableExpirationDate = "true", | ||
increaseMinutes = 1); | ||
|
||
// We need to wait for the system time to pass by 2 minutes in order to verify the document is expired. There is currently no easy way to manipulate the system time in CI for automation. 2 minutes is the shortest value we can set while ensuring the stability of the test. See LPS-157957. | ||
|
||
Pause(value1 = 120000); | ||
|
||
User.logoutAndLoginPG( | ||
userLoginEmailAddress = "[email protected]", | ||
userLoginFullName = "userfn userln"); | ||
|
||
Navigator.gotoPage(pageName = "Documents and Media Page"); | ||
|
||
DMDocument.viewStatus( | ||
dmDocumentStatus = "Expired", | ||
dmDocumentTitle = "Document_5.txt"); | ||
} | ||
|
||
@description = "This test ensures that users can view generic error when bulk copy more than ten wrong files." | ||
@priority = 4 | ||
test CanViewGenericErrorWhenBulkCopyMoreThanTenWrongFiles { | ||
|