Skip to content

Commit

Permalink
archetype schrodinger tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Feb 11, 2019
1 parent f30aa00 commit ab6ef90
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 4 deletions.
16 changes: 15 additions & 1 deletion infra/schema/src/main/resources/localization/schema.properties
Expand Up @@ -331,6 +331,16 @@ GuiObjectListViewType.disableSorting=Disable sorting
GuiObjectListViewType.action=Action
GuiObjectListViewsType.default=Default
GuiObjectListViewsType.objectList=Object list
GuiObjectListViewsType.objectCollectionView=Object collection view
GuiObjectListViewType.collection=Collection
CollectionSpecificationType.collectionRef=Collection ref
CollectionSpecificationType.depth=Depth
CollectionSpecificationType.interpretation=Interpretation
CollectionSpecificationType.relation=Relation
UserInterfaceFeatureType.display=Display
DisplayType.pluralLabel=Plural label
DisplayType.icon=Icon
IconType.color=Color
HasAssignmentPolicyConstraintType.targetRef=Target
HasAssignmentPolicyConstraintType.enabled=Enable
HasAssignmentPolicyConstraintType.direct=Direct
Expand Down Expand Up @@ -623,6 +633,8 @@ RoleManagementConfigurationType.defaultExecuteAfterAllApprovals=Default execute
RoleManagementConfigurationType.autoassignEnabled=Autoassign enabled
RoleManagementConfigurationType.relations=Relations
SearchBoxConfigurationType.defaultMode=Default mode
SearchBoxConfigurationType.defaultObjectType=Default object type
SearchBoxConfigurationType.defaultScope=Default scope
ShadowType.dead=Dead
ShadowType.kind=Kind
ShadowType.failedOperationType=Failed operation type
Expand Down Expand Up @@ -865,6 +877,8 @@ AdminGuiConfigurationType.defaultExportSettings=Default export settings
AdminGuiConfigurationType.feature=Feature
AdminGuiConfigurationType.feedbackMessagesHook=Feedback messages hook
AdminGuiConfigurationType.roleManagement=Role management
AdminGuiConfigurationType.displayFormats=Display formats
AdminGuiConfigurationType.objectCollectionViews=Object collection views
midPointVersion=${pom.version}
midPointRevision=${git.describe}
IdempotenceType.CONSERVATIVE=Conservative
Expand Down Expand Up @@ -1227,4 +1241,4 @@ ArchetypePolicyType.display=Display
ArchetypePolicyType.conflictResolution=Conflict resolution
ArchetypePolicyType.lifecycleStateModel=Lifecycle state model
ArchetypePolicyType.applicablePolicies=Applicable policies
ConfigurationType.configurationProperties=Configuration properties
ConfigurationType.configurationProperties=Configuration properties
Expand Up @@ -197,9 +197,9 @@ public void changeResourceAttribute(String resourceName,String attributeName,Str
listResourcesPage
.table()
.search()
.byName()
.inputValue(resourceName)
.updateSearch()
.byName()
.inputValue(resourceName)
.updateSearch()
.and()
.clickByName(resourceName)
.clickEditResourceConfiguration()
Expand All @@ -214,6 +214,11 @@ public void changeResourceAttribute(String resourceName,String attributeName,Str
Assert.assertTrue(
listResourcesPage
.table()
.search()
.byName()
.inputValue(resourceName)
.updateSearch()
.and()
.clickByName(resourceName)
.clickEditResourceConfiguration()
.form()
Expand Down
@@ -0,0 +1,33 @@
package com.evolveum.midpoint.testing.schrodinger.scenarios;

import com.evolveum.midpoint.schrodinger.page.configuration.ImportObjectPage;
import com.evolveum.midpoint.testing.schrodinger.TestBase;
import org.testng.Assert;
import org.testng.annotations.Test;

import javax.naming.ConfigurationException;
import java.io.File;
import java.io.IOException;

/**
* Created by honchar
*/
public class ObjectListArchetypeTests extends TestBase {

private static final File EMPLOYEE_ARCHETYPE_FILE = new File("src/test/resources/configuration/objects/archetypes/archetype-employee.xml");

@Test
public void importEmployeeArchetype() throws IOException, ConfigurationException {

ImportObjectPage importPage = basicPage.importObject();
Assert.assertTrue(
importPage
.getObjectsFromFile()
.chooseFile(EMPLOYEE_ARCHETYPE_FILE)
.checkOverwriteExistingObject()
.clickImport()
.feedback()
.isSuccess()
);
}
}
@@ -0,0 +1,37 @@
<!--
~ Copyright (c) 2018-2019 Evolveum
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<archetype oid="7135e68c-ee53-11e8-8025-170b77da3fd6"
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:org='http://midpoint.evolveum.com/xml/ns/public/common/org-3'>
<name>Employee</name>
<archetypePolicy>
<display>
<label>Employee</label>
<pluralLabel>Employees</pluralLabel>
<icon>
<cssClass>fa fa-male</cssClass>
<color>blue</color>
</icon>
</display>
</archetypePolicy>
<assignment>
<assignmentRelation>
<holderType>UserType</holderType>
</assignmentRelation>
</assignment>
</archetype>

0 comments on commit ab6ef90

Please sign in to comment.