Skip to content

Commit

Permalink
LRAC-9295 Fix CanCreateSegmentWithNumberProperty testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinicius Lopes authored and brianchandotcom committed Sep 22, 2021
1 parent 97ff0b1 commit 5f7e960
Showing 1 changed file with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1020,18 +1020,22 @@ definition {
@description = "Feature ID: Legacy | Automation ID: LRAC-8479 | Test Summary: Create a Segment with a Number Property"
@priority = "4"
test CanCreateSegmentWithNumberProperty {
var usernameList = "user1,user2,user3";

var membershipList = "user1 user1,user3 user3";

task ("Add three more new users") {
for (var n : list "1,2,3") {
for (var name : list "${usernameList}") {
JSONUser.addUser(
userEmailAddress = "user${n}@liferay.com",
userFirstName = "user${n}",
userLastName = "user${n}",
userScreenName = "user${n}");
userEmailAddress = "${name}@liferay.com",
userFirstName = "${name}",
userLastName = "${name}",
userScreenName = "${name}");

JSONUser.setFirstPassword(
agreeToTermsAndAnswerReminderQuery = "true",
requireReset = "false",
userEmailAddress = "user${n}@liferay.com");
userEmailAddress = "${name}@liferay.com");
}
}

Expand All @@ -1044,7 +1048,7 @@ definition {
}

task ("View the page as different users") {
for (var username : list "user1,user2,user3") {
for (var username : list "${usernameList}") {
var fullName = "${username} ${username}";

User.logoutAndLoginPG(
Expand All @@ -1054,9 +1058,15 @@ definition {
Navigator.gotoSitePage(
pageName = "AC Page",
siteName = "Site Name");

Pause(locator1 = "3000");
}
}

task ("Close sessions and wait for 30 seconds") {
ACUtils.closeAllSessionsAndWait();
}

task ("Switch to new property in AC") {
ACUtils.launchAC();

Expand Down Expand Up @@ -1106,14 +1116,20 @@ definition {
task ("Search the new segment") {
ACUtils.searchBar(searchItem = "Dynamic Segment Test");

ACUtils.viewNameList(nameList = "Dynamic Segment Test");
ACSegments.accessSegment(segmentName = "Dynamic Segment Test");
}

task ("View the number of Membership is 2") {
ACAssets.viewAssetsInfo(
assetName = "Dynamic Segment Test",
index = "1",
value = "2");
task ("View the segment criteria card") {
ACSegments.viewSegmentCriteriaIndividualAttributes(
attributeName = "age",
attributeValue = "40",
condition = "less than");
}

task ("Switch tab to membership and check the membership list") {
ACNavigation.switchTab(tabName = "Membership");

ACUtils.viewNameList(nameList = "${membershipList}");
}
}

Expand Down

0 comments on commit 5f7e960

Please sign in to comment.