@component-name = "portal-wcm" definition { property testray.main.component.name = "Site Pages Administration"; setUp { task ("Set up instance and sign in") { TestCase.setUpPortalInstance(); User.firstLoginPG(); } task ("Add a site via JSON") { JSONGroup.addGroup(groupName = "Test Site Name"); } } tearDown { var testPortalInstance = PropsUtil.get("test.portal.instance"); if ("${testPortalInstance}" == "true") { PortalInstances.tearDownCP(); } else { JSONGroup.deleteGroupByName(groupName = "Test Site Name"); } } test CreateAssets { task ("Add a vocabulary") { for (var n : list "A,B,C") { JSONCategory.addVocabulary( groupName = "Test Site Name", title = "Vocabulary ${n}"); } } task ("Add 100 categories and 100 web contents based on Basic Web Content with different categories") { var i = "1"; while ("${i}" != "31" && (maxIterations = "50")) { JSONCategory.addCategory( groupName = "Test Site Name", title = "A ${i}", vocabularyName = "Vocabulary A"); var i = ${i} + 1; } var i = "31"; while ("${i}" != "61" && (maxIterations = "50")) { JSONCategory.addCategory( groupName = "Test Site Name", title = "B ${i}", vocabularyName = "Vocabulary B"); var i = ${i} + 1; } var i = "61"; while ("${i}" != "101" && (maxIterations = "50")) { JSONCategory.addCategory( groupName = "Test Site Name", title = "C ${i}", vocabularyName = "Vocabulary C"); var i = ${i} + 1; } var categoryId1 = JSONCategory.getCategoryId( categoryName = "A 1", groupName = "Test Site Name", vocabularyName = "Vocabulary A"); var categoryId2 = JSONCategory.getCategoryId( categoryName = "A 2", groupName = "Test Site Name", vocabularyName = "Vocabulary A"); var categoryId3 = JSONCategory.getCategoryId( categoryName = "B 31", groupName = "Test Site Name", vocabularyName = "Vocabulary B"); var categoryId4 = JSONCategory.getCategoryId( categoryName = "B 32", groupName = "Test Site Name", vocabularyName = "Vocabulary B"); var categoryId5 = JSONCategory.getCategoryId( categoryName = "C 61", groupName = "Test Site Name", vocabularyName = "Vocabulary C"); var categoryId6 = JSONCategory.getCategoryId( categoryName = "C 62", groupName = "Test Site Name", vocabularyName = "Vocabulary C"); var i = "1"; while ("${i}" != "101" && (maxIterations = "100")) { JSONWebcontent.addWebContent( assetCategoryIds = "${categoryId1},${categoryId2},${categoryId3},${categoryId4},${categoryId5},${categoryId6}", content = "Web Content Content", groupName = "Test Site Name", title = "Web Content Title ${i}"); var i = ${i} + 1; } } } }