├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── config.yml
│ └── feature_request.md
└── workflows
│ ├── ci-build.yml
│ └── release.yml
├── .gitignore
├── .mvn
└── jvm.config
├── CODEOWNERS
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
├── pom.xml
├── utam-compiler
├── pom.xml
└── src
│ ├── assembly
│ └── standalone.xml
│ ├── main
│ ├── java
│ │ └── utam
│ │ │ └── compiler
│ │ │ ├── CommandLineEntryPoint.java
│ │ │ ├── EntryPoint.java
│ │ │ ├── UtamCompilationError.java
│ │ │ ├── diagnostics
│ │ │ ├── JsonErrorsConfig.java
│ │ │ └── ValidationUtilities.java
│ │ │ ├── grammar
│ │ │ ├── JsonDeserializer.java
│ │ │ ├── UtamArgument.java
│ │ │ ├── UtamComposeMethod.java
│ │ │ ├── UtamElement.java
│ │ │ ├── UtamElementFilter.java
│ │ │ ├── UtamInterfaceMethod.java
│ │ │ ├── UtamMatcher.java
│ │ │ ├── UtamMetadata.java
│ │ │ ├── UtamMethod.java
│ │ │ ├── UtamMethodAction.java
│ │ │ ├── UtamMethodActionApply.java
│ │ │ ├── UtamMethodActionGetter.java
│ │ │ ├── UtamMethodActionReturnSelf.java
│ │ │ ├── UtamMethodActionUtility.java
│ │ │ ├── UtamMethodActionWaitFor.java
│ │ │ ├── UtamMethodDescription.java
│ │ │ ├── UtamPageObject.java
│ │ │ ├── UtamProfile.java
│ │ │ ├── UtamRootDescription.java
│ │ │ ├── UtamRootSelector.java
│ │ │ ├── UtamSelector.java
│ │ │ ├── UtamShadowElement.java
│ │ │ └── UtamUtilityMethodAction.java
│ │ │ ├── helpers
│ │ │ ├── ActionType.java
│ │ │ ├── ActionableActionType.java
│ │ │ ├── AnnotationUtils.java
│ │ │ ├── BasicElementActionType.java
│ │ │ ├── ClickableActionType.java
│ │ │ ├── DraggableActionType.java
│ │ │ ├── EditableActionType.java
│ │ │ ├── ElementContext.java
│ │ │ ├── ElementUnitTestHelper.java
│ │ │ ├── LocatorCodeGeneration.java
│ │ │ ├── MatcherType.java
│ │ │ ├── MethodContext.java
│ │ │ ├── ParameterUtils.java
│ │ │ ├── ParametersContext.java
│ │ │ ├── PrimitiveType.java
│ │ │ ├── ReturnType.java
│ │ │ ├── StatementContext.java
│ │ │ ├── TouchableActionType.java
│ │ │ ├── TranslationContext.java
│ │ │ └── TypeUtilities.java
│ │ │ ├── lint
│ │ │ ├── JsonLintRulesConfig.java
│ │ │ ├── LintingConfigJson.java
│ │ │ ├── LintingContextImpl.java
│ │ │ ├── LintingErrorImpl.java
│ │ │ ├── LintingRuleImpl.java
│ │ │ ├── PageObjectLintingImpl.java
│ │ │ ├── SarifConverter.java
│ │ │ └── UtamLintingError.java
│ │ │ ├── representation
│ │ │ ├── BasicElementGetterMethod.java
│ │ │ ├── BeforeLoadMethod.java
│ │ │ ├── ComposeMethod.java
│ │ │ ├── ComposeMethodStatement.java
│ │ │ ├── ContainerMethod.java
│ │ │ ├── CustomElementMethod.java
│ │ │ ├── ElementField.java
│ │ │ ├── ElementMethod.java
│ │ │ ├── FrameMethod.java
│ │ │ ├── InterfaceMethod.java
│ │ │ ├── JavadocObject.java
│ │ │ ├── MatcherObject.java
│ │ │ ├── MethodDeclarationImpl.java
│ │ │ ├── MethodParametersTracker.java
│ │ │ └── RootElementMethod.java
│ │ │ ├── translator
│ │ │ ├── ClassSerializer.java
│ │ │ ├── CompilerErrors.java
│ │ │ ├── DefaultSourceConfiguration.java
│ │ │ ├── DefaultTargetConfiguration.java
│ │ │ ├── DefaultTranslatorConfiguration.java
│ │ │ ├── DefaultTranslatorRunner.java
│ │ │ ├── InterfaceSerializer.java
│ │ │ ├── JsonCompilerConfig.java
│ │ │ ├── JsonCompilerOutput.java
│ │ │ ├── Manifest.java
│ │ │ ├── StringValueProfileConfig.java
│ │ │ ├── TranslationTypesConfigJava.java
│ │ │ ├── TranslationUtilities.java
│ │ │ ├── TranslatorGenerationCommand.java
│ │ │ ├── UnitTestSerializer.java
│ │ │ └── UtamRunnerError.java
│ │ │ └── types
│ │ │ ├── BasicElementInterface.java
│ │ │ ├── BasicElementUnionType.java
│ │ │ └── BasicElementUnionTypeImpl.java
│ └── resources
│ │ ├── errors.config.json
│ │ └── rules.config.json
│ └── test
│ ├── java
│ └── utam
│ │ └── compiler
│ │ ├── JsonBuilderTestUtility.java
│ │ ├── diagnostics
│ │ └── JsonErrorsConfigTests.java
│ │ ├── grammar
│ │ ├── DeserializerUtilities.java
│ │ ├── JsonDeserializerTests.java
│ │ ├── TestUtilities.java
│ │ ├── UtamArgumentTests.java
│ │ ├── UtamElementBasicTests.java
│ │ ├── UtamElementContainerTests.java
│ │ ├── UtamElementCustomTests.java
│ │ ├── UtamElementFilterTests.java
│ │ ├── UtamElementFrameTests.java
│ │ ├── UtamElementLoadTests.java
│ │ ├── UtamElementWaitTests.java
│ │ ├── UtamMatcherTests.java
│ │ ├── UtamMethodActionApplyRootTests.java
│ │ ├── UtamMethodActionApplyTests.java
│ │ ├── UtamMethodActionDeserializerTests.java
│ │ ├── UtamMethodActionGetterTests.java
│ │ ├── UtamMethodActionReturnSelfTests.java
│ │ ├── UtamMethodActionUtilityTests.java
│ │ ├── UtamMethodActionWaitForTests.java
│ │ ├── UtamMethodDescriptionTests.java
│ │ ├── UtamMethodTests.java
│ │ ├── UtamPageObjectBeforeLoadTests.java
│ │ ├── UtamPageObjectInterfaceTests.java
│ │ ├── UtamPageObjectTests.java
│ │ ├── UtamProfileTests.java
│ │ ├── UtamRootDescriptionTests.java
│ │ ├── UtamRootSelectorTests.java
│ │ ├── UtamSelectorTests.java
│ │ └── UtamShadowElementTests.java
│ │ ├── helpers
│ │ ├── ActionableActionTypeTests.java
│ │ ├── AnnotationUtilsTests.java
│ │ ├── BasicElementActionTypeTests.java
│ │ ├── ClickableActionTypeTests.java
│ │ ├── DraggableActionTypeTests.java
│ │ ├── EditableActionTypeTests.java
│ │ ├── ElementContextTests.java
│ │ ├── MatcherTypeTests.java
│ │ ├── MethodContextTests.java
│ │ ├── ParameterUtilsTests.java
│ │ ├── PrimitiveTypeTests.java
│ │ ├── ReturnTypeTests.java
│ │ ├── TouchableActionTypeTests.java
│ │ ├── TranslationContextTests.java
│ │ └── TypeUtilitiesTests.java
│ │ ├── lint
│ │ ├── LintingConfigJsonTests.java
│ │ ├── LintingRuleTests.java
│ │ └── SarifConverterTests.java
│ │ ├── representation
│ │ ├── CustomElementMethodTests.java
│ │ ├── ElementFieldTests.java
│ │ ├── ElementMethodTests.java
│ │ ├── FrameMethodTests.java
│ │ ├── InterfaceMethodTests.java
│ │ ├── MethodDeclarationImplTests.java
│ │ └── PageObjectValidationTestHelper.java
│ │ └── translator
│ │ ├── ClassSerializerTests.java
│ │ ├── DefaultSourceConfigurationTests.java
│ │ ├── DefaultTargetConfigurationTests.java
│ │ ├── DefaultTranslatorConfigurationTests.java
│ │ ├── DefaultTranslatorRunnerTests.java
│ │ ├── ErrorConfigTests.java
│ │ ├── InterfaceSerializerTests.java
│ │ ├── JsonCompilerConfigTests.java
│ │ ├── JsonCompilerOutputTests.java
│ │ ├── StringValueProfileConfigTests.java
│ │ ├── TranslationTypesConfigJavaTests.java
│ │ ├── TranslationUtilitiesTests.java
│ │ ├── TranslatorGenerationCommandTests.java
│ │ └── UnitTestSerializerTests.java
│ └── resources
│ ├── beforeload
│ ├── rootApplyReturnSelf.json
│ ├── rootApplyWithMatcher.json
│ ├── waitForRootPresence.json
│ ├── waitForRootReturnsSelf.json
│ ├── waitForUrlWithMatcher.json
│ ├── withArgs.json
│ ├── wrongElement.json
│ └── wrongPredicateElement.json
│ ├── compiler
│ ├── default.expected.json
│ ├── expected1.config.json
│ ├── expected2.config.json
│ ├── expected3.config.json
│ ├── expected4.config.json
│ ├── spec
│ │ ├── deviceIOSPhone.utam.json
│ │ ├── deviceIOSandIOSTablet.utam.json
│ │ └── deviceInterface.utam.json
│ └── test.compiler.json
│ ├── compose
│ ├── apply
│ │ ├── argsReference.json
│ │ ├── basicElement.json
│ │ ├── basicElementReused.json
│ │ ├── basicElementScopeWithParameters.json
│ │ ├── basicElementWithFilter.json
│ │ ├── basicListReturns.json
│ │ ├── basicListVoid.json
│ │ ├── clickableElement.json
│ │ ├── containerChain.json
│ │ ├── customElement.json
│ │ ├── customElementNestedWithArg.json
│ │ ├── customListWithChain.json
│ │ ├── customWithFilterFindFirst.json
│ │ ├── documentElement.json
│ │ ├── dragAndDropElementLiteralWithDuration.json
│ │ ├── dragAndDropWithOffset.json
│ │ ├── dragAndDropWithOffsetDuration.json
│ │ ├── frameActions.json
│ │ ├── frameAsBasic.json
│ │ ├── frameLiteralArgs.json
│ │ ├── frameLiteralArgsVoid.json
│ │ ├── frameNonLiteralArgs.json
│ │ ├── frameNonLiteralArgsVoid.json
│ │ ├── navigationElement.json
│ │ ├── nestedArgElement.json
│ │ ├── selfReturnBoolean.json
│ │ └── selfReturnList.json
│ ├── args
│ │ ├── duplicateElementsArgs.json
│ │ ├── nonLiteralPageObject.json
│ │ ├── nonLiteralRootPageObject.json
│ │ └── nonLiteralRootPageObjectReturns.json
│ ├── getter
│ │ ├── argsReference.json
│ │ ├── basicFindFirst.json
│ │ ├── basicPrivateNoType.json
│ │ ├── basicWithMatcher.json
│ │ ├── chainNestedArgs.json
│ │ ├── chainReturnAll.json
│ │ ├── containerChain.json
│ │ ├── containerCompose.json
│ │ ├── containerNamesCollision.json
│ │ ├── customFindAll.json
│ │ ├── customFindFirst.json
│ │ ├── customList.json
│ │ ├── customListReused.json
│ │ ├── customPrivateSingle.json
│ │ ├── customWithMatcher.json
│ │ ├── frameGetter.json
│ │ ├── frameGetterWithMatcher.json
│ │ └── reuseSameArg.json
│ ├── predicate
│ │ ├── reuseElement.json
│ │ ├── waitForBasicList.json
│ │ ├── waitForCustom.json
│ │ ├── waitForRoot.json
│ │ ├── waitForWithChain.json
│ │ ├── waitReturnSelf.json
│ │ └── waitVoidAction.json
│ ├── return
│ │ ├── abstract
│ │ │ ├── namesCollision.json
│ │ │ ├── returnFrame.json
│ │ │ ├── returnPageObject.json
│ │ │ ├── returnPageObjectList.json
│ │ │ └── returnRootPageObject.json
│ │ ├── containerLiteralReturn.json
│ │ ├── containerLiteralReturnList.json
│ │ ├── containerNonLiteralReturn.json
│ │ ├── containerNonLiteralReturnList.json
│ │ ├── namesCollisionReturnsList.json
│ │ ├── returnFrame.json
│ │ ├── returnRootPageObject.json
│ │ └── returnRootPageObjectList.json
│ ├── returnSelf
│ │ ├── notLastStatement.json
│ │ ├── notLastStatementBeforeLoad.json
│ │ ├── notLastStatementPredicate.json
│ │ ├── predicateReturnSelf.json
│ │ ├── returnSelf.json
│ │ ├── returnSelfError.json
│ │ └── returnSelfOnly.json
│ ├── root
│ │ ├── privateRootUnknownAction.json
│ │ ├── privateRootWithType.json
│ │ ├── privateRootWrongAction.json
│ │ ├── publicRootNoType.json
│ │ ├── publicRootWithType.json
│ │ ├── publicRootWrongAction.json
│ │ └── rootContains.json
│ └── utility
│ │ ├── chain.json
│ │ ├── customReturnType.json
│ │ └── noReturn.json
│ ├── config
│ ├── nofields.json
│ ├── nonamespaces.config.json
│ ├── test_error_config.json
│ ├── test_wrong_error_config.json
│ ├── utam.config.json
│ └── utam.nodirectory.config.json
│ ├── container
│ ├── containerDefaultSelector.json
│ ├── containerList.json
│ ├── containerNullable.json
│ ├── containerWithParameters.json
│ └── nestedElements.json
│ ├── custom
│ ├── customListWithSelectorArg.json
│ ├── customPublicNullable.json
│ ├── nestedElements.json
│ └── nestedElementsFromFilter.json
│ ├── element
│ ├── basicElement.json
│ ├── basicElementNullableList.json
│ ├── basicElementNullableSingle.json
│ ├── basicElementTypesImplOnly.json
│ ├── basicListBasicElement.json
│ ├── basicListPrivateUnion.json
│ ├── basicListPublicElement.json
│ ├── basicListPublicUnion.json
│ ├── nestedElements.json
│ └── publicElementTypesImplOnly.json
│ ├── errors
│ ├── interrupt.json
│ ├── report.json
│ └── spec
│ │ ├── error.utam.json
│ │ └── root.utam.json
│ ├── filter
│ ├── basicElementFilter.json
│ ├── basicFilterGetAttribute.json
│ ├── basicFilterGetCssPropertyValue.json
│ ├── basicFilterIsVisible.json
│ ├── basicFilterPublic.json
│ ├── basicFilterPublicUnion.json
│ ├── basicWithFilterContainsElement.json
│ ├── customFilterBoolean.json
│ ├── customFilterNested.json
│ ├── customNestedWithFilter.json
│ ├── customWithFilter.json
│ └── customWithFilterContainsElement.json
│ ├── frame
│ ├── framePrivate.json
│ └── framePublic.json
│ ├── generated
│ ├── args
│ │ ├── elementReference.utam.json
│ │ └── literalGetterArg.utam.json
│ ├── basic
│ │ ├── nestedFilteredBasicList.utam.json
│ │ ├── nestedInsideList.utam.json
│ │ ├── testBasicTypes.utam.json
│ │ └── testDuplicates.utam.json
│ ├── comments
│ │ ├── verboseInterface.utam.json
│ │ ├── verboseObject.utam.json
│ │ └── verboseString.utam.json
│ ├── compiler.config.json
│ ├── container
│ │ ├── containerNullable.utam.json
│ │ ├── nestedElements.utam.json
│ │ └── testContainer.utam.json
│ ├── custom
│ │ ├── nestedElements.utam.json
│ │ ├── testCustomTypes.utam.json
│ │ └── testDuplicateElements.utam.json
│ ├── duplicate
│ │ ├── testDuplicateContainerLiteralArgs.utam.json
│ │ └── testDuplicates.utam.json
│ ├── frame
│ │ └── testFrame.utam.json
│ ├── load
│ │ ├── loadAndWaitBasicElement.utam.json
│ │ ├── loadBasicPrivateElement.utam.json
│ │ ├── loadBasicPublicElement.utam.json
│ │ ├── loadCustomElement.utam.json
│ │ ├── loadFilterElement.utam.json
│ │ ├── loadFrameElement.utam.json
│ │ ├── loadNested.utam.json
│ │ └── loadNestedFilter.utam.json
│ ├── mobile
│ │ ├── applyNavigationDocument.utam.json
│ │ ├── nativeContext.utam.json
│ │ └── webContext.utam.json
│ ├── profiles
│ │ ├── defaultImpl.utam.json
│ │ └── interfaceTest.utam.json
│ └── wait
│ │ ├── waitForBasicElement.utam.json
│ │ ├── waitForContainer.utam.json
│ │ └── waitForElement.utam.json
│ ├── interface
│ ├── exposeRoot.json
│ ├── exposeRootImpl.json
│ ├── exposeRootNoTypes.json
│ ├── exposeRootNoTypesImpl.json
│ ├── nonEmptyMethod.json
│ ├── returnBasicElement.json
│ ├── returnListOfBasicElements.json
│ ├── returnListOfBasicElementsImpl.json
│ ├── returnListOfCustomElements.json
│ ├── returnString.json
│ └── returnVoid.json
│ ├── lint
│ ├── changeDefaultConfig
│ │ ├── config.json
│ │ └── test.utam.json
│ ├── changeGlobalRules
│ │ ├── config.json
│ │ ├── hasAnotherSameRootSelector.utam.json
│ │ ├── hasDifferentRootSelector.utam.json
│ │ ├── hasRootSelector.utam.json
│ │ └── hasSameRootSelector.utam.json
│ ├── elementTypes
│ │ ├── anotherCustomType.json
│ │ ├── basicType.json
│ │ ├── containerType.json
│ │ └── customType.json
│ ├── ignore
│ │ ├── config.json
│ │ └── test.utam.json
│ ├── metadata
│ │ ├── pageWithEmptyMetadataProperty.json
│ │ ├── pageWithInvalidMetadataProperty.json
│ │ ├── pageWithMetadata.json
│ │ ├── pageWithMissingMetadataProperty.json
│ │ ├── pageWithoutMetadata.json
│ │ ├── presence.config.json
│ │ └── structure.config.json
│ ├── rootSelectors
│ │ ├── one.json
│ │ ├── three.json
│ │ └── two.json
│ ├── rootType
│ │ ├── elements.json
│ │ └── root.json
│ ├── rules
│ │ ├── defaultConfig.json
│ │ ├── elementDescription.json
│ │ ├── interface.json
│ │ ├── listSelector.json
│ │ ├── listSelectorWithFilters.json
│ │ ├── rootNoAuthor.json
│ │ └── twoContainers.json
│ ├── sarif
│ │ ├── config.json
│ │ └── test.utam.json
│ ├── throwConfig
│ │ ├── config.json
│ │ └── test.utam.json
│ └── throwConfigPass
│ │ ├── config.json
│ │ └── test.utam.json
│ ├── matcher
│ ├── incorrectMatcherForVoid.json
│ ├── incorrectMatcherInCompose.json
│ ├── incorrectMatcherInFilter.json
│ ├── wrongArgsNumber.json
│ └── wrongArgsType.json
│ ├── nestedlist
│ ├── nestedContainerList.json
│ ├── nestedCustomList.json
│ ├── nestedFilteredBasicList.json
│ └── nestedInsideList.json
│ ├── pageobjects
│ ├── implements.json
│ ├── non_root.json
│ ├── profiles.json
│ ├── root.json
│ └── testContext.json
│ ├── selector
│ └── selectorArgs.json
│ ├── spec
│ ├── one
│ │ └── first.utam.json
│ └── two
│ │ └── second.utam.json
│ └── validate
│ ├── apply
│ ├── redundantElementForChain.json
│ └── wrongArgType.json
│ ├── args
│ ├── abstractLiteralArg.json
│ ├── descriptionInFunctionArg.json
│ ├── duplicateElementsArgs.json
│ ├── methodLiteralArg.json
│ ├── missingNameValue.json
│ ├── missingType.json
│ └── redundantNameValue.json
│ ├── basic_element
│ ├── duplicateBasicType.json
│ ├── emptyNestedElementsArray.json
│ ├── filterForNonList.json
│ ├── loadElementWithArguments.json
│ ├── loadFilterElementWithArgs.json
│ ├── loadNestedElementWithArgs.json
│ ├── loadNestedFilterWithArgs.json
│ ├── navigationName.json
│ ├── waitWrongType.json
│ ├── wrongBasicType.json
│ ├── wrongBasicTypeArray.json
│ └── wrongBasicTypeArrayElement.json
│ ├── comments
│ ├── blockComment.json
│ └── singleLineComment.json
│ ├── compose
│ ├── argReferenceParam.json
│ ├── emptyCompose.json
│ ├── emptyComposeStatement.json
│ ├── incorrectPredicate.json
│ ├── nestedWait.json
│ ├── nullCompose.json
│ ├── redundantApply.json
│ ├── redundantElement.json
│ ├── redundantParameters.json
│ ├── referencedArgNotFound.json
│ ├── sameArgsNames.json
│ └── waitForIncorrectMessageArg.json
│ ├── container_element
│ ├── loadContainer.json
│ ├── methodNameCollisionForScope.json
│ └── testDuplicateArgs.json
│ ├── custom_element
│ ├── customDuplicateArgs.json
│ ├── filterForNonList.json
│ └── nestedElementNameCollision.json
│ ├── filter
│ ├── basicFilterDuplicateArgs.json
│ ├── basicFilterNoMatcher.json
│ ├── basicFilterUnsupportedMethod.json
│ ├── basicFilterWrongMethod.json
│ └── customWrongMatcherArg.json
│ ├── frame
│ ├── missingSelector.json
│ ├── nestedElements.json
│ ├── nestedShadowElements.json
│ ├── nullable.json
│ └── returnAll.json
│ ├── getter
│ ├── chainNeedsReturn.json
│ ├── chainNotAllowed.json
│ ├── firstChain.json
│ ├── incorrectMatcherType.json
│ ├── incorrectStatementReturn.json
│ ├── redundantArgs.json
│ └── unknownElementName.json
│ ├── method_comments
│ ├── empty_return.json
│ ├── empty_string.json
│ ├── empty_text.json
│ ├── empty_text_array.json
│ └── empty_throws.json
│ ├── return
│ ├── abstractReturnArrayEmpty.json
│ ├── abstractReturnArrayNonBasic.json
│ ├── abstractReturnArrayNonTextual.json
│ ├── containerListThrows.json
│ ├── containerWrongBoundTypeThrows.json
│ ├── returnAllRedundant.json
│ ├── returnIncorrectString.json
│ ├── returnMethodAllRedundant.json
│ ├── returnMethodIncorrectString.json
│ ├── returnObject.json
│ └── returnTypeMethodNotAllowed.json
│ ├── selector
│ ├── selectorChainOperator.json
│ ├── selectorChainQuotesRoot.json
│ ├── selectorReturnAllRoot.json
│ ├── selectorSameArgs.json
│ ├── selectorUIAutomator.json
│ ├── selectorUIAutomatorRoot.json
│ ├── selectorUIAutomatorScrollable.json
│ ├── selectorUIAutomatorScrollableRoot.json
│ ├── selectorWrongArgs.json
│ └── wrongFormat.json
│ ├── shadow
│ ├── incorrectElement.json
│ ├── nestedElementsEmpty.json
│ ├── nestedElementsMissing.json
│ └── nestedElementsNotArray.json
│ ├── translator
│ └── elementName.json
│ └── wait
│ ├── waitForNameCollisionPrivate.json
│ └── waitForNameCollisionPublic.json
└── utam-core
├── pom.xml
└── src
├── main
├── java
│ └── utam
│ │ └── core
│ │ ├── declarative
│ │ ├── errors
│ │ │ ├── CompilerErrorsConfig.java
│ │ │ └── CompilerErrorsContext.java
│ │ ├── lint
│ │ │ ├── LintingConfig.java
│ │ │ ├── LintingContext.java
│ │ │ ├── LintingError.java
│ │ │ ├── LintingRule.java
│ │ │ └── PageObjectLinting.java
│ │ ├── representation
│ │ │ ├── AnnotationProvider.java
│ │ │ ├── MethodDeclaration.java
│ │ │ ├── MethodParameter.java
│ │ │ ├── PageClassField.java
│ │ │ ├── PageObjectClass.java
│ │ │ ├── PageObjectDeclaration.java
│ │ │ ├── PageObjectInterface.java
│ │ │ ├── PageObjectMethod.java
│ │ │ ├── TypeProvider.java
│ │ │ └── UnionType.java
│ │ └── translator
│ │ │ ├── ProfileConfiguration.java
│ │ │ ├── TranslationTypesConfig.java
│ │ │ ├── TranslatorConfig.java
│ │ │ ├── TranslatorRunner.java
│ │ │ ├── TranslatorSourceConfig.java
│ │ │ ├── TranslatorTargetConfig.java
│ │ │ └── UnitTestRunner.java
│ │ ├── driver
│ │ ├── Document.java
│ │ ├── Driver.java
│ │ ├── DriverConfig.java
│ │ ├── DriverType.java
│ │ ├── Navigation.java
│ │ └── Window.java
│ │ ├── element
│ │ ├── Actionable.java
│ │ ├── BasicElement.java
│ │ ├── Clickable.java
│ │ ├── DragAndDropOptions.java
│ │ ├── Draggable.java
│ │ ├── Editable.java
│ │ ├── Element.java
│ │ ├── FindContext.java
│ │ ├── FrameElement.java
│ │ ├── Locator.java
│ │ └── Touchable.java
│ │ ├── framework
│ │ ├── UtamCoreError.java
│ │ ├── UtamLogger.java
│ │ ├── base
│ │ │ ├── BasePageObject.java
│ │ │ ├── BaseRootPageObject.java
│ │ │ ├── BasicElementBuilder.java
│ │ │ ├── ContainerElementImpl.java
│ │ │ ├── ContainerElementPageObject.java
│ │ │ ├── CustomElementBuilder.java
│ │ │ ├── ElementLocation.java
│ │ │ ├── ElementMarker.java
│ │ │ ├── FrameElementImpl.java
│ │ │ ├── ImperativeExtension.java
│ │ │ ├── ImperativeProvider.java
│ │ │ ├── PageMarker.java
│ │ │ ├── PageObject.java
│ │ │ ├── PageObjectsFactory.java
│ │ │ ├── PageObjectsFactoryImpl.java
│ │ │ ├── RootPageObject.java
│ │ │ ├── UtamBase.java
│ │ │ ├── UtamBaseImpl.java
│ │ │ └── UtamUtilitiesContext.java
│ │ ├── consumer
│ │ │ ├── Contained.java
│ │ │ ├── Container.java
│ │ │ ├── ContainerElement.java
│ │ │ ├── JsonInjectionsConfig.java
│ │ │ ├── JsonLoaderConfig.java
│ │ │ ├── PageObjectContext.java
│ │ │ ├── PageObjectContextImpl.java
│ │ │ ├── UtamError.java
│ │ │ ├── UtamLoader.java
│ │ │ ├── UtamLoaderConfig.java
│ │ │ ├── UtamLoaderConfigImpl.java
│ │ │ └── UtamLoaderImpl.java
│ │ ├── context
│ │ │ ├── DefaultProfileContext.java
│ │ │ ├── MobilePlatformType.java
│ │ │ ├── PlatformType.java
│ │ │ ├── Profile.java
│ │ │ ├── ProfileContext.java
│ │ │ └── StringValueProfile.java
│ │ └── element
│ │ │ ├── BasePageElement.java
│ │ │ ├── DocumentObject.java
│ │ │ ├── NavigationImpl.java
│ │ │ └── WindowImpl.java
│ │ └── selenium
│ │ ├── appium
│ │ ├── LocatorAccessibilityId.java
│ │ ├── LocatorClassChain.java
│ │ ├── LocatorUIAutomator.java
│ │ ├── MobileDriverAdapter.java
│ │ ├── MobileDriverUtils.java
│ │ └── MobileElementAdapter.java
│ │ ├── element
│ │ ├── DriverAdapter.java
│ │ ├── ElementAdapter.java
│ │ ├── LocatorBy.java
│ │ ├── LocatorByCss.java
│ │ ├── Rect.java
│ │ ├── ShadowRootElementAdapter.java
│ │ └── ShadowRootWebElement.java
│ │ ├── factory
│ │ ├── AppiumCapabilityProvider.java
│ │ ├── AppiumServerFactory.java
│ │ ├── SystemProperties.java
│ │ └── WebDriverFactory.java
│ │ └── utilities
│ │ ├── WebDriverSimulator.java
│ │ └── WebDriverSimulatorObjectFactory.java
└── resources
│ └── log4j.properties
└── test
├── java
└── utam
│ └── core
│ ├── MockUtilities.java
│ ├── OutsidePackageProxyTest.java
│ ├── declarative
│ ├── representation
│ │ └── AnnotationProviderTests.java
│ └── translator
│ │ └── UnitTestRunnerTests.java
│ ├── element
│ └── FindContextTests.java
│ ├── framework
│ ├── UtamLoggerTests.java
│ ├── base
│ │ ├── BasePageObjectTests.java
│ │ ├── BasicElementBuilderTests.java
│ │ ├── ContainerElementPageObjectTests.java
│ │ ├── ContainerElementTests.java
│ │ ├── CustomElementBuilderTests.java
│ │ ├── ElementMarkerTests.java
│ │ ├── FrameElementTests.java
│ │ ├── ImperativeProviderTests.java
│ │ ├── PageMarkerTests.java
│ │ ├── PageObjectTests.java
│ │ └── UtamBaseTests.java
│ ├── consumer
│ │ ├── JsonInjectionsConfigTests.java
│ │ ├── JsonLoaderConfigTests.java
│ │ ├── PageObjectContextTests.java
│ │ ├── TestLoaderConfigDefault.java
│ │ ├── TestLoaderConfigPageObject.java
│ │ ├── TestLoaderConfigPageObjectOverride.java
│ │ ├── TestLoaderConfigPageObjectProfile.java
│ │ ├── UtamErrorTests.java
│ │ ├── UtamLoaderConfigTests.java
│ │ ├── UtamLoaderTests.java
│ │ └── impl
│ │ │ └── TestLoaderConfigPageObjectImpl.java
│ ├── context
│ │ ├── MobilePlatformTypeTests.java
│ │ ├── PlatformTypeTests.java
│ │ ├── ProfileContextTests.java
│ │ └── StringValueProfileTests.java
│ └── element
│ │ ├── BasePageElementTests.java
│ │ ├── DocumentObjectTests.java
│ │ ├── NavigationTests.java
│ │ └── WindowTests.java
│ └── selenium
│ ├── appium
│ ├── LocatorAccessibilityIdTests.java
│ ├── LocatorClassChainTests.java
│ ├── LocatorUiAutomatorTests.java
│ ├── MobileDriverAdapterTests.java
│ └── MobileElementAdapterTests.java
│ ├── element
│ ├── DriverAdapterTests.java
│ ├── ElementAdapterTests.java
│ ├── LocatorByTests.java
│ └── ShadowRootWebElementTests.java
│ ├── factory
│ ├── AppiumCapabilityProviderTests.java
│ ├── SystemPropertiesTests.java
│ └── WebDriverFactoryTests.java
│ └── utilities
│ ├── PrivateConstructorFactory.java
│ ├── TestObjectFactory.java
│ ├── ThrowingConstructorFactory.java
│ └── WebDriverSimulatorTests.java
└── resources
├── config
├── emptyFile.config.json
├── emptyProfiles.config.json
├── module1.config.json
├── module2.config.json
└── wrongFormat.config.json
├── loaderconfig
├── test_duplicate_config.json
├── test_empty_config.json
├── test_incorrect_config.json
├── test_loader_config.json
└── test_one_module_loader_config.json
├── module1.config.json
└── module2.config.json
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: "[Feat Request]"
5 | labels: feature request, needs triaging
6 | ---
7 |
8 | ### Is your feature request related to a problem? Please describe
9 |
10 |
11 | ### Describe the solution you'd like
12 |
13 |
14 | ### Describe alternatives you've considered
15 |
16 |
17 | ### Additional context
18 |
19 |
--------------------------------------------------------------------------------
/.github/workflows/ci-build.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3 |
4 | # This workflow uses actions that are not certified by GitHub.
5 | # They are provided by a third-party and are governed by
6 | # separate terms of service, privacy policy, and support
7 | # documentation.
8 |
9 | name: CI Build
10 |
11 | on:
12 | push:
13 | branches: [ "dev" ]
14 | pull_request:
15 | branches: [ "dev" ]
16 |
17 | jobs:
18 | build:
19 |
20 | runs-on: ubuntu-latest
21 |
22 | steps:
23 | - uses: actions/checkout@v4
24 | - name: Set up JDK 17
25 | uses: actions/setup-java@v4
26 | with:
27 | java-version: '17'
28 | distribution: 'temurin'
29 | cache: maven
30 | - name: Build
31 | run: mvn -B -DskipTests clean package
32 | - name: Test
33 | run: mvn test
34 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | jobs:
7 | release:
8 | runs-on: ubuntu-latest
9 |
10 | steps:
11 | - uses: actions/checkout@v4
12 | - name: Set up JDK 17
13 | uses: actions/setup-java@v4
14 | with:
15 | java-version: '17'
16 | distribution: 'temurin'
17 | server-id: 'ossrh'
18 | server-username: OSSRH_USERNAME
19 | server-password: OSSRH_PASSWORD
20 | gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
21 | gpg-passphrase: GPG_KEY_PASSPHRASE
22 | cache: maven
23 |
24 | - name: Build
25 | run: mvn -B -P release clean verify
26 | env:
27 | GPG_KEY_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
28 | OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
29 | OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | pom.xml.*
3 | .mvn/timing.properties
4 | *.iml
5 | .idea
6 | .project
7 | */.classpath
8 | */.project
9 | */.settings
10 | .settings/*
11 | .metadata
12 | bin/
13 | tmp/
14 | *.tmp
15 | *.bak
16 | *.swp
17 | *~.nib
18 | chromedriver*
19 | .DS_Store
20 | log.out
21 | surefire*
22 | *.png
23 | *.pgp
24 | out/
25 | **/test-output/
26 | release.properties
27 | # generated tests page objects
28 | utam-compiler/src/test/java/generated/**
29 | utam-compiler/src/test/java/errors/**
30 | **/*.config.json
31 | **/*sarif*
32 | **/utam.errors.txt
33 | **/pageObjectManifest.json
34 |
--------------------------------------------------------------------------------
/.mvn/jvm.config:
--------------------------------------------------------------------------------
1 | --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
2 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing.
2 | #ECCN:Open Source
3 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | ## Security
2 |
3 | Please report any security issue to [security@salesforce.com](mailto:security@salesforce.com)
4 | as soon as it is discovered. This library limits its runtime dependencies in
5 | order to reduce the total cost of ownership as much as can be, but all consumers
6 | should remain vigilant and have their security stakeholders review all third-party
7 | products (3PP) like this one and their dependencies.
--------------------------------------------------------------------------------
/utam-compiler/src/assembly/standalone.xml:
--------------------------------------------------------------------------------
1 |
8 |
11 | standalone
12 |
13 | jar
14 |
15 | false
16 |
17 |
18 | /
19 | true
20 | true
21 | runtime
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/utam-compiler/src/main/java/utam/compiler/CommandLineEntryPoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.compiler;
9 |
10 | import picocli.CommandLine;
11 | import utam.compiler.translator.TranslatorGenerationCommand;
12 |
13 | /** The entry point for the compiler when invoked via the command line */
14 | public class CommandLineEntryPoint {
15 |
16 | /**
17 | * The main method for the command line entry point
18 | *
19 | * @param args the list of arguments passed in via the command line
20 | */
21 | public static void main(String[] args) {
22 | TranslatorGenerationCommand command = new TranslatorGenerationCommand();
23 | int exitCode = new CommandLine(command).setCaseInsensitiveEnumValuesAllowed(true).execute(args);
24 | if (exitCode != CommandLine.ExitCode.OK) {
25 | System.out.println(command.getThrownError().getMessage());
26 | }
27 | System.exit(exitCode);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/utam-compiler/src/main/java/utam/compiler/EntryPoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.compiler;
9 |
10 | import picocli.CommandLine;
11 | import utam.compiler.translator.TranslatorGenerationCommand;
12 |
13 | /** The entry point for the compiler when invoked programmatically */
14 | public class EntryPoint {
15 |
16 | /**
17 | * The main method for the command line entry point
18 | *
19 | * @param args the list of arguments passed in via the command line
20 | * @throws Exception thrown if the command executed does not return a success status
21 | */
22 | public static void main(String[] args) throws Exception {
23 | TranslatorGenerationCommand command = new TranslatorGenerationCommand();
24 | int exitCode = new CommandLine(command).setCaseInsensitiveEnumValuesAllowed(true).execute(args);
25 | if (exitCode != CommandLine.ExitCode.OK) {
26 | throw command.getThrownError();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/utam-compiler/src/main/java/utam/compiler/lint/UtamLintingError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.compiler.lint;
9 |
10 | import utam.core.framework.consumer.UtamError;
11 |
12 | /**
13 | * Error thrown by linting
14 | *
15 | * @author elizaveta.ivanova
16 | * @since 242
17 | */
18 | class UtamLintingError extends UtamError {
19 |
20 | /** Default serial version ID for serializable object */
21 | private static final long serialVersionUID = 1L;
22 |
23 | /**
24 | * Initializes a new instance of the UtamValidationError class
25 | *
26 | * @param message the validation error message
27 | */
28 | UtamLintingError(String message) {
29 | super(message);
30 | }
31 |
32 | UtamLintingError(String message, Throwable t) {
33 | super(message, t);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/rootApplyReturnSelf.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad": [
3 | {
4 | "element" : "root",
5 | "apply" : "isPresent"
6 | },
7 | {
8 | "element" : "root",
9 | "apply": "getText"
10 | },
11 | {
12 | "apply": "returnSelf"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/rootApplyWithMatcher.json:
--------------------------------------------------------------------------------
1 | {
2 | "exposeRootElement" : true,
3 | "beforeLoad": [
4 | {
5 | "element": "root",
6 | "apply": "getText",
7 | "matcher": {
8 | "type": "stringEquals",
9 | "args": [
10 | {
11 | "value": "text"
12 | }
13 | ]
14 | }
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/waitForRootPresence.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad" : [
3 | {
4 | "apply" : "waitFor",
5 | "args" : [
6 | {
7 | "type" : "function",
8 | "predicate" : [
9 | {
10 | "element" : "root",
11 | "apply" : "isPresent"
12 | }
13 | ]
14 | },
15 | {
16 | "value" : "message"
17 | }
18 | ]
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/waitForRootReturnsSelf.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad" : [
3 | {
4 | "apply" : "waitFor",
5 | "args" : [
6 | {
7 | "type" : "function",
8 | "predicate" : [
9 | {
10 | "element" : "root",
11 | "apply" : "isPresent"
12 | }
13 | ]
14 | }
15 | ]
16 | },
17 | {
18 | "apply": "returnSelf"
19 | }
20 | ]
21 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/waitForUrlWithMatcher.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad" : [
3 | {
4 | "element" : "root",
5 | "apply" : "waitFor",
6 | "args" : [
7 | {
8 | "type" : "function",
9 | "predicate" : [
10 | {
11 | "element" : "document",
12 | "apply" : "getUrl",
13 | "matcher" : {
14 | "type" : "stringContains",
15 | "args" : [
16 | {
17 | "value" : "home"
18 | }
19 | ]
20 | }
21 | }
22 | ]
23 | }
24 | ]
25 | },
26 | {
27 | "element" : "document",
28 | "apply" : "waitForDocumentReady"
29 | }
30 | ]
31 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/withArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad": [
3 | {
4 | "element" : "root",
5 | "apply" : "getAttribute",
6 | "args" : [
7 | {
8 | "type" : "string",
9 | "name" : "str"
10 | }
11 | ]
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/wrongElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad": [
3 | {
4 | "element" : "test",
5 | "apply" : "getAttribute"
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/beforeload/wrongPredicateElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad": [
3 | {
4 | "apply": "waitFor",
5 | "args": [
6 | {
7 | "type": "function",
8 | "predicate": [
9 | {
10 | "element": "test",
11 | "apply": "isPresent"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 | ],
18 | "elements": [
19 | {
20 | "name": "test",
21 | "selector": {
22 | "css": "css"
23 | }
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/default.expected.json:
--------------------------------------------------------------------------------
1 | {
2 | "default" : {
3 | "impl" : [
4 | {
5 | "interface" : "my.object.MyClass",
6 | "implementation" : "my.object.MyClassImpl"
7 | }
8 | ]
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/expected1.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "platform" : {
3 | "ios_tablet" : [
4 | {
5 | "interface" : "utam.profiles.pageobjects.DeviceInterface",
6 | "implementation" : "utam.profiles.pageobjects.impl.DeviceIOSandIOSTabletImpl"
7 | }
8 | ],
9 | "ios_phone" : [
10 | {
11 | "interface" : "utam.profiles.pageobjects.DeviceInterface",
12 | "implementation" : "utam.profiles.pageobjects.impl.DeviceIOSPhoneImpl"
13 | }
14 | ],
15 | "ios" : [
16 | {
17 | "interface" : "utam.profiles.pageobjects.DeviceInterface",
18 | "implementation" : "utam.profiles.pageobjects.impl.DeviceIOSandIOSTabletImpl"
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/expected2.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : {
3 | "value" : [
4 | {
5 | "interface" : "utam.my.PageObject1",
6 | "implementation" : "utam.my.PageObjectImpl1"
7 | },
8 | {
9 | "interface" : "utam.my.PageObject2",
10 | "implementation" : "utam.my.PageObjectImpl2"
11 | }
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/expected3.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : {
3 | "value2" : [
4 | {
5 | "interface" : "utam.my.PageObject2",
6 | "implementation" : "utam.my.PageObjectImpl2"
7 | }
8 | ],
9 | "value" : [
10 | {
11 | "interface" : "utam.my.PageObject1",
12 | "implementation" : "utam.my.PageObjectImpl1"
13 | }
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/expected4.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : {
3 | "value" : [
4 | {
5 | "interface" : "utam.my.PageObject1",
6 | "implementation" : "utam.my.PageObjectImpl1"
7 | }
8 | ]
9 | },
10 | "name2" : {
11 | "value2" : [
12 | {
13 | "interface" : "utam.my.PageObject2",
14 | "implementation" : "utam.my.PageObjectImpl2"
15 | }
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/spec/deviceIOSPhone.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-profiles/pageObjects/deviceInterface",
3 | "profile": [
4 | {
5 | "platform": "ios_phone"
6 | }
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/spec/deviceIOSandIOSTablet.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-profiles/pageObjects/deviceInterface",
3 | "profile": [
4 | {
5 | "platform": [
6 | "ios",
7 | "ios_tablet"
8 | ]
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/spec/deviceInterface.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compiler/test.compiler.json:
--------------------------------------------------------------------------------
1 | {
2 | "module": "myModule",
3 | "pageObjectsRootDir": "/src/test/resources/compiler",
4 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
5 | "pageObjectsOutputDir": "/src/test/java",
6 | "resourcesOutputDir": "/src/test/resources",
7 | "namespaces": [
8 | {
9 | "typeMatch": "utam-profiles",
10 | "pathMatch": ".*/spec"
11 | }
12 | ],
13 | "profiles": [
14 | {
15 | "name": "platform",
16 | "values": [
17 | "ios",
18 | "ios_phone",
19 | "ios_tablet",
20 | "android",
21 | "android_phone",
22 | "android_tablet"
23 | ]
24 | }
25 | ],
26 | "lint" : {
27 | "throwError" : false
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/argsReference.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "custom",
5 | "type": "org-lwr/pageObjects/custom",
6 | "selector": {
7 | "css": ".css"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "args": [
15 | {
16 | "name": "strArg",
17 | "type": "string"
18 | }
19 | ],
20 | "compose": [
21 | {
22 | "element" : "custom",
23 | "returnType" : "org-lwr/pageObjects/custom",
24 | "apply": "someMethod",
25 | "args": [
26 | {
27 | "name": "strArg",
28 | "type": "argumentReference"
29 | }
30 | ]
31 | }
32 | ]
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/basicElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": [
6 | "clickable"
7 | ],
8 | "selector": {
9 | "css": ".css"
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "element": "test",
19 | "apply": "click"
20 | }
21 | ]
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/basicElementReused.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "basic",
5 | "selector": {
6 | "css": ".css",
7 | "returnAll" : true
8 | },
9 | "nullable" : true
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "test",
15 | "compose": [
16 | {
17 | "element": "basic",
18 | "apply": "getText"
19 | },
20 | {
21 | "element": "basic",
22 | "apply": "size"
23 | }
24 | ]
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/basicElementWithFilter.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "public": true,
5 | "name": "test",
6 | "type": [
7 | "clickable"
8 | ],
9 | "selector": {
10 | "css": "button",
11 | "returnAll": true
12 | },
13 | "filter": {
14 | "apply": "getText",
15 | "matcher": {
16 | "type": "stringEquals",
17 | "args": [
18 | {
19 | "name": "buttonText",
20 | "type": "string"
21 | }
22 | ]
23 | },
24 | "findFirst": true
25 | }
26 | }
27 | ],
28 | "methods": [
29 | {
30 | "name": "test",
31 | "compose": [
32 | {
33 | "element": "test",
34 | "apply": "click"
35 | },
36 | {
37 | "apply": "returnSelf"
38 | }
39 | ]
40 | }
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/basicListReturns.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": ".css",
7 | "returnAll" : true
8 | },
9 | "nullable": true
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "test",
15 | "compose": [
16 | {
17 | "returnType" : "boolean",
18 | "returnAll": true,
19 | "element": "test",
20 | "apply": "isVisible"
21 | }
22 | ]
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/basicListVoid.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": ["clickable"],
6 | "selector": {
7 | "css": ".css",
8 | "returnAll" : true
9 | },
10 | "nullable": true
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "element": "test",
19 | "apply": "focus"
20 | }
21 | ]
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/clickableElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": [
6 | "clickable"
7 | ],
8 | "selector": {
9 | "css": ".css"
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "testDoubleClick",
16 | "compose": [
17 | {
18 | "element": "test",
19 | "apply": "doubleClick"
20 | }
21 | ]
22 | },
23 | {
24 | "name": "testRightClick",
25 | "compose": [
26 | {
27 | "element": "test",
28 | "apply": "rightClick"
29 | }
30 | ]
31 | },
32 | {
33 | "name": "testClickAndHold",
34 | "compose": [
35 | {
36 | "element": "test",
37 | "apply": "clickAndHold",
38 | "args": [
39 | {
40 | "name": "duration",
41 | "type": "number"
42 | }
43 | ]
44 | }
45 | ]
46 | }
47 | ]
48 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/containerChain.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "content",
5 | "type": "container",
6 | "selector": {
7 | "css": ".inject"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "apply": "getContent",
17 | "returnType": "my/pageObject/section",
18 | "args": [
19 | {
20 | "value": "my/pageObject/section",
21 | "type": "pageObject"
22 | }
23 | ]
24 | },
25 | {
26 | "chain" : true,
27 | "returnType" : "my/pageObject/row",
28 | "element" : "row",
29 | "args" : [
30 | {
31 | "type" : "number",
32 | "name" : "rowIndex"
33 | }
34 | ]
35 | },
36 | {
37 | "chain" : true,
38 | "returnType" : "my/pageObject/item",
39 | "returnAll" : true,
40 | "element" : "items"
41 | }
42 | ]
43 | }
44 | ]
45 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/customElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "custom",
5 | "type": "org-lwr/pageObjects/custom",
6 | "selector": {
7 | "css": ".css"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "custom",
17 | "apply": "someMethod",
18 | "args": [
19 | {
20 | "name": "strArg",
21 | "type": "string"
22 | },
23 | {
24 | "value": true
25 | }
26 | ],
27 | "returnType" : "string",
28 | "returnAll" : true
29 | }
30 | ]
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/customListWithChain.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "custom",
5 | "type": "org-lwr/pageObjects/custom",
6 | "selector": {
7 | "css": ".css",
8 | "returnAll" : true
9 | }
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "test",
15 | "compose": [
16 | {
17 | "element": "custom",
18 | "apply": "method1",
19 | "returnType" : "org-lwr/pageObjects/custom",
20 | "returnAll": true
21 | },
22 | {
23 | "chain" : true,
24 | "apply" : "method2",
25 | "matcher" : {
26 | "type" : "notNull"
27 | }
28 | }
29 | ]
30 | }
31 | ]
32 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/customWithFilterFindFirst.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "findFirst",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": "css",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "customMethod",
12 | "matcher": {
13 | "type": "stringEquals",
14 | "args": [
15 | {
16 | "name": "filterArg",
17 | "type": "string"
18 | }
19 | ]
20 | },
21 | "findFirst": true
22 | }
23 | }
24 | ],
25 | "methods": [
26 | {
27 | "name": "test",
28 | "compose": [
29 | {
30 | "element": "findFirst",
31 | "apply": "publicMethod",
32 | "returnType": "my/pageObject/foo",
33 | "args": [
34 | {
35 | "name": "applyArg",
36 | "type": "string"
37 | }
38 | ]
39 | }
40 | ]
41 | }
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/documentElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "document",
8 | "apply": "getUrl",
9 | "matcher" : {
10 | "type" : "stringEquals",
11 | "args" : [
12 | {
13 | "value" : "url"
14 | }
15 | ]
16 | },
17 | "returnType" : "boolean"
18 | }
19 | ]
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/dragAndDropElementLiteralWithDuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "first",
5 | "selector": {
6 | "css": ".foo[%s]",
7 | "args": [
8 | {
9 | "type" : "string",
10 | "name" : "selectorArg1"
11 | }
12 | ]
13 | },
14 | "type" : ["draggable"]
15 | },
16 | {
17 | "name": "second",
18 | "public": true,
19 | "selector": {
20 | "css": ".foo[%s]",
21 | "args": [
22 | {
23 | "type" : "string",
24 | "name" : "selectorArg2"
25 | }
26 | ]
27 | }
28 | }
29 | ],
30 | "methods": [
31 | {
32 | "name": "test",
33 | "compose": [
34 | {
35 | "element" : "first",
36 | "apply": "dragAndDrop",
37 | "args": [
38 | {
39 | "value" : "second",
40 | "type" : "elementReference"
41 | },
42 | {
43 | "value": 2
44 | }
45 | ]
46 | }
47 | ]
48 | }
49 | ]
50 | }
51 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/dragAndDropWithOffset.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name" : "simplePublic",
5 | "public": true,
6 | "type" : ["draggable"],
7 | "selector": {
8 | "css": ".foo"
9 | }
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "test",
15 | "compose": [
16 | {
17 | "element" : "simplePublic",
18 | "apply": "dragAndDropByOffset",
19 | "args": [
20 | {
21 | "type": "number",
22 | "name": "x"
23 | },
24 | {
25 | "type": "number",
26 | "name": "y"
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/dragAndDropWithOffsetDuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name" : "simplePublic",
5 | "public": true,
6 | "type" : ["draggable"],
7 | "selector": {
8 | "css": ".foo"
9 | }
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "test",
15 | "compose": [
16 | {
17 | "element" : "simplePublic",
18 | "apply": "dragAndDropByOffset",
19 | "args": [
20 | {
21 | "value": 1
22 | },
23 | {
24 | "value": 2
25 | },
26 | {
27 | "type": "number",
28 | "name": "duration"
29 | }
30 | ]
31 | }
32 | ]
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/frameAsBasic.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "myFrame",
5 | "type": "frame",
6 | "selector": {
7 | "css": "iframe"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose" : [
15 | {
16 | "element": "myFrame",
17 | "apply": "getText",
18 | "returnType": "string"
19 | }
20 | ]
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/frameLiteralArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "myFrame",
5 | "type": "frame",
6 | "selector": {
7 | "css": "iframe"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose" : [
15 | {
16 | "element": "document",
17 | "returnType": "my/lightning/button",
18 | "apply": "enterFrameAndLoad",
19 | "args" : [
20 | {
21 | "value": "myFrame",
22 | "type" : "elementReference"
23 | },
24 | {
25 | "value": "my/lightning/button",
26 | "type" : "rootPageObject"
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/frameLiteralArgsVoid.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "myFrame",
5 | "type": "frame",
6 | "selector": {
7 | "css": "iframe"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "document",
17 | "apply": "enterFrameAndLoad",
18 | "args": [
19 | {
20 | "value": "myFrame",
21 | "type": "elementReference"
22 | },
23 | {
24 | "value": "my/lightning/button",
25 | "type": "rootPageObject"
26 | }
27 | ]
28 | }
29 | ]
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/frameNonLiteralArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "myFrame",
5 | "type": "frame",
6 | "selector": {
7 | "css": "iframe"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose" : [
15 | {
16 | "returnType" : "rootPageObject",
17 | "element": "document",
18 | "apply": "enterFrameAndLoad",
19 | "args" : [
20 | {
21 | "name" : "myFrame",
22 | "type": "frame"
23 | },
24 | {
25 | "name": "pageObject",
26 | "type": "rootPageObject"
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/frameNonLiteralArgsVoid.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "myFrame",
5 | "type": "frame",
6 | "selector": {
7 | "css": "iframe"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "document",
17 | "apply": "enterFrameAndLoad",
18 | "args": [
19 | {
20 | "name": "myFrame",
21 | "type": "frame"
22 | },
23 | {
24 | "name": "pageObject",
25 | "type": "rootPageObject"
26 | }
27 | ]
28 | }
29 | ]
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/navigationElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "navigation",
8 | "apply": "back"
9 | },
10 | {
11 | "element": "navigation",
12 | "apply": "forward"
13 | }
14 | ]
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/nestedArgElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "nestedTarget",
8 | "apply": "getText"
9 | }
10 | ]
11 | }
12 | ],
13 | "elements": [
14 | {
15 | "name": "body",
16 | "selector": {
17 | "css": "tbody"
18 | },
19 | "elements": [
20 | {
21 | "name": "indexedElement",
22 | "selector": {
23 | "css": "tr:nth-of-type(%d) td:nth-of-type(%d)",
24 | "args": [
25 | {
26 | "name": "row",
27 | "type": "number"
28 | },
29 | {
30 | "name": "column",
31 | "type": "number"
32 | }
33 | ]
34 | },
35 | "elements": [
36 | {
37 | "name": "nestedTarget",
38 | "selector": {
39 | "css": "a"
40 | }
41 | }
42 | ]
43 | }
44 | ]
45 | }
46 | ]
47 | }
48 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/selfReturnBoolean.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose": [
6 | {
7 | "returnType" : "boolean",
8 | "apply": "isPresent"
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/apply/selfReturnList.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose": [
6 | {
7 | "returnType" : "boolean",
8 | "returnAll" : true,
9 | "apply": "isPresent",
10 | "element" : "self"
11 | }
12 | ]
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/args/nonLiteralPageObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "something",
8 | "args": [
9 | {
10 | "type": "pageObject",
11 | "name": "param"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/args/nonLiteralRootPageObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "something",
8 | "args": [
9 | {
10 | "type": "rootPageObject",
11 | "name": "param"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/args/nonLiteralRootPageObjectReturns.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "something",
8 | "returnType": "rootPageObject",
9 | "args": [
10 | {
11 | "type": "rootPageObject",
12 | "name": "param"
13 | }
14 | ]
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/basicFindFirst.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "filterFindFirst",
5 | "selector": {
6 | "css": "css",
7 | "returnAll": true
8 | },
9 | "filter": {
10 | "apply": "getValue",
11 | "matcher": {
12 | "type": "stringEquals",
13 | "args": [
14 | {
15 | "name": "filterArg",
16 | "type": "string"
17 | }
18 | ]
19 | },
20 | "findFirst": true
21 | }
22 | }
23 | ],
24 | "methods": [
25 | {
26 | "name": "test",
27 | "compose": [
28 | {
29 | "element": "filterFindFirst"
30 | }
31 | ]
32 | }
33 | ]
34 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/basicPrivateNoType.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "noTypePrivate",
5 | "selector": {
6 | "css": "css"
7 | }
8 | }
9 | ],
10 | "methods": [
11 | {
12 | "name": "test",
13 | "compose": [
14 | {
15 | "element": "noTypePrivate"
16 | }
17 | ]
18 | }
19 | ]
20 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/basicWithMatcher.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "noTypePrivate",
5 | "selector": {
6 | "css": "css"
7 | }
8 | }
9 | ],
10 | "methods": [
11 | {
12 | "name": "test",
13 | "compose": [
14 | {
15 | "returnType" : "boolean",
16 | "element": "noTypePrivate",
17 | "matcher": {
18 | "type": "notNull"
19 | }
20 | }
21 | ]
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/chainNestedArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "content",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": ".inject"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "content",
17 | "returnType" : "my/pageObject/foo"
18 | },
19 | {
20 | "chain" : true,
21 | "returnType" : "my/pageObject/foo",
22 | "element" : "next",
23 | "args" : [
24 | {
25 | "type" : "string",
26 | "name" : "selectorArgName"
27 | }
28 | ]
29 | },
30 | {
31 | "chain" : true,
32 | "returnType" : "my/pageObject/foo",
33 | "element" : "next",
34 | "args" : [
35 | {
36 | "value" : "selectorArgValue"
37 | }
38 | ]
39 | }
40 | ]
41 | }
42 | ]
43 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/chainReturnAll.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "list",
6 | "type": "my/pageObject/foo",
7 | "selector": {
8 | "css": "css",
9 | "returnAll" : true
10 | }
11 | }
12 | ]
13 | },
14 | "methods": [
15 | {
16 | "name": "test",
17 | "compose": [
18 | {
19 | "element": "list"
20 | },
21 | {
22 | "chain" : true,
23 | "returnType": "my/pageObject/fooChild",
24 | "element": "child",
25 | "returnAll" : true
26 | },
27 | {
28 | "chain" : true,
29 | "element": "grandChild",
30 | "returnType": "my/pageObject/fooGrandChild"
31 | }
32 | ]
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/containerCompose.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "container",
5 | "type": "container"
6 | }
7 | ],
8 | "methods": [
9 | {
10 | "name": "composeContainer",
11 | "compose": [
12 | {
13 | "element": "container"
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/containerNamesCollision.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "content",
5 | "type": "container",
6 | "selector": {
7 | "css": ".inject"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "content",
17 | "returnType": "my1/pageObject/foo",
18 | "args": [
19 | {
20 | "value": "my1/pageObject/foo",
21 | "type": "pageObject"
22 | }
23 | ]
24 | }
25 | ]
26 | },
27 | {
28 | "name": "test2",
29 | "compose": [
30 | {
31 | "element": "content",
32 | "returnType": "my2/pageObject/foo",
33 | "args": [
34 | {
35 | "value": "my2/pageObject/foo",
36 | "type": "pageObject"
37 | }
38 | ]
39 | }
40 | ]
41 | }
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/customFindAll.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "findAll",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": "css[%s]",
8 | "returnAll": true,
9 | "args" : [
10 | {
11 | "name": "selectorArg",
12 | "type": "string"
13 | }
14 | ]
15 | },
16 | "nullable" : true,
17 | "filter": {
18 | "apply": "isVisible",
19 | "matcher": {
20 | "type": "isTrue"
21 | }
22 | }
23 | }
24 | ],
25 | "methods": [
26 | {
27 | "name": "test",
28 | "compose": [
29 | {
30 | "element": "findAll",
31 | "args": [
32 | {
33 | "value" : "hardcoded"
34 | }
35 | ]
36 | }
37 | ]
38 | }
39 | ]
40 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/customFindFirst.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "findFirst",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": "css",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "customMethod",
12 | "matcher": {
13 | "type": "stringEquals",
14 | "args": [
15 | {
16 | "name": "filterArg",
17 | "type": "string"
18 | }
19 | ]
20 | },
21 | "findFirst": true
22 | }
23 | }
24 | ],
25 | "methods": [
26 | {
27 | "name": "test",
28 | "compose": [
29 | {
30 | "element": "findFirst"
31 | }
32 | ]
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/customList.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "publicList",
5 | "public": true,
6 | "type": "my/pageObject/foo",
7 | "selector": {
8 | "css": "css",
9 | "returnAll": true
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "returnType": "my/pageObject/foo",
19 | "returnAll" : true,
20 | "element": "publicList"
21 | }
22 | ]
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/customListReused.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "findAll",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": "css",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "customMethod",
12 | "matcher": {
13 | "type": "stringEquals",
14 | "args": [
15 | {
16 | "name": "filterArg",
17 | "type": "string"
18 | }
19 | ]
20 | }
21 | }
22 | }
23 | ],
24 | "methods": [
25 | {
26 | "name": "test",
27 | "compose": [
28 | {
29 | "element": "findAll"
30 | },
31 | {
32 | "element": "findAll"
33 | }
34 | ]
35 | }
36 | ]
37 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/customPrivateSingle.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": "css"
8 | },
9 | "nullable": true
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "test",
15 | "compose": [
16 | {
17 | "returnType": "my/pageObject/foo",
18 | "element": "test"
19 | }
20 | ]
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/customWithMatcher.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "findFirst",
5 | "type": "my/pageObject/foo",
6 | "selector": {
7 | "css": "css",
8 | "returnAll": true
9 | },
10 | "nullable" : true,
11 | "filter": {
12 | "apply": "customMethod",
13 | "matcher": {
14 | "type": "stringEquals",
15 | "args": [
16 | {
17 | "name": "filterArg",
18 | "type": "string"
19 | }
20 | ]
21 | },
22 | "findFirst": true
23 | }
24 | }
25 | ],
26 | "methods": [
27 | {
28 | "name": "test",
29 | "compose": [
30 | {
31 | "element": "findFirst"
32 | },
33 | {
34 | "element": "findFirst",
35 | "matcher": {
36 | "type": "notNull"
37 | }
38 | }
39 | ]
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/frameGetter.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "frame",
5 | "type" : "frame",
6 | "selector": {
7 | "css": "css[%s]",
8 | "args" : [
9 | {
10 | "type" : "string",
11 | "name": "selectorArgs"
12 | }
13 | ]
14 | }
15 | }
16 | ],
17 | "methods" : [
18 | {
19 | "name": "test",
20 | "compose": [
21 | {
22 | "element": "frame"
23 | }
24 | ]
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/getter/frameGetterWithMatcher.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "frame",
5 | "type" : "frame",
6 | "selector": {
7 | "css": "css[%s]",
8 | "args" : [
9 | {
10 | "type" : "string",
11 | "name": "selectorArgs"
12 | }
13 | ]
14 | }
15 | }
16 | ],
17 | "methods" : [
18 | {
19 | "name": "test",
20 | "compose": [
21 | {
22 | "returnType" : "boolean",
23 | "element": "frame",
24 | "args" : [
25 | {
26 | "value" : "hardcoded"
27 | }
28 | ],
29 | "matcher" : {
30 | "type" : "notNull"
31 | }
32 | }
33 | ]
34 | }
35 | ]
36 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/predicate/reuseElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "root",
8 | "apply": "isPresent"
9 | },
10 | {
11 | "apply": "waitFor",
12 | "args": [
13 | {
14 | "type": "function",
15 | "predicate": [
16 | {
17 | "element": "root"
18 | }
19 | ]
20 | }
21 | ]
22 | },
23 | {
24 | "element": "root",
25 | "apply": "isPresent"
26 | }
27 | ]
28 | }
29 | ]
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/predicate/waitForBasicList.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "list",
5 | "selector" : {
6 | "css" : "css",
7 | "returnAll" : true
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "self",
17 | "apply": "waitFor",
18 | "args": [
19 | {
20 | "type" : "function",
21 | "predicate": [
22 | {
23 | "element" : "list",
24 | "apply" : "getText",
25 | "returnType" : "string",
26 | "returnAll": true
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | ]
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/predicate/waitForRoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "root",
8 | "apply": "waitFor",
9 | "args": [
10 | {
11 | "name" : "redundant",
12 | "type" : "function",
13 | "predicate": [
14 | {
15 | "returnType" : "boolean",
16 | "element" : "root",
17 | "apply" : "getText",
18 | "matcher" : {
19 | "type" : "stringEquals",
20 | "args" : [
21 | {
22 | "name" : "matcherArg",
23 | "type" : "string"
24 | }
25 | ]
26 | }
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 | ]
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/predicate/waitForWithChain.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "custom",
5 | "type" : "utam-test/pageObjects/custom",
6 | "selector" : {
7 | "css" : ".css"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "apply": "waitFor",
17 | "args": [
18 | {
19 | "type" : "function",
20 | "predicate": [
21 | {
22 | "element" : "custom"
23 | },
24 | {
25 | "chain" : true,
26 | "apply" : "method1",
27 | "returnType" : "utam-test/pageObjects/custom"
28 | }
29 | ]
30 | }
31 | ]
32 | },
33 | {
34 | "chain" : true,
35 | "apply" : "method2",
36 | "returnType" : "utam-test/pageObjects/custom"
37 | }
38 | ]
39 | }
40 | ]
41 | }
42 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/predicate/waitReturnSelf.json:
--------------------------------------------------------------------------------
1 | {
2 | "type" : ["actionable"],
3 | "exposeRootElement" : true,
4 | "methods": [
5 | {
6 | "name": "test",
7 | "compose": [
8 | {
9 | "apply": "waitFor",
10 | "args": [
11 | {
12 | "type" : "function",
13 | "predicate": [
14 | {
15 | "element" : "root",
16 | "apply" : "focus"
17 | },
18 | {
19 | "apply": "returnSelf"
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | ]
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/predicate/waitVoidAction.json:
--------------------------------------------------------------------------------
1 | {
2 | "type" : "actionable",
3 | "methods": [
4 | {
5 | "name": "test",
6 | "compose": [
7 | {
8 | "apply": "waitFor",
9 | "args": [
10 | {
11 | "type" : "function",
12 | "predicate": [
13 | {
14 | "element" : "root",
15 | "apply" : "focus"
16 | }
17 | ]
18 | },
19 | {
20 | "value" : "custom error message"
21 | }
22 | ]
23 | }
24 | ]
25 | }
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/abstract/namesCollision.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "returnType": "my/type1/Name",
6 | "name": "test1"
7 | },
8 | {
9 | "returnType": "my/type2/Name",
10 | "name": "test2"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/abstract/returnFrame.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "returnType": "frame",
6 | "name": "test"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/abstract/returnPageObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "returnType": "pageObject",
6 | "name": "test",
7 | "args": [
8 | {
9 | "name": "nonLiteral",
10 | "type": "pageObject"
11 | }
12 | ]
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/abstract/returnPageObjectList.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "returnType": "pageObject",
6 | "returnAll": true,
7 | "name": "test"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/abstract/returnRootPageObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "returnType": "rootPageObject",
6 | "name": "test"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/containerLiteralReturn.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "container",
5 | "public": true,
6 | "type": "container"
7 | }
8 | ],
9 | "methods": [
10 | {
11 | "name": "test",
12 | "compose": [
13 | {
14 | "element": "container",
15 | "returnType": "my/pack/Foo",
16 | "args": [
17 | {
18 | "type": "pageObject",
19 | "value": "my/pack/Foo"
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/containerLiteralReturnList.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "container",
5 | "public": true,
6 | "type": "container",
7 | "selector" : {
8 | "css" : "css",
9 | "returnAll": true
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "element": "container",
19 | "returnType": "my/pack/Foo",
20 | "returnAll": true,
21 | "args": [
22 | {
23 | "type": "pageObject",
24 | "value": "my/pack/Foo"
25 | }
26 | ]
27 | }
28 | ]
29 | }
30 | ]
31 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/containerNonLiteralReturn.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "container",
5 | "public": true,
6 | "type": "container"
7 | }
8 | ],
9 | "methods": [
10 | {
11 | "name": "test",
12 | "compose": [
13 | {
14 | "element": "container",
15 | "returnType": "pageObject",
16 | "args": [
17 | {
18 | "type": "pageObject",
19 | "name": "param1"
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/containerNonLiteralReturnList.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "container",
5 | "public": true,
6 | "type": "container",
7 | "selector" : {
8 | "css" : "css",
9 | "returnAll": true
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "element": "container",
19 | "returnType": "pageObject",
20 | "returnAll": true,
21 | "args": [
22 | {
23 | "type": "pageObject",
24 | "name": "param1"
25 | }
26 | ]
27 | }
28 | ]
29 | }
30 | ]
31 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/namesCollisionReturnsList.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "myPrivateMethod",
8 | "returnType": "my1/pack/Foo",
9 | "returnAll": true
10 | },
11 | {
12 | "chain": true,
13 | "apply": "myPrivateMethod",
14 | "returnType": "my2/pack/Foo",
15 | "returnAll": true
16 | }
17 | ]
18 | }
19 | ]
20 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/returnFrame.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "frame",
5 | "type": "frame",
6 | "selector": {
7 | "css": "iframe"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "returnType": "frame",
17 | "element": "frame"
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/returnRootPageObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "returnType": "rootPageObject",
8 | "apply": "myPrivateMethod"
9 | }
10 | ]
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/return/returnRootPageObjectList.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "returnType": "rootPageObject",
8 | "returnAll": true,
9 | "apply": "myPrivateMethod"
10 | }
11 | ]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/notLastStatement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "returnSelf"
8 | },
9 | {
10 | "apply": "someMethod"
11 | }
12 | ]
13 | }
14 | ]
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/notLastStatementBeforeLoad.json:
--------------------------------------------------------------------------------
1 | {
2 | "beforeLoad": [
3 | {
4 | "apply": "returnSelf"
5 | },
6 | {
7 | "apply": "someMethod"
8 | }
9 | ]
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/notLastStatementPredicate.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply" : "waitFor",
8 | "args" : [
9 | {
10 | "type" : "function",
11 | "predicate" : [
12 | {
13 | "apply": "returnSelf"
14 | },
15 | {
16 | "apply": "someMethod"
17 | }
18 | ]
19 | }
20 | ]
21 | }
22 | ]
23 | }
24 | ]
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/predicateReturnSelf.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "waitFor",
8 | "args": [
9 | {
10 | "type" : "function",
11 | "predicate": [
12 | {
13 | "element" : "root",
14 | "apply" : "getText"
15 | },
16 | {
17 | "apply" : "returnSelf"
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | ]
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/returnSelf.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "someMethod"
8 | },
9 | {
10 | "apply": "returnSelf"
11 | }
12 | ]
13 | }
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/returnSelfError.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "returnSelf",
8 | "element": "document"
9 | }
10 | ]
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/returnSelf/returnSelfOnly.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "returnSelf"
8 | }
9 | ]
10 | }
11 | ]
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/privateRootUnknownAction.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "test",
8 | "element": "root"
9 | }
10 | ]
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/privateRootWithType.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": [
3 | "clickable"
4 | ],
5 | "methods": [
6 | {
7 | "name": "test",
8 | "compose": [
9 | {
10 | "apply": "click",
11 | "element": "root"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/privateRootWrongAction.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": [
3 | "editable"
4 | ],
5 | "methods": [
6 | {
7 | "name": "test",
8 | "compose": [
9 | {
10 | "apply": "click",
11 | "element": "root"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/publicRootNoType.json:
--------------------------------------------------------------------------------
1 | {
2 | "exposeRootElement": true,
3 | "methods": [
4 | {
5 | "name": "test",
6 | "compose": [
7 | {
8 | "apply": "getText",
9 | "element": "root"
10 | }
11 | ]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/publicRootWithType.json:
--------------------------------------------------------------------------------
1 | {
2 | "exposeRootElement": true,
3 | "type": [
4 | "clickable",
5 | "editable"
6 | ],
7 | "methods": [
8 | {
9 | "name": "test",
10 | "compose": [
11 | {
12 | "apply": "click",
13 | "element": "root"
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/publicRootWrongAction.json:
--------------------------------------------------------------------------------
1 | {
2 | "exposeRootElement": true,
3 | "methods": [
4 | {
5 | "name": "test",
6 | "compose": [
7 | {
8 | "apply": "click",
9 | "element": "root"
10 | }
11 | ]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/root/rootContains.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "root",
8 | "apply": "containsElement",
9 | "args": [
10 | {
11 | "type": "locator",
12 | "value": {
13 | "css": ".foo[title='%s']",
14 | "args": [
15 | {
16 | "name": "title",
17 | "type": "string"
18 | }
19 | ]
20 | }
21 | }
22 | ]
23 | }
24 | ]
25 | }
26 | ]
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/utility/chain.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "returnType": "utam-extension/pageObjects/customReturnType",
8 | "applyExternal": {
9 | "type": "utam-extension/utils/customExtensionUtils",
10 | "invoke": "utilityMethod1"
11 | }
12 | },
13 | {
14 | "returnType": "utam-extension/pageObjects/customReturnType",
15 | "returnAll" : true,
16 | "apply" : "method1",
17 | "chain" : true
18 | },
19 | {
20 | "returnType": "string",
21 | "returnAll" : true,
22 | "apply" : "method2",
23 | "chain" : true
24 | }
25 | ]
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/utility/customReturnType.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "returnType": "utam-extension/pageObjects/customReturnType",
8 | "applyExternal": {
9 | "type": "utam-extension/utils/customExtensionUtils",
10 | "invoke": "getFieldValue",
11 | "args": [
12 | {
13 | "name": "fieldType",
14 | "type": "string"
15 | }
16 | ]
17 | }
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/compose/utility/noReturn.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name": "test",
5 | "args": [
6 | {
7 | "name": "index",
8 | "type": "number"
9 | }
10 | ],
11 | "compose": [
12 | {
13 | "applyExternal": {
14 | "invoke": "utils",
15 | "type": "utam-extension/utils/customExtensionUtils",
16 | "args": [
17 | {
18 | "name": "index",
19 | "type": "argumentReference"
20 | }
21 | ]
22 | }
23 | },
24 | {
25 | "applyExternal": {
26 | "invoke": "utils",
27 | "type": "utam-extension/utils/customExtensionUtils",
28 | "args": [
29 | {
30 | "name": "index",
31 | "type": "argumentReference"
32 | }
33 | ]
34 | }
35 | }
36 | ]
37 | }
38 | ]
39 | }
40 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/config/nofields.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "/src/test/resources/spec",
3 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
4 | "pageObjectsOutputDir": "/src/test/java/pageObjects",
5 | "resourcesOutputDir": "/src/test/resources",
6 | "unitTestsOutputDir": "/src/test/java",
7 | "unitTestsRunner": "JUNIT",
8 | "extensionsFileMask" : "**/__utam__/**/*.utam.js",
9 | "extensionsOutputDir" : "pageObjects/utils"
10 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/config/nonamespaces.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "myModule",
3 | "pageObjectsRootDir": "/src/test/resources/spec",
4 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
5 | "pageObjectsOutputDir": "/src/test/java/pageObjects",
6 | "resourcesOutputDir": "/src/test/resources",
7 | "unitTestsOutputDir": "/src/test/java",
8 | "unitTestsRunner": "JUNIT",
9 | "profiles": [
10 | {
11 | "name": "platform",
12 | "values": [
13 | "ios",
14 | "android"
15 | ]
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/config/test_error_config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "code": 1,
4 | "category": "warning",
5 | "message": "message",
6 | "docs": "docs",
7 | "tip": "tip"
8 | }
9 | ]
10 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/config/test_wrong_error_config.json:
--------------------------------------------------------------------------------
1 | [
2 | {}
3 | ]
4 |
5 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/config/utam.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "module": "myModule",
3 | "version": "myVersion",
4 | "pageObjectsRootDir": "/src/test/resources/spec",
5 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
6 | "pageObjectsOutputDir": "/src/test/java/pageObjects",
7 | "resourcesOutputDir": "/src/test/resources",
8 | "unitTestsOutputDir": "/src/test/java",
9 | "unitTestsRunner": "JUNIT",
10 | "extensionsFileMask" : "**/__utam__/**/*.utam.js",
11 | "extensionsOutputDir" : "pageObjects/utils",
12 | "namespaces" : [
13 | {
14 | "typeMatch" : "utam-one",
15 | "pathMatch": ".*/one"
16 | },
17 | {
18 | "typeMatch" : "utam-two",
19 | "pathMatch": ".*/two"
20 | }
21 | ],
22 | "profiles": [
23 | {
24 | "name": "platform",
25 | "values": [
26 | "ios",
27 | "android"
28 | ]
29 | }
30 | ],
31 | "copyright" : [
32 | "copyright",
33 | "test"
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/config/utam.nodirectory.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "module": "myModule",
3 | "version": "myVersion",
4 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
5 | "pageObjectsOutputDir": "/src/test/java/pageObjects",
6 | "resourcesOutputDir": "/src/test/resources",
7 | "unitTestsOutputDir": "/src/test/java",
8 | "unitTestsRunner": "JUNIT",
9 | "extensionsFileMask" : "**/__utam__/**/*.utam.js",
10 | "extensionsOutputDir" : "pageObjects/utils",
11 | "namespaces" : [
12 | {
13 | "typeMatch" : "utam-one",
14 | "pathMatch": ".*/one"
15 | },
16 | {
17 | "typeMatch" : "utam-two",
18 | "pathMatch": ".*/two"
19 | }
20 | ],
21 | "profiles": [
22 | {
23 | "name": "platform",
24 | "values": [
25 | "ios",
26 | "android"
27 | ]
28 | }
29 | ],
30 | "copyright" : [
31 | "copyright",
32 | "test"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/container/containerDefaultSelector.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "scope",
6 | "selector": {
7 | "css": ".scope %s",
8 | "args": [
9 | {
10 | "name": "scopeArg",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "elements": [
16 | {
17 | "name": "test",
18 | "type": "container",
19 | "public": true
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/container/containerList.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "scope",
6 | "selector": {
7 | "css": ".scope %s",
8 | "args": [
9 | {
10 | "name": "scopeArg",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "elements": [
16 | {
17 | "name": "test",
18 | "type": "container",
19 | "public": true,
20 | "selector": {
21 | "css": ".css%s",
22 | "args": [
23 | {
24 | "name": "selectorArg",
25 | "type": "string"
26 | }
27 | ],
28 | "returnAll": true
29 | }
30 | }
31 | ]
32 | }
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/container/containerNullable.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name": "publicNullableList",
5 | "type": "container",
6 | "public": true,
7 | "nullable": true,
8 | "selector": {
9 | "css": ".container",
10 | "returnAll": true
11 | }
12 | }
13 | ],
14 | "shadow": {
15 | "elements": [
16 | {
17 | "name": "publicNullable",
18 | "type": "container",
19 | "public": true,
20 | "nullable": true
21 | }
22 | ]
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/container/containerWithParameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "scope",
6 | "selector": {
7 | "css": ".scope %s",
8 | "args": [
9 | {
10 | "name": "scopeArg",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "shadow": {
16 | "elements": [
17 | {
18 | "name": "test",
19 | "type": "container",
20 | "public": true,
21 | "selector": {
22 | "css": ".css%s",
23 | "args": [
24 | {
25 | "name": "selectorArg",
26 | "type": "string"
27 | }
28 | ]
29 | }
30 | }
31 | ]
32 | }
33 | }
34 | ]
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/container/nestedElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name": "rootContainer",
5 | "type": "container",
6 | "public": true,
7 | "selector": {
8 | "css": "slot"
9 | },
10 | "elements" : [
11 | {
12 | "name" : "nestedBasic",
13 | "public": true,
14 | "selector" : {
15 | "css" : ".nestedBasic"
16 | }
17 | },
18 | {
19 | "name": "nestedContainer",
20 | "public": true,
21 | "type": "container",
22 | "selector": {
23 | "css": ".nestedContainer"
24 | }
25 | },
26 | {
27 | "name": "nestedCustom",
28 | "public": true,
29 | "type": "my/custom/component",
30 | "selector": {
31 | "css": ".nestedCustom",
32 | "returnAll": true
33 | }
34 | }
35 | ]
36 | }
37 | ]
38 | }
39 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/custom/customListWithSelectorArg.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "test",
6 | "public": true,
7 | "nullable": true,
8 | "type": "utam-test/pageObjects/component",
9 | "selector": {
10 | "css": "css[%d]",
11 | "returnAll": true,
12 | "args": [
13 | {
14 | "type": "number",
15 | "name": "index"
16 | }
17 | ]
18 | }
19 | }
20 | ]
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/custom/customPublicNullable.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "nullable": true,
6 | "public": true,
7 | "type": "utam-test/pageObjects/component",
8 | "selector": {
9 | "css": "css"
10 | }
11 | }
12 | ]
13 | }
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/custom/nestedElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "customRoot",
6 | "type": "my/custom/component",
7 | "selector": {
8 | "css": ".custom"
9 | },
10 | "public": true,
11 | "shadow": {
12 | "elements": [
13 | {
14 | "name": "nestedBasic",
15 | "public": true,
16 | "selector": {
17 | "css": ".nestedBasic"
18 | }
19 | },
20 | {
21 | "name": "nestedContainer",
22 | "public": true,
23 | "type": "container"
24 | },
25 | {
26 | "name": "nestedCustom",
27 | "public": true,
28 | "type": "my/custom/component",
29 | "selector": {
30 | "css": ".nestedCustom",
31 | "returnAll": true
32 | }
33 | }
34 | ]
35 | }
36 | }
37 | ]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/custom/nestedElementsFromFilter.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "customRootWithFilter",
6 | "public": true,
7 | "type": "generated-basic/pageObjects/testBasicTypes",
8 | "selector": {
9 | "css": ".nestedCustom",
10 | "returnAll": true
11 | },
12 | "filter": {
13 | "apply": "getText",
14 | "findFirst": true,
15 | "matcher": {
16 | "type": "stringContains",
17 | "args": [
18 | {
19 | "name": "itemText",
20 | "type": "string"
21 | }
22 | ]
23 | }
24 | },
25 | "elements": [
26 | {
27 | "name": "nestedBasicInsideFilter",
28 | "public": true,
29 | "selector": {
30 | "css": ".nestedBasic"
31 | }
32 | }
33 | ]
34 | }
35 | ]
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": ".css"
7 | }
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicElementNullableList.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "parent",
6 | "selector": {
7 | "css": "body"
8 | },
9 | "elements": [
10 | {
11 | "name": "test",
12 | "nullable": true,
13 | "public": true,
14 | "selector": {
15 | "css": ".css",
16 | "returnAll": true
17 | }
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicElementNullableSingle.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "test",
6 | "nullable": true,
7 | "public": true,
8 | "selector": {
9 | "css": ".css"
10 | }
11 | }
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicElementTypesImplOnly.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-test/pageObjects/customInterface",
3 | "profile" : [
4 | {
5 | "profile" : "test"
6 | }
7 | ],
8 | "elements": [
9 | {
10 | "type": "actionable",
11 | "name": "test",
12 | "selector": {
13 | "css": ".css"
14 | }
15 | }
16 | ],
17 | "methods": [
18 | {
19 | "name": "usePrivateElementInCompose",
20 | "compose": [
21 | {
22 | "element": "test"
23 | }
24 | ]
25 | }
26 | ]
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicListBasicElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": ".css",
7 | "returnAll" : true
8 | }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicListPrivateUnion.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type" : "actionable",
6 | "selector": {
7 | "css": ".css",
8 | "returnAll" : true
9 | }
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicListPublicElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": ".css[%s]",
7 | "returnAll" : true,
8 | "args" : [
9 | {
10 | "type" : "string",
11 | "name" : "arg"
12 | }
13 | ]
14 | },
15 | "public" : true
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/basicListPublicUnion.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type" : [ "editable", "clickable"],
6 | "selector": {
7 | "css": ".css",
8 | "returnAll" : true
9 | },
10 | "public" : true
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/nestedElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "one",
5 | "selector" : {
6 | "css" : ".one"
7 | },
8 | "elements" : [
9 | {
10 | "name" : "nestedCustom",
11 | "selector" : {
12 | "css" : ".nestedCustom"
13 | },
14 | "type" : "utam-test/pageObjects/test/componentType",
15 | "public" : true
16 | }
17 | ],
18 | "shadow" : {
19 | "elements" : [
20 | {
21 | "name" : "nestedInsideShadow",
22 | "selector" : {
23 | "css" : ".css"
24 | }
25 | }
26 | ]
27 | }
28 | }
29 | ]
30 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/element/publicElementTypesImplOnly.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-test/pageObjects/customInterface",
3 | "profile" : [
4 | {
5 | "profile" : "test"
6 | }
7 | ],
8 | "elements": [
9 | {
10 | "type" : [ "actionable", "clickable" ],
11 | "name": "test",
12 | "selector": {
13 | "css": ".css[%s]",
14 | "args" : [
15 | {
16 | "type" : "string",
17 | "name" : "arg"
18 | }
19 | ]
20 | },
21 | "public" : true
22 | }
23 | ],
24 | "methods" : [
25 | {
26 | "name" : "usePrivateElementInCompose",
27 | "compose" : [
28 | {
29 | "element" : "test"
30 | }
31 | ]
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/errors/interrupt.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "/src/test/resources/errors",
3 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
4 | "pageObjectsOutputDir": "/src/test/java",
5 | "resourcesOutputDir": "/src/test/resources",
6 | "module": "testerrors",
7 | "namespaces": [
8 | {
9 | "typeMatch": "errors-spec",
10 | "pathMatch": ".*/spec"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/errors/report.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "/src/test/resources/errors",
3 | "pageObjectsFilesMask": "(.*)\\.utam\\.json$",
4 | "pageObjectsOutputDir": "/src/test/java",
5 | "resourcesOutputDir": "/src/test/resources",
6 | "module": "testerrors",
7 | "namespaces": [
8 | {
9 | "typeMatch": "errors-spec",
10 | "pathMatch": ".*/spec"
11 | }
12 | ],
13 | "interruptCompilerOnError" : false
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/errors/spec/error.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "error": true
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/errors/spec/root.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/basicElementFilter.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "selector": {
7 | "css": ".css",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "isVisible",
12 | "matcher": {
13 | "type": "isTrue"
14 | },
15 | "findFirst": true
16 | }
17 | }
18 | ]
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/basicFilterIsVisible.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "scope",
5 | "selector": {
6 | "css": "selector1 %s",
7 | "args": [
8 | {
9 | "name": "scopeArg",
10 | "type": "string"
11 | }
12 | ]
13 | },
14 | "shadow": {
15 | "elements": [
16 | {
17 | "name": "test",
18 | "type": [
19 | "editable"
20 | ],
21 | "public": true,
22 | "selector": {
23 | "css": "selector2 %s",
24 | "returnAll": true,
25 | "args": [
26 | {
27 | "name": "selectorArg",
28 | "type": "string"
29 | }
30 | ]
31 | },
32 | "filter": {
33 | "apply": "isVisible",
34 | "matcher": {
35 | "type": "isFalse"
36 | },
37 | "findFirst": true
38 | }
39 | }
40 | ]
41 | }
42 | }
43 | ]
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/basicFilterPublic.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": ".css",
7 | "returnAll": true
8 | },
9 | "filter": {
10 | "apply": "getText",
11 | "matcher": {
12 | "type": "stringEquals",
13 | "args": [
14 | {
15 | "name": "text",
16 | "type": "string"
17 | }
18 | ]
19 | }
20 | },
21 | "public": true
22 | }
23 | ]
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/basicFilterPublicUnion.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": [
6 | "editable",
7 | "clickable"
8 | ],
9 | "selector": {
10 | "css": ".css",
11 | "returnAll": true
12 | },
13 | "filter": {
14 | "apply": "getText",
15 | "matcher": {
16 | "type": "stringEquals",
17 | "args": [
18 | {
19 | "name": "text",
20 | "type": "string"
21 | }
22 | ]
23 | },
24 | "findFirst": true
25 | },
26 | "public": true
27 | }
28 | ]
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/basicWithFilterContainsElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "selector": {
7 | "css": "my-custom-element[with-attribute='attr-value']",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "containsElement",
12 | "args": [
13 | {
14 | "type": "locator",
15 | "value": {
16 | "css": "input[value='%s']",
17 | "args": [
18 | {
19 | "name": "value",
20 | "type": "string"
21 | }
22 | ]
23 | }
24 | }
25 | ],
26 | "findFirst": true,
27 | "matcher": {
28 | "type": "isTrue"
29 | }
30 | }
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/customFilterBoolean.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "test",
6 | "type": "utam-test/pageObjects/test/test",
7 | "public": true,
8 | "selector": {
9 | "css": "css",
10 | "returnAll": true
11 | },
12 | "nullable": true,
13 | "filter": {
14 | "apply": "isVisible",
15 | "matcher": {
16 | "type": "isTrue"
17 | }
18 | }
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/customNestedWithFilter.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "element",
5 | "selector": {
6 | "css": "selector1 %s",
7 | "args": [
8 | {
9 | "name": "arg1",
10 | "type": "string"
11 | }
12 | ]
13 | },
14 | "elements": [
15 | {
16 | "name": "test",
17 | "public": true,
18 | "type": "utam-test/pageObjects/component",
19 | "selector": {
20 | "css": "css",
21 | "returnAll": true
22 | },
23 | "filter": {
24 | "apply": "getText",
25 | "matcher": {
26 | "type": "stringContains",
27 | "args": [
28 | {
29 | "name": "arg2",
30 | "type": "string"
31 | }
32 | ]
33 | },
34 | "findFirst": true
35 | }
36 | }
37 | ]
38 | }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/customWithFilter.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "nullable": true,
7 | "type": "utam-test/pageObjects/component",
8 | "selector": {
9 | "css": ".css",
10 | "returnAll": true
11 | },
12 | "filter": {
13 | "apply": "isVisible",
14 | "matcher": {
15 | "type": "isTrue"
16 | },
17 | "findFirst": false
18 | }
19 | }
20 | ]
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/filter/customWithFilterContainsElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "type": "utam-custom/pageObjects/custom",
7 | "selector": {
8 | "css": "my-custom-element[with-attribute='attr-value']",
9 | "returnAll": true
10 | },
11 | "filter": {
12 | "apply": "containsElement",
13 | "args": [
14 | {
15 | "type": "locator",
16 | "value": {
17 | "css": "input[value='%s']",
18 | "args": [
19 | {
20 | "name": "value",
21 | "type": "string"
22 | }
23 | ]
24 | }
25 | }
26 | ],
27 | "findFirst": true,
28 | "matcher": {
29 | "type": "isTrue"
30 | }
31 | }
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/frame/framePrivate.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "test",
6 | "type": "frame",
7 | "selector": {
8 | "css": "iframe"
9 | }
10 | }
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/frame/framePublic.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name": "scope",
5 | "selector": {
6 | "css": "scope[%s]",
7 | "args": [
8 | {
9 | "type": "string",
10 | "name": "scopeStr"
11 | }
12 | ]
13 | },
14 | "elements" : [
15 | {
16 | "name": "test",
17 | "public" : true,
18 | "type": "frame",
19 | "selector": {
20 | "css": "iframe[%s]",
21 | "args": [
22 | {
23 | "type": "string",
24 | "name": "frameStr"
25 | }
26 | ]
27 | }
28 | }
29 | ]
30 | }
31 | ]
32 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/args/literalGetterArg.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "settingsPanel",
5 | "type": "clickable",
6 | "selector": {
7 | "css": "mat-expansion-panel-header",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "getText",
12 | "findFirst": true,
13 | "matcher": {
14 | "type": "stringContains",
15 | "args": [
16 | {
17 | "value": "Settings"
18 | }
19 | ]
20 | }
21 | },
22 | "public": true
23 | }
24 | ],
25 | "methods": [
26 | {
27 | "name": "testApply",
28 | "compose": [
29 | {
30 | "element": "settingsPanel",
31 | "apply": "click"
32 | }
33 | ]
34 | },
35 | {
36 | "name": "testGetter",
37 | "compose": [
38 | {
39 | "element": "settingsPanel"
40 | }
41 | ]
42 | }
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/basic/testDuplicates.utam.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/container/containerNullable.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "publicNullable",
5 | "type": "container",
6 | "public": true,
7 | "nullable": true
8 | },
9 | {
10 | "name": "publicNullableList",
11 | "type": "container",
12 | "public": true,
13 | "nullable": true,
14 | "selector": {
15 | "css": ".container",
16 | "returnAll": true
17 | }
18 | },
19 | {
20 | "name": "privateNullable",
21 | "type": "container",
22 | "nullable": true
23 | }
24 | ],
25 | "methods" : [
26 | {
27 | "name" : "getPrivateNullableContainer",
28 | "compose" : [
29 | {
30 | "element" : "privateNullable"
31 | }
32 | ]
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/duplicate/testDuplicates.utam.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadAndWaitBasicElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "basicPublicElement",
6 | "type": [
7 | "clickable",
8 | "editable"
9 | ],
10 | "selector": {
11 | "css": "basicElement[test]"
12 | },
13 | "load": true,
14 | "wait": true,
15 | "public": true
16 | }
17 | ]
18 | },
19 | "methods": [
20 | {
21 | "name": "getText",
22 | "compose": [
23 | {
24 | "element": "root",
25 | "apply": "getText"
26 | }
27 | ]
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadBasicPrivateElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "basicPrivateElement",
6 | "type": [
7 | "clickable",
8 | "editable"
9 | ],
10 | "selector": {
11 | "css": "basicElement[test]"
12 | },
13 | "load": true
14 | }
15 | ]
16 | },
17 | "methods": [
18 | {
19 | "name": "getText",
20 | "compose": [
21 | {
22 | "element": "root",
23 | "apply": "getText"
24 | }
25 | ]
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadBasicPublicElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "basicPublicElement",
6 | "type": [
7 | "clickable",
8 | "editable"
9 | ],
10 | "selector": {
11 | "css": "basicElement[test]"
12 | },
13 | "load": true,
14 | "public": true
15 | }
16 | ]
17 | },
18 | "methods": [
19 | {
20 | "name": "getText",
21 | "compose": [
22 | {
23 | "element": "root",
24 | "apply": "getText"
25 | }
26 | ]
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadCustomElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "customElement",
6 | "type": "generated-load/pageObjects/loadBasicPrivateElement",
7 | "selector": {
8 | "css": "customElement[test]"
9 | },
10 | "load": true
11 | }
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadFilterElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "basicElement",
5 | "public": true,
6 | "selector": {
7 | "css": ".css",
8 | "returnAll": true
9 | },
10 | "filter": {
11 | "apply": "isVisible",
12 | "matcher": {
13 | "type": "isTrue"
14 | },
15 | "findFirst": true
16 | },
17 | "load": true
18 | }
19 | ]
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadFrameElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "frameElement",
6 | "type": "frame",
7 | "selector": {
8 | "css": "frame"
9 | },
10 | "load": true
11 | }
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/load/loadNested.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "scope",
6 | "selector": {
7 | "css": "scope"
8 | },
9 | "elements": [
10 | {
11 | "name": "basicElement",
12 | "selector": {
13 | "css": "basicElement"
14 | },
15 | "load": true
16 | }
17 | ]
18 | }
19 | ]
20 | }
21 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/mobile/applyNavigationDocument.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element": "navigation",
8 | "apply": "back"
9 | },
10 | {
11 | "element": "navigation",
12 | "apply": "forward"
13 | },
14 | {
15 | "element": "navigation",
16 | "apply": "switchToWindow",
17 | "args": [
18 | {
19 | "name": "url1",
20 | "type": "string"
21 | }
22 | ]
23 | },
24 | {
25 | "element": "navigation",
26 | "apply": "closeWindow",
27 | "args": [
28 | {
29 | "name": "url2",
30 | "type": "string"
31 | }
32 | ]
33 | },
34 | {
35 | "element": "navigation",
36 | "apply": "closeWindow"
37 | },
38 | {
39 | "element": "document",
40 | "apply": "getUrl"
41 | }
42 | ]
43 | }
44 | ]
45 | }
46 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/mobile/nativeContext.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "platform": "native"
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/mobile/webContext.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "platform": "web"
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/profiles/defaultImpl.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "generated-profiles/pageObjects/interfaceTest"
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/profiles/interfaceTest.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/wait/waitForBasicElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "basicPrivateElement",
6 | "type": [
7 | "clickable",
8 | "editable"
9 | ],
10 | "selector": {
11 | "css": "basicElement[test]"
12 | },
13 | "wait": true
14 | },
15 | {
16 | "name": "basicPublicElement",
17 | "selector": {
18 | "css": "basicElement[%s]",
19 | "args": [
20 | {
21 | "name": "selectorArg",
22 | "type": "string"
23 | }
24 | ]
25 | },
26 | "public": true,
27 | "wait": true
28 | }
29 | ]
30 | },
31 | "methods": [
32 | {
33 | "name": "getText",
34 | "compose": [
35 | {
36 | "element": "root",
37 | "apply": "getText"
38 | }
39 | ]
40 | }
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/wait/waitForContainer.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "type": "container",
5 | "name": "container",
6 | "selector": {
7 | "css": "container"
8 | },
9 | "wait": true
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/generated/wait/waitForElement.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "customElementWithFilter",
6 | "type": "generated-wait/pageObjects/waitForBasicElement",
7 | "selector": {
8 | "css": "custom-element",
9 | "returnAll": true
10 | },
11 | "filter": {
12 | "apply": "getText",
13 | "matcher": {
14 | "type": "stringEquals",
15 | "args": [
16 | {
17 | "name": "matcherArg",
18 | "type": "string"
19 | }
20 | ]
21 | }
22 | },
23 | "wait": true
24 | },
25 | {
26 | "name": "frameElement",
27 | "type": "frame",
28 | "selector": {
29 | "css": "frame"
30 | },
31 | "wait": true
32 | }
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/exposeRoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true,
3 | "exposeRootElement": true,
4 | "type": [
5 | "editable",
6 | "clickable"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/exposeRootImpl.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-tests/pageObjects/root/exposeRoot",
3 | "exposeRootElement": true,
4 | "profile" : [
5 | {
6 | "profile" : "test"
7 | }
8 | ],
9 | "type": [
10 | "editable",
11 | "clickable"
12 | ],
13 | "elements": [
14 | {
15 | "name" : "element1",
16 | "public" : true,
17 | "selector" : {
18 | "css" : "?"
19 | },
20 | "type" : ["editable", "clickable"]
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/exposeRootNoTypes.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true,
3 | "exposeRootElement": true
4 | }
5 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/exposeRootNoTypesImpl.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-tests/pageObjects/root/exposeRootNoTypes",
3 | "profile" : [
4 | {
5 | "profile" : "test"
6 | }
7 | ],
8 | "exposeRootElement": true,
9 | "elements": [
10 | {
11 | "name" : "element1",
12 | "public" : true,
13 | "selector" : {
14 | "css" : "?"
15 | },
16 | "type" : ["editable", "clickable"]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/nonEmptyMethod.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "test",
6 | "compose": [
7 | {
8 | "element": "root",
9 | "apply": "getText"
10 | }
11 | ]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/returnBasicElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "getTest",
6 | "returnType": [
7 | "actionable"
8 | ]
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/returnListOfBasicElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "getTest",
6 | "returnType": "actionable",
7 | "returnAll": true
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/returnListOfBasicElementsImpl.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-test/pageObjects/test",
3 | "profile": [
4 | {
5 | "profile": "test"
6 | }
7 | ],
8 | "elements": [
9 | {
10 | "name": "test",
11 | "type": [
12 | "actionable"
13 | ],
14 | "public": true,
15 | "selector": {
16 | "css": "css",
17 | "returnAll": true
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/returnListOfCustomElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "getTest",
6 | "returnType": "my/pageObjects/custom",
7 | "returnAll": true
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/returnString.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "getTest",
6 | "returnType": "string"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/interface/returnVoid.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "getTest"
6 | }
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeDefaultConfig/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint": {
6 | "lintingOutputFile": "test.sarif.json",
7 | "requiredRootDescription": {
8 | "violation": "error"
9 | },
10 | "duplicateSelectors": {
11 | "violation": "disabled"
12 | },
13 | "requiredMethodDescription": {
14 | "exclude": [
15 | "utam/pageObjects/test"
16 | ]
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeDefaultConfig/test.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": ".one"
5 | },
6 | "elements": [
7 | {
8 | "name": "one",
9 | "selector": {
10 | "css": ".one"
11 | }
12 | },
13 | {
14 | "name": "two",
15 | "selector": {
16 | "css": ".one"
17 | }
18 | }
19 | ],
20 | "methods": [
21 | {
22 | "name": "nodescription",
23 | "compose": [
24 | {
25 | "element": "root",
26 | "apply": "isPresent"
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeGlobalRules/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint": {
6 | "duplicateRootSelectors": {
7 | "violation" : "warning",
8 | "exclude": [
9 | "utam/pageObjects/hasRootSelector",
10 | "utam/pageObjects/hasAnotherSameRootSelector"
11 | ]
12 | },
13 | "elementCantHaveRootSelector" : {
14 | "exclude" : [
15 | "utam/pageObjects/hasDifferentRootSelector"
16 | ]
17 | },
18 | "duplicateCustomSelectors": {
19 | "violation" : "warning",
20 | "exclude" : [
21 | "utam/pageObjects/hasRootSelector"
22 | ]
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeGlobalRules/hasAnotherSameRootSelector.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "description": {
4 | "text": [
5 | "i have description"
6 | ],
7 | "author": "test"
8 | },
9 | "selector": {
10 | "css": "root"
11 | },
12 | "shadow": {
13 | "elements": [
14 | {
15 | "name": "customDuplicate",
16 | "type": "container",
17 | "selector": {
18 | "css": "custom-duplicate"
19 | }
20 | }
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeGlobalRules/hasDifferentRootSelector.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "description": {
4 | "text": [
5 | "i have description"
6 | ],
7 | "author": "test"
8 | },
9 | "selector": {
10 | "css": "root1"
11 | },
12 | "shadow": {
13 | "elements": [
14 | {
15 | "name": "sameAsRootBasic",
16 | "selector": {
17 | "css": "root"
18 | }
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeGlobalRules/hasRootSelector.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "description": {
4 | "text": [
5 | "i have description"
6 | ],
7 | "author": "test"
8 | },
9 | "selector": {
10 | "css": "root"
11 | },
12 | "shadow": {
13 | "elements": [
14 | {
15 | "name": "custom",
16 | "type": "my/custom/type",
17 | "selector": {
18 | "css": "custom-duplicate"
19 | }
20 | }
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/changeGlobalRules/hasSameRootSelector.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "description": {
4 | "text": [
5 | "i have description"
6 | ],
7 | "author": "test"
8 | },
9 | "selector": {
10 | "css": "root"
11 | },
12 | "shadow": {
13 | "elements": [
14 | {
15 | "name": "basic",
16 | "type": "frame",
17 | "selector": {
18 | "css": "custom-duplicate"
19 | }
20 | }
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/elementTypes/anotherCustomType.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "elements": [
9 | {
10 | "name": "test",
11 | "type": "my/test/custom",
12 | "selector": {
13 | "css": "my-test-custom"
14 | }
15 | }
16 | ]
17 | }
18 |
19 |
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/elementTypes/basicType.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "elements": [
9 | {
10 | "name": "basic",
11 | "selector": {
12 | "css": "my-test-custom"
13 | }
14 | },
15 | {
16 | "name": "button",
17 | "type": "actionable",
18 | "selector": {
19 | "css": "button"
20 | }
21 | }
22 | ]
23 | }
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/elementTypes/containerType.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "elements": [
9 | {
10 | "name": "container",
11 | "type": "container",
12 | "selector": {
13 | "css": "my-test-custom"
14 | }
15 | }
16 | ]
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/elementTypes/customType.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "elements": [
9 | {
10 | "name": "test",
11 | "type": "my/test/custom",
12 | "selector": {
13 | "css": "my-test-custom"
14 | }
15 | }
16 | ]
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/ignore/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint": {
6 | "disable": true
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/ignore/test.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": "css"
5 | },
6 | "description": "text",
7 | "elements": [
8 | {
9 | "name": "one",
10 | "selector": {
11 | "css": ".one"
12 | }
13 | },
14 | {
15 | "name": "two",
16 | "selector": {
17 | "css": ".one"
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/metadata/presence.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint": {
6 | "lintingOutputFile": "test.sarif.json",
7 | "duplicateSelectors": {
8 | "violation": "disabled"
9 | },
10 | "requiredRootDescription": {
11 | "violation": "disabled"
12 | },
13 | "requiredAuthor": {
14 | "violation": "disabled"
15 | },
16 | "requiredMethodDescription": {
17 | "violation": "disabled"
18 | },
19 | "duplicateRootSelectors": {
20 | "violation" : "disabled"
21 | },
22 | "elementCantHaveRootSelector" : {
23 | "violation" : "disabled"
24 | },
25 | "duplicateCustomSelectors": {
26 | "violation" : "disabled"
27 | },
28 | "requiredMetadata": {
29 | "violation": "warning"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rootSelectors/one.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "root": true,
9 | "selector": {
10 | "css": "root-selector"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rootSelectors/three.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "root": true,
9 | "selector": {
10 | "css": "root-selector"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rootSelectors/two.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "root": true,
9 | "selector": {
10 | "css": "root-selector"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rootType/elements.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "elements": [
9 | {
10 | "name": "customSameType",
11 | "type": "test/lint/roottype/root",
12 | "selector": {
13 | "css": "root-selector"
14 | }
15 | }
16 | ],
17 | "shadow": {
18 | "elements": [
19 | {
20 | "name": "customDifferentType",
21 | "type": "my/test/different",
22 | "selector": {
23 | "css": "root-selector"
24 | }
25 | }
26 | ]
27 | }
28 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rootType/root.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "root": true,
9 | "selector": {
10 | "css": "root-selector"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rules/defaultConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": ".one"
5 | },
6 | "elements": [
7 | {
8 | "name": "one",
9 | "selector": {
10 | "css": ".one"
11 | }
12 | },
13 | {
14 | "name": "two",
15 | "type" : "container",
16 | "selector": {
17 | "css": ".two"
18 | }
19 | },
20 | {
21 | "name": "three",
22 | "selector": {
23 | "css": ".two"
24 | },
25 | "shadow" : {
26 | "elements" : [
27 | {
28 | "name": "inshadow",
29 | "selector": {
30 | "css": ".two"
31 | }
32 | }
33 | ]
34 | }
35 | },
36 | {
37 | "name": "container1",
38 | "type" : "container"
39 | },
40 | {
41 | "name": "container2",
42 | "type" : "container"
43 | }
44 | ],
45 | "methods" : [
46 | {
47 | "name" : "nodescription",
48 | "compose" : [
49 | {
50 | "element" : "root",
51 | "apply" : "isPresent"
52 | }
53 | ]
54 | }
55 | ]
56 | }
57 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rules/elementDescription.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "text": [
4 | "i have description"
5 | ],
6 | "author": "test"
7 | },
8 | "shadow": {
9 | "elements": [
10 | {
11 | "name": "nodescription",
12 | "selector": {
13 | "css": "css"
14 | }
15 | }
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rules/interface.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "root": true,
4 | "methods" : [
5 | {
6 | "name" : "test"
7 | }
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rules/listSelector.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "elements": [
9 | {
10 | "name": "single",
11 | "selector": {
12 | "css": "css"
13 | }
14 | },
15 | {
16 | "name": "list1",
17 | "type": "my/custom/type",
18 | "selector": {
19 | "css": "css",
20 | "returnAll" : true
21 | }
22 | },
23 | {
24 | "name": "list2",
25 | "type": "my/custom/type",
26 | "selector": {
27 | "css": "css",
28 | "returnAll" : true
29 | }
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rules/rootNoAuthor.json:
--------------------------------------------------------------------------------
1 | {
2 | "description" : "string"
3 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/rules/twoContainers.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "author": "author",
4 | "text": [
5 | "text"
6 | ]
7 | },
8 | "shadow": {
9 | "elements": [
10 | {
11 | "name": "containerInShadow",
12 | "type": "container"
13 | }
14 | ]
15 | },
16 | "elements": [
17 | {
18 | "name": "container1",
19 | "type": "container"
20 | },
21 | {
22 | "name": "container2",
23 | "type": "container"
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/sarif/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint" : {
6 | "lintingOutputFile": "../sarif.json"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/sarif/test.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": "css"
5 | },
6 | "description": "text",
7 | "elements": [
8 | {
9 | "name": "one",
10 | "selector": {
11 | "css": ".one"
12 | }
13 | },
14 | {
15 | "name": "two",
16 | "selector": {
17 | "css": ".one"
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/throwConfig/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint": {
6 | "throwError": true,
7 | "duplicateSelectors": {
8 | "violation" : "error"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/throwConfig/test.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": ".one"
5 | },
6 | "elements": [
7 | {
8 | "name": "one",
9 | "selector": {
10 | "css": ".one"
11 | }
12 | },
13 | {
14 | "name": "two",
15 | "selector": {
16 | "css": ".one"
17 | }
18 | }
19 | ],
20 | "methods": [
21 | {
22 | "name": "nodescription",
23 | "compose": [
24 | {
25 | "element": "root",
26 | "apply": "isPresent"
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/throwConfigPass/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "pageObjectsRootDir": "",
3 | "pageObjectsOutputDir": "",
4 | "resourcesOutputDir": "",
5 | "lint": {
6 | "throwError": true
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/lint/throwConfigPass/test.utam.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": "css"
5 | },
6 | "description": "text",
7 | "elements": [
8 | {
9 | "name": "one",
10 | "selector": {
11 | "css": ".one"
12 | }
13 | },
14 | {
15 | "name": "two",
16 | "selector": {
17 | "css": ".one"
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/matcher/incorrectMatcherForVoid.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": [
3 | "clickable"
4 | ],
5 | "methods": [
6 | {
7 | "name": "test",
8 | "compose": [
9 | {
10 | "element": "root",
11 | "apply": "click",
12 | "matcher": {
13 | "type": "isTrue"
14 | }
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/matcher/incorrectMatcherInCompose.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "matcherThrows",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "apply" : "getText",
9 | "matcher" : {
10 | "type" : "isTrue"
11 | }
12 | }
13 | ]
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/matcher/incorrectMatcherInFilter.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "css",
7 | "returnAll": true
8 | },
9 | "filter": {
10 | "apply": "isPresent",
11 | "matcher": {
12 | "type": "stringContains",
13 | "args": [
14 | {
15 | "value": "string"
16 | }
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/matcher/wrongArgsNumber.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "matcherThrows",
5 | "compose": [
6 | {
7 | "element": "root",
8 | "apply": "getText",
9 | "matcher": {
10 | "type": "stringEquals",
11 | "args": [
12 | {
13 | "value": true
14 | },
15 | {
16 | "value": true
17 | }
18 | ]
19 | }
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/matcher/wrongArgsType.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "matcherThrows",
5 | "compose": [
6 | {
7 | "element": "root",
8 | "apply": "getText",
9 | "matcher": {
10 | "type": "stringEquals",
11 | "args": [
12 | {
13 | "value": true
14 | }
15 | ]
16 | }
17 | }
18 | ]
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/nestedlist/nestedContainerList.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "containerList",
6 | "type": "container",
7 | "public": true,
8 | "selector": {
9 | "css": ".containerList",
10 | "returnAll": true
11 | },
12 | "elements": [
13 | {
14 | "name": "nestedBasic",
15 | "selector": {
16 | "css": ".nestedBasic"
17 | },
18 | "public": true
19 | }
20 | ]
21 | }
22 | ]
23 | },
24 | "methods": [
25 | {
26 | "name": "testNestedBasic",
27 | "compose": [
28 | {
29 | "element": "nestedBasic",
30 | "apply": "getText"
31 | }
32 | ]
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/nestedlist/nestedCustomList.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "custom",
6 | "type": "utam-test/pageObjects/component",
7 | "selector": {
8 | "css": ".custom",
9 | "returnAll": true
10 | },
11 | "public": true,
12 | "shadow": {
13 | "elements": [
14 | {
15 | "name": "nestedBasic",
16 | "public": true,
17 | "selector": {
18 | "css": ".nestedBasic"
19 | }
20 | },
21 | {
22 | "name": "nestedContainer",
23 | "public": true,
24 | "type": "container"
25 | },
26 | {
27 | "name": "nestedCustom",
28 | "public": true,
29 | "type": "utam-test/pageObjects/component",
30 | "selector": {
31 | "css": ".nestedCustom"
32 | }
33 | }
34 | ]
35 | }
36 | }
37 | ]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/pageobjects/implements.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-test/pageObjects/customInterface"
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/pageobjects/non_root.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "clickable"
3 | }
4 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/pageobjects/profiles.json:
--------------------------------------------------------------------------------
1 | {
2 | "implements": "utam-test/pageObjects/customInterface",
3 | "profile": [
4 | {
5 | "platform": "android"
6 | },
7 | {
8 | "device": [
9 | "phone",
10 | "tablet"
11 | ]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/pageobjects/root.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "selector": {
4 | "css": ".css"
5 | },
6 | "type": [
7 | "clickable",
8 | "actionable"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/pageobjects/testContext.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "public": true,
5 | "type": "container",
6 | "name": "test"
7 | }
8 | ]
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/selector/selectorArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "selector": {
7 | "css": "str[%s] num[%d]",
8 | "args": [
9 | {
10 | "name": "str",
11 | "type": "string"
12 | },
13 | {
14 | "name": "num",
15 | "type": "number"
16 | }
17 | ]
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/spec/one/first.utam.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/spec/two/second.utam.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/apply/redundantElementForChain.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "element",
5 | "type" : "my/custom/type",
6 | "selector" : {
7 | "css" : "css"
8 | }
9 | }
10 | ],
11 | "methods" : [
12 | {
13 | "name" : "test",
14 | "compose" : [
15 | {
16 | "element" : "element"
17 | },
18 | {
19 | "chain" : true,
20 | "element" : "element",
21 | "apply" : "method"
22 | }
23 | ]
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/apply/wrongArgType.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": "draggable",
6 | "selector": {
7 | "css": "css"
8 | }
9 | }
10 | ],
11 | "methods": [
12 | {
13 | "name": "test",
14 | "compose": [
15 | {
16 | "element": "test",
17 | "apply": "dragAndDrop",
18 | "args": [
19 | {
20 | "name": "str",
21 | "type": "string"
22 | }
23 | ]
24 | }
25 | ]
26 | }
27 | ]
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/abstractLiteralArg.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "test",
6 | "args": [
7 | {
8 | "value": "my/type/Name",
9 | "type": "pageObject"
10 | }
11 | ]
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/descriptionInFunctionArg.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "waitFor",
8 | "args": [
9 | {
10 | "type": "function",
11 | "description": "redundant",
12 | "predicate": [
13 | {
14 | "element": "root"
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 | ]
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/duplicateElementsArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "args": [
6 | {
7 | "name": "argName",
8 | "type": "number"
9 | }
10 | ],
11 | "compose": [
12 | {
13 | "element": "one"
14 | },
15 | {
16 | "element": "two",
17 | "args": [
18 | {
19 | "name": "argName",
20 | "type": "number"
21 | }
22 | ]
23 | }
24 | ]
25 | }
26 | ],
27 | "elements" : [
28 | {
29 | "name": "one",
30 | "selector": {
31 | "css": "[index='%d']",
32 | "args": [
33 | {
34 | "name": "argName",
35 | "type": "number"
36 | }
37 | ]
38 | }
39 | },
40 | {
41 | "name": "two",
42 | "selector": {
43 | "css": "[index='%d'] lightning-input",
44 | "args": [
45 | {
46 | "name": "argName",
47 | "type": "number"
48 | }
49 | ]
50 | }
51 | }
52 | ]
53 | }
54 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/methodLiteralArg.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "args": [
6 | {
7 | "value": "string literal"
8 | }
9 | ],
10 | "compose": [
11 | {
12 | "element" : "root"
13 | }
14 | ]
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/missingNameValue.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element" : "root",
8 | "apply" : "getAttribute",
9 | "args": [
10 | {
11 | }
12 | ]
13 | }
14 | ]
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/missingType.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element" : "root",
8 | "apply" : "getAttribute",
9 | "args": [
10 | {
11 | "name" : "name"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/args/redundantNameValue.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "element" : "root",
8 | "apply" : "getAttribute",
9 | "args": [
10 | {
11 | "value": "string literal",
12 | "name" : "name"
13 | }
14 | ]
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/duplicateBasicType.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": ["clickable", "clickable"],
6 | "selector": {
7 | "css": "css"
8 | }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/emptyNestedElementsArray.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "css",
7 | "returnAll" : true
8 | },
9 | "elements" : []
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/filterForNonList.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "css"
7 | },
8 | "filter": {
9 | "apply": "isVisible",
10 | "matcher": {
11 | "type": "isTrue"
12 | }
13 | }
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/loadElementWithArguments.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "basicElement",
6 | "selector": {
7 | "css": "basicElement[%s]",
8 | "args": [
9 | {
10 | "name": "selectorArg",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "load": true
16 | }
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/loadFilterElementWithArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": ".css",
7 | "returnAll": true
8 | },
9 | "filter": {
10 | "apply": "getText",
11 | "matcher": {
12 | "type": "stringEquals",
13 | "args": [
14 | {
15 | "name": "text",
16 | "type": "string"
17 | }
18 | ]
19 | }
20 | },
21 | "load": true,
22 | "public": true
23 | }
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/loadNestedElementWithArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "scope",
6 | "selector": {
7 | "css": "scope[%s]",
8 | "args": [
9 | {
10 | "name": "selectorArg",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "elements": [
16 | {
17 | "name": "basicElement",
18 | "selector": {
19 | "css": "basicElement"
20 | },
21 | "load": true
22 | }
23 | ]
24 | }
25 | ]
26 | }
27 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/loadNestedFilterWithArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "scope",
6 | "selector": {
7 | "css": "scope[%s]",
8 | "args": [
9 | {
10 | "name": "selectorArg",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "elements": [
16 | {
17 | "name": "test",
18 | "selector": {
19 | "css": ".css",
20 | "returnAll": true
21 | },
22 | "filter": {
23 | "apply": "isVisible",
24 | "matcher": {
25 | "type": "isTrue"
26 | },
27 | "findFirst": true
28 | },
29 | "load": true,
30 | "public": true
31 | }
32 | ]
33 | }
34 | ]
35 | }
36 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/navigationName.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "navigation",
5 | "selector": {
6 | "css": "css"
7 | }
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/waitWrongType.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name": "basicPublicElement",
5 | "selector": {
6 | "css": "basicElement"
7 | },
8 | "wait": "string"
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/wrongBasicType.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": "wrong",
6 | "selector": {
7 | "css": "css"
8 | }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/wrongBasicTypeArray.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": [
6 | true
7 | ],
8 | "selector": {
9 | "css": "css"
10 | }
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/basic_element/wrongBasicTypeArrayElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": [
6 | "wrong"
7 | ],
8 | "selector": {
9 | "css": "css"
10 | }
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/comments/blockComment.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "text": [
4 | "test basic element getter compiles"
5 | ]
6 | },
7 | "elements": [
8 | {
9 | /*
10 | This is a not allowed comment
11 | */
12 | "description": {
13 | "text": [
14 | "test simple getter for basic element"
15 | ]
16 | },
17 | "public": true,
18 | "name": "test",
19 | "selector": {
20 | "css": ".css"
21 | }
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/comments/singleLineComment.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": {
3 | "text": [
4 | "test basic element getter compiles"
5 | ]
6 | },
7 | "elements": [
8 | {
9 | // This is a not allowed comment
10 | "description": {
11 | "text": [
12 | "test simple getter for basic element"
13 | ]
14 | },
15 | "public": true,
16 | "name": "test",
17 | "selector": {
18 | "css": ".css"
19 | }
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/argReferenceParam.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "args": [
5 | {
6 | "name": "arg1",
7 | "type": "argumentReference"
8 | }
9 | ],
10 | "name": "test",
11 | "compose": [
12 | {
13 | "apply": "something"
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/emptyCompose.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : []
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/emptyComposeStatement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | }
8 | ]
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/incorrectPredicate.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "apply" : "waitFor",
8 | "args" : [
9 | {
10 | "type" : "function",
11 | "predicate" : [
12 | {
13 | "error" : true
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 | ]
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/nestedWait.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "waitFor",
8 | "args": [
9 | {
10 | "type": "function",
11 | "predicate": [
12 | {
13 | "apply": "waitFor",
14 | "args": [
15 | {
16 | "type": "function",
17 | "predicate": [
18 | {
19 | "apply": "invoke"
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | ]
26 | }
27 | ]
28 | }
29 | ]
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/nullCompose.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test"
5 | }
6 | ]
7 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/redundantApply.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "apply" : "getText",
9 | "applyExternal" : {}
10 | }
11 | ]
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/redundantElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "applyExternal" : {}
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/redundantParameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "args" : [
5 | {
6 | "type" : "string",
7 | "name" : "arg"
8 | }
9 | ],
10 | "name" : "test",
11 | "compose" : [
12 | {
13 | "apply" : "someMethod"
14 | }
15 | ]
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/referencedArgNotFound.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "something",
8 | "args": [
9 | {
10 | "name": "arg1",
11 | "type": "argumentReference"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/sameArgsNames.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "apply" : "something",
8 | "args" : [
9 | {
10 | "name" : "arg1",
11 | "type" : "string"
12 | }
13 | ]
14 | },
15 | {
16 | "apply" : "somethingElse",
17 | "args" : [
18 | {
19 | "name" : "arg1",
20 | "type" : "string"
21 | }
22 | ]
23 | }
24 | ]
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/compose/waitForIncorrectMessageArg.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "compose": [
6 | {
7 | "apply": "waitFor",
8 | "args": [
9 | {
10 | "type" : "function",
11 | "predicate": [
12 | {
13 | "element" : "root",
14 | "apply" : "isPresent"
15 | }
16 | ]
17 | },
18 | {
19 | "value" : true
20 | }
21 | ]
22 | }
23 | ]
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/container_element/loadContainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "type": "container",
5 | "name": "container",
6 | "selector": {
7 | "css": "container"
8 | },
9 | "load": true
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/container_element/methodNameCollisionForScope.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": "container",
6 | "public": true,
7 | "selector": {
8 | "css": "slot"
9 | },
10 | "shadow" : {
11 | "elements": [
12 | {
13 | "name" : "nested",
14 | "public": true,
15 | "selector" : {
16 | "css" : "nested"
17 | }
18 | }
19 | ]
20 | }
21 | }
22 | ],
23 | "methods" : [
24 | {
25 | "name" : "getTestScopeElement",
26 | "compose" : [
27 | {
28 | "apply" : "load"
29 | }
30 | ]
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/container_element/testDuplicateArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "scope",
5 | "selector": {
6 | "css": "%s",
7 | "args": [
8 | {
9 | "name": "arg",
10 | "type": "string"
11 | }
12 | ]
13 | },
14 | "elements": [
15 | {
16 | "name": "test",
17 | "type": "container",
18 | "selector": {
19 | "css": "%s",
20 | "args": [
21 | {
22 | "name": "arg",
23 | "type": "string"
24 | }
25 | ]
26 | }
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/custom_element/customDuplicateArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "scope",
5 | "selector": {
6 | "css": "%s",
7 | "args": [
8 | {
9 | "name": "arg",
10 | "type": "string"
11 | }
12 | ]
13 | },
14 | "elements": [
15 | {
16 | "name": "test",
17 | "type": "my/pageobject/type",
18 | "selector": {
19 | "css": "%s",
20 | "args": [
21 | {
22 | "name": "arg",
23 | "type": "string"
24 | }
25 | ]
26 | }
27 | }
28 | ]
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/custom_element/filterForNonList.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": "my/page/type",
6 | "selector": {
7 | "css": "css"
8 | },
9 | "filter": {
10 | "apply": "isVisible",
11 | "matcher": {
12 | "type": "isTrue"
13 | }
14 | }
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/custom_element/nestedElementNameCollision.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {
5 | "name": "customRoot",
6 | "public": true,
7 | "type": "generated-basic/pageObjects/testBasicTypes",
8 | "selector": {
9 | "css": ".customRoot"
10 | },
11 | "elements": [
12 | {
13 | "name": "customRootScopeElement",
14 | "public": true,
15 | "selector": {
16 | "css": ".duplicateGetterName"
17 | }
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/filter/basicFilterDuplicateArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "element",
5 | "selector": {
6 | "css": "selector %s",
7 | "returnAll": true,
8 | "args": [
9 | {
10 | "name": "arg1",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "filter": {
16 | "apply": "getAttribute",
17 | "args": [
18 | {
19 | "name": "arg1",
20 | "type": "string"
21 | }
22 | ],
23 | "matcher": {
24 | "type": "stringContains",
25 | "args": [
26 | {
27 | "name": "arg1",
28 | "type": "string"
29 | }
30 | ]
31 | }
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/filter/basicFilterNoMatcher.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "selector %s",
7 | "returnAll": true,
8 | "args": [
9 | {
10 | "name": "arg1",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "filter": {
16 | "apply": "wrong",
17 | "args": [
18 | {
19 | "name": "arg1",
20 | "type": "string"
21 | }
22 | ]
23 | }
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/filter/basicFilterUnsupportedMethod.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "type": "touchable",
6 | "selector": {
7 | "css": "selector %s",
8 | "returnAll": true,
9 | "args": [
10 | {
11 | "name": "arg1",
12 | "type": "string"
13 | }
14 | ]
15 | },
16 | "filter": {
17 | "apply": "click",
18 | "matcher": {
19 | "type": "isTrue"
20 | }
21 | }
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/filter/basicFilterWrongMethod.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "selector %s",
7 | "returnAll": true,
8 | "args": [
9 | {
10 | "name": "arg1",
11 | "type": "string"
12 | }
13 | ]
14 | },
15 | "filter": {
16 | "apply": "wrong",
17 | "args": [
18 | {
19 | "name": "arg1",
20 | "type": "string"
21 | }
22 | ],
23 | "matcher": {
24 | "type": "isTrue"
25 | }
26 | }
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/filter/customWrongMatcherArg.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "selector",
7 | "returnAll": true
8 | },
9 | "type": "my/page/object",
10 | "filter": {
11 | "apply": "getText",
12 | "matcher": {
13 | "type": "isTrue",
14 | "args": [
15 | {
16 | "name": "arg",
17 | "type": "string"
18 | }
19 | ]
20 | }
21 | }
22 | }
23 | ]
24 | }
25 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/frame/missingSelector.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "test",
5 | "type" : "frame"
6 | }
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/frame/nestedElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "test",
5 | "type" : "frame",
6 | "selector" : {
7 | "css" : "iframe"
8 | },
9 | "elements" : [
10 | {
11 | "name" : "nested",
12 | "selector" : {
13 | "css" : "css"
14 | }
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/frame/nestedShadowElements.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "test",
5 | "type" : "frame",
6 | "selector" : {
7 | "css" : "iframe"
8 | },
9 | "shadow" : {
10 | "elements" : [
11 | {
12 | "name" : "nested",
13 | "selector" : {
14 | "css" : "css"
15 | }
16 | }
17 | ]
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/frame/nullable.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "test",
5 | "type" : "frame",
6 | "selector" : {
7 | "css" : "iframe"
8 | },
9 | "nullable" : true
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/frame/returnAll.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "test",
5 | "type" : "frame",
6 | "selector" : {
7 | "css" : "iframe",
8 | "returnAll" : true
9 | }
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/chainNeedsReturn.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "element",
5 | "type" : "my/pageobject/foo",
6 | "selector" : {
7 | "css" : "css"
8 | }
9 | }
10 | ],
11 | "methods" : [
12 | {
13 | "name" : "test",
14 | "compose" : [
15 | {
16 | "element" : "element"
17 | },
18 | {
19 | "chain" : true,
20 | "element" : "element"
21 | }
22 | ]
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/chainNotAllowed.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "element",
5 | "selector" : {
6 | "css" : "css"
7 | }
8 | }
9 | ],
10 | "methods" : [
11 | {
12 | "name" : "test",
13 | "compose" : [
14 | {
15 | "element" : "element"
16 | },
17 | {
18 | "chain" : true,
19 | "element" : "element"
20 | }
21 | ]
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/firstChain.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "chain" : true
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/incorrectMatcherType.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "css"
7 | }
8 | }
9 | ],
10 | "methods" : [
11 | {
12 | "name" : "test",
13 | "compose" : [
14 | {
15 | "element" : "test",
16 | "matcher": {
17 | "type": "isTrue"
18 | }
19 | }
20 | ]
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/incorrectStatementReturn.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "element",
5 | "selector" : {
6 | "css" : "css"
7 | },
8 | "type" : [ "actionable" ]
9 | }
10 | ],
11 | "methods" : [
12 | {
13 | "name" : "test",
14 | "compose" : [
15 | {
16 | "returnType" : "string",
17 | "element" : "element"
18 | }
19 | ]
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/redundantArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements" : [
3 | {
4 | "name" : "test",
5 | "selector" : {
6 | "css" : "css"
7 | }
8 | }
9 | ],
10 | "methods" : [
11 | {
12 | "name" : "test",
13 | "compose" : [
14 | {
15 | "element" : "test",
16 | "args" : [
17 | {
18 | "value" : "str"
19 | }
20 | ]
21 | }
22 | ]
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/getter/unknownElementName.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "test"
8 | }
9 | ]
10 | }
11 | ]
12 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/method_comments/empty_return.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "description": {
6 | "text": [
7 | "not empty"
8 | ],
9 | "return": ""
10 | },
11 | "compose": [
12 | {
13 | "element": "root",
14 | "apply": "isPresent"
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/method_comments/empty_string.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "description": "",
6 | "selector" : {
7 | "css" : "css"
8 | }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/method_comments/empty_text.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "description": {
6 | "text": [
7 | "",
8 | "not empty"
9 | ]
10 | },
11 | "compose": [
12 | {
13 | "element": "root",
14 | "apply": "isPresent"
15 | }
16 | ]
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/method_comments/empty_text_array.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods": [
3 | {
4 | "name": "test",
5 | "description": {
6 | "text": []
7 | },
8 | "compose": [
9 | {
10 | "element": "root",
11 | "apply": "isPresent"
12 | }
13 | ]
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/method_comments/empty_throws.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "description": {
6 | "text" : [ "text"],
7 | "throws" : 75
8 | },
9 | "selector" : {
10 | "css" : "css"
11 | }
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/abstractReturnArrayEmpty.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true,
3 | "methods" : [
4 | {
5 | "name" : "test",
6 | "returnType": []
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/abstractReturnArrayNonBasic.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true,
3 | "methods" : [
4 | {
5 | "name" : "test",
6 | "returnType": [ "one", "two" ]
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/abstractReturnArrayNonTextual.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface": true,
3 | "methods": [
4 | {
5 | "name": "test",
6 | "returnType": [
7 | 1,
8 | 2,
9 | 3
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/containerListThrows.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "containerList",
5 | "public": true,
6 | "type": "container",
7 | "selector": {
8 | "css": "css",
9 | "returnAll": true
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "element": "containerList",
19 | "returnType": "my/pack/Foo",
20 | "args": [
21 | {
22 | "type": "pageObject",
23 | "value": "my/pack/Foo"
24 | }
25 | ]
26 | }
27 | ]
28 | }
29 | ]
30 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/containerWrongBoundTypeThrows.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "containerList",
5 | "public": true,
6 | "type": "container",
7 | "selector": {
8 | "css": "css",
9 | "returnAll": true
10 | }
11 | }
12 | ],
13 | "methods": [
14 | {
15 | "name": "test",
16 | "compose": [
17 | {
18 | "element": "containerList",
19 | "returnType": "string",
20 | "returnAll": true,
21 | "args": [
22 | {
23 | "type": "pageObject",
24 | "value": "my/pack/Foo"
25 | }
26 | ]
27 | }
28 | ]
29 | }
30 | ]
31 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/returnAllRedundant.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "returnAll" : true
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/returnIncorrectString.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "returnType" : "container"
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/returnMethodAllRedundant.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true,
3 | "methods" : [
4 | {
5 | "name" : "test",
6 | "returnAll" : true
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/returnMethodIncorrectString.json:
--------------------------------------------------------------------------------
1 | {
2 | "interface" : true,
3 | "methods" : [
4 | {
5 | "name" : "test",
6 | "returnType" : "container"
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/returnObject.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "compose" : [
6 | {
7 | "element" : "root",
8 | "returnType" : {}
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/return/returnTypeMethodNotAllowed.json:
--------------------------------------------------------------------------------
1 | {
2 | "methods" : [
3 | {
4 | "name" : "test",
5 | "returnType" : "container",
6 | "compose" : [
7 | {
8 | "element" : "root"
9 | }
10 | ]
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorChainOperator.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "classchain": "**/XCUIElementTypeStaticText[`label=='something'`]"
7 | }
8 | }
9 | ]
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorChainQuotesRoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "selector": {
3 | "classchain": "**/XCUIElementTypeStaticText[\"label == 'something'\"]"
4 | },
5 | "root": true
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorReturnAllRoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "selector": {
3 | "css": "css",
4 | "returnAll": true
5 | },
6 | "root": true
7 | }
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorSameArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "selector": {
7 | "css": "str[%s] num[%s]",
8 | "args": [
9 | {
10 | "name": "str",
11 | "type": "string"
12 | },
13 | {
14 | "name": "str",
15 | "type": "string"
16 | }
17 | ]
18 | }
19 | }
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorUIAutomator.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "uiautomator": "new UiScrollable(new UiSelector().scrollable(true)).scrollIntoView(new UiSelector().unsupported())"
7 | }
8 | }
9 | ]
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorUIAutomatorRoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "selector": {
3 | "uiautomator": "new UiSelector().unsupported()"
4 | },
5 | "root": true
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorUIAutomatorScrollable.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "uiautomator": "new UiScrollable(new UiSelector().clickable(true)).scrollIntoView(resourceId(\"com.salesforce.chatter:id/app_launcher_menu_item\"))"
7 | }
8 | }
9 | ]
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorUIAutomatorScrollableRoot.json:
--------------------------------------------------------------------------------
1 | {
2 | "selector": {
3 | "uiautomator": "new UiScrollable(new UiSelector().unsupported(\"com.salesforce.chatter:id/app_launcher_menu_item\")).scrollIntoView(resourceId(\"com.salesforce.chatter:id/app_launcher_menu_item\"))"
4 | },
5 | "root": true
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/selectorWrongArgs.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "public": true,
6 | "selector": {
7 | "css": "str[%s]",
8 | "args": [
9 | {
10 | "name": "num",
11 | "type": "number"
12 | }
13 | ]
14 | }
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/selector/wrongFormat.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": "selector"
6 | }
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/shadow/incorrectElement.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": {
3 | "elements": [
4 | {}
5 | ]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/shadow/nestedElementsEmpty.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "parent",
5 | "selector": {
6 | "css": ".css"
7 | },
8 | "shadow": {
9 | "elements": []
10 | }
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/shadow/nestedElementsMissing.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "parent",
5 | "selector": {
6 | "css": ".css"
7 | },
8 | "shadow": {
9 | }
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/shadow/nestedElementsNotArray.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadow" : {
3 | "elements": [
4 | {
5 | "name": "parent",
6 | "selector": {
7 | "css": ".css"
8 | },
9 | "shadow": {
10 | "elements": "string"
11 | }
12 | }
13 | ]
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/translator/elementName.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test-error",
5 | "selector": {
6 | "css": "css"
7 | }
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/wait/waitForNameCollisionPrivate.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "test"
7 | },
8 | "wait": true,
9 | "public": false
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "waitForTest",
15 | "compose": [
16 | {
17 | "element": "test"
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/utam-compiler/src/test/resources/validate/wait/waitForNameCollisionPublic.json:
--------------------------------------------------------------------------------
1 | {
2 | "elements": [
3 | {
4 | "name": "test",
5 | "selector": {
6 | "css": "test"
7 | },
8 | "wait": true,
9 | "public": true
10 | }
11 | ],
12 | "methods": [
13 | {
14 | "name": "waitForTest",
15 | "compose": [
16 | {
17 | "element": "test"
18 | }
19 | ]
20 | }
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/declarative/lint/LintingContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.declarative.lint;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * Configuration for linting
14 | *
15 | * @author elizaveta.ivanova
16 | * @since 242
17 | */
18 | public interface LintingContext {
19 |
20 | /**
21 | * Get all compiled page objects from the run
22 | *
23 | * @return list of string
24 | */
25 | List getAllPageObjects();
26 |
27 | /**
28 | * Add a page object information to the linting context
29 | *
30 | * @param pageObject result of the page object linting
31 | */
32 | void addPageObject(PageObjectLinting pageObject);
33 |
34 | /**
35 | * Get linting errors after linting process is complete
36 | *
37 | * @return lit of errors
38 | */
39 | List getErrors();
40 | }
41 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/declarative/representation/AnnotationProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.declarative.representation;
9 |
10 | import java.util.Collections;
11 | import java.util.List;
12 |
13 | /**
14 | * representation of the annotation
15 | *
16 | * @author elizaveta.ivanova
17 | * @since 224
18 | */
19 | public interface AnnotationProvider {
20 |
21 | /**
22 | * text of the annotation, can be empty
23 | *
24 | * @return annotation code
25 | */
26 | String getAnnotationText();
27 |
28 | /**
29 | * annotation classes to import, can be empty
30 | *
31 | * @return by default empty list
32 | */
33 | default List getImportTypes() {
34 | return Collections.emptyList();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/declarative/representation/PageClassField.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.declarative.representation;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * class field
14 | * cab be elements and inner components
15 | *
16 | * @author elizaveta.ivanova
17 | * @since 224
18 | */
19 | public interface PageClassField {
20 |
21 | /**
22 | * name of the field
23 | *
24 | * @return name of element
25 | */
26 | String getName();
27 |
28 | /**
29 | * list of field annotations
30 | *
31 | * @return field annotations
32 | */
33 | List getAnnotations();
34 |
35 | /**
36 | * type provider of field
37 | *
38 | * @return field type provider
39 | */
40 | TypeProvider getType();
41 |
42 | /**
43 | * declaration of the field
44 | *
45 | * @return declaration of the field
46 | */
47 | String getDeclaration();
48 | }
49 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/declarative/representation/UnionType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.declarative.representation;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * Declared custom union interface type
14 | *
15 | * @author elizaveta.ivanova
16 | * @since 236
17 | */
18 | public interface UnionType extends TypeProvider {
19 |
20 | /**
21 | * union type extends one or many other types
22 | *
23 | * @return list of extended types
24 | */
25 | List getExtendedTypes();
26 |
27 | /**
28 | * get text of union type declaration
29 | *
30 | * @return lines with declaration code
31 | */
32 | List getDeclarationCode();
33 | }
34 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/driver/DriverType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.driver;
9 |
10 | /**
11 | * Supported driver types used in Driver factory utilities to create instance of the driver
12 | *
13 | * @author elizaveta.ivanova
14 | * @since 228
15 | */
16 | public enum DriverType {
17 | /** driver is a web browser */
18 | web,
19 |
20 | /** driver is for iOS applications */
21 | ios,
22 |
23 | /** driver is for Android applications */
24 | android,
25 |
26 | /** driver is for the Chrome browser */
27 | chrome,
28 |
29 | /** driver is for the Firefox browser */
30 | firefox
31 | }
32 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/element/FrameElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.element;
9 |
10 | /**
11 | * page object element that represents a frame or iframe
12 | *
13 | * @author james.evans
14 | * @since 236
15 | */
16 | public interface FrameElement extends BasicElement {}
17 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/element/Touchable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.element;
9 |
10 | /**
11 | * interaction methods for touchable element
12 | *
13 | * @author r.rajasekaran
14 | * @since 232
15 | */
16 | public interface Touchable extends BasicElement {
17 |
18 | /**
19 | * Flick on the touch screen using finger motion events. Start point is middle of the element. End
20 | * point is determined by x and y offset coordinates. For vertical flick, use xOffset as 0 and
21 | * yOffset as pixels to flick by. For horizontal flick, use yOffset as 0 and xOffset as pixels to
22 | * flick by.
23 | *
24 | * @param xOffset Offset for x
25 | * @param yOffset Offset for y
26 | */
27 | void flick(int xOffset, int yOffset);
28 | }
29 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/framework/base/FrameElementImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.base;
9 |
10 | import utam.core.element.FrameElement;
11 | import utam.core.framework.element.BasePageElement;
12 |
13 | /**
14 | * element representing a frame or an iframe
15 | *
16 | * @author james.evans
17 | * @since 236
18 | */
19 | public class FrameElementImpl extends BasePageElement implements FrameElement {
20 |
21 | /**
22 | * Do not delete! Class needs constructor without parameters because we use Java Reflection to
23 | * create an instance
24 | */
25 | public FrameElementImpl() {}
26 | }
27 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/framework/base/ImperativeExtension.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.base;
9 |
10 | /**
11 | * represents imperative extensions
12 | *
13 | * @author elizaveta.ivanova
14 | * @since 228
15 | */
16 | interface ImperativeExtension {
17 |
18 | T getInstance();
19 | }
20 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/framework/base/PageObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.base;
9 |
10 | /**
11 | * base interface for all utam page objects
12 | * methods have default implementations to mock external POs
13 | *
14 | * @author elizaveta.ivanova
15 | * @since 218
16 | */
17 | public interface PageObject extends UtamBase {
18 |
19 | /**
20 | * actions in this method will be performed when page object is loaded from loader
21 | * by default it's checking for visibility of its root element
22 | *
23 | * @return An Object that can be cast to the appropriate PageObject type
24 | */
25 | Object load();
26 | }
27 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/framework/base/RootPageObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.base;
9 |
10 | /**
11 | * Page Object that can be loaded directly inside Driver root
12 | *
13 | * @author elizaveta.ivanova
14 | * @since 226
15 | */
16 | public interface RootPageObject extends PageObject {}
17 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/framework/consumer/PageObjectContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.consumer;
9 |
10 | import utam.core.framework.base.PageObject;
11 |
12 | /**
13 | * context to build page object from interface class
14 | *
15 | * @author elizaveta.ivanova
16 | * @since 226
17 | */
18 | public interface PageObjectContext {
19 |
20 | /**
21 | * create instance of the given type based on config
22 | *
23 | * @param type PO type
24 | * @param type bound
25 | * @return instance of the given type depending on profiles config
26 | */
27 | T getBean(Class type);
28 | }
29 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/framework/context/Profile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.context;
9 |
10 | /**
11 | * Profile for a Page Objects dependency injection configuration
12 | * Any profile can have name and possible values, ex. profile "platform" can have values "web",
13 | * "ios", "android"
14 | *
15 | * @author elizaveta.ivanova
16 | * @since 228
17 | */
18 | public interface Profile {
19 |
20 | /**
21 | * Profile name, ex. "platform"
22 | *
23 | * @return name of the profile
24 | */
25 | String getName();
26 |
27 | /**
28 | * Profile value, ex. "web" or "ios"
29 | *
30 | * @return value of the profile
31 | */
32 | String getValue();
33 |
34 | /**
35 | * profiles are used as a map key, this method should provide unique value
36 | *
37 | * @return string with key
38 | */
39 | default String getKey() {
40 | return getName() + getValue();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/selenium/appium/LocatorAccessibilityId.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.selenium.appium;
9 |
10 | import io.appium.java_client.AppiumBy;
11 | import org.openqa.selenium.By;
12 | import utam.core.selenium.element.LocatorBy;
13 |
14 | /**
15 | * owned by mobile team
16 | *
17 | * @since 230
18 | */
19 | public class LocatorAccessibilityId extends LocatorBy {
20 |
21 | /**
22 | * Initializes a new instance of the LocatorAccessibilityId class
23 | *
24 | * @param selectorString selector string to use
25 | */
26 | public LocatorAccessibilityId(String selectorString) {
27 | super(selectorString);
28 | }
29 |
30 | @Override
31 | public By getValue() {
32 | return AppiumBy.accessibilityId(stringValue);
33 | }
34 |
35 | @Override
36 | public LocatorBy getCopy(String valueWithParameters) {
37 | return new LocatorAccessibilityId(valueWithParameters);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/utam-core/src/main/java/utam/core/selenium/element/LocatorByCss.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.selenium.element;
9 |
10 | import org.openqa.selenium.By;
11 |
12 | /**
13 | * CSS locator
14 | *
15 | * @author elizaveta.ivanova
16 | * @since 230
17 | */
18 | class LocatorByCss extends LocatorBy {
19 |
20 | /**
21 | * Initializes a new instance of the LocatorByCss class
22 | *
23 | * @param stringValue selector string to use
24 | */
25 | LocatorByCss(String stringValue) {
26 | super(stringValue);
27 | }
28 |
29 | @Override
30 | public By getValue() {
31 | return By.cssSelector(stringValue);
32 | }
33 |
34 | @Override
35 | public LocatorBy getCopy(String valueWithParameters) {
36 | return new LocatorByCss(valueWithParameters);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/utam-core/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2021, salesforce.com, inc.
2 | # All rights reserved.
3 | # SPDX-License-Identifier: MIT
4 | # For full license text, see the LICENSE file in the repo root
5 | # or https://opensource.org/licenses/MIT
6 |
7 | log4j.logger.utam=DEBUG,console
8 | # Define Console Appender
9 | log4j.appender.console=org.apache.log4j.ConsoleAppender
10 | # Define the layout for console appender
11 | log4j.appender.console.layout=org.apache.log4j.PatternLayout
12 | log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss} %c{1} %-5p: %m%n
13 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/framework/consumer/TestLoaderConfigDefault.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.consumer;
9 |
10 | import utam.core.element.Locator;
11 | import utam.core.framework.base.RootPageObject;
12 |
13 | /**
14 | * used in tests
15 | *
16 | * @author elizaveta.ivanova
17 | * @since 230
18 | */
19 | public interface TestLoaderConfigDefault extends RootPageObject {
20 |
21 | Locator getRoot();
22 | }
23 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/framework/consumer/TestLoaderConfigPageObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.consumer;
9 |
10 | import utam.core.element.Locator;
11 | import utam.core.framework.base.RootPageObject;
12 |
13 | /**
14 | * used in tests
15 | *
16 | * @author elizaveta.ivanova
17 | * @since 230
18 | */
19 | public interface TestLoaderConfigPageObject extends RootPageObject {
20 |
21 | Locator getRoot();
22 | }
23 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/framework/consumer/TestLoaderConfigPageObjectOverride.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.consumer;
9 |
10 | import utam.core.element.Locator;
11 | import utam.core.framework.base.BasePageObject;
12 | import utam.core.framework.base.PageMarker;
13 |
14 | /** used to test loader config */
15 | @PageMarker.Find(css = "root")
16 | public class TestLoaderConfigPageObjectOverride extends BasePageObject
17 | implements TestLoaderConfigPageObject {
18 |
19 | @Override
20 | public Locator getRoot() {
21 | return getRootLocator();
22 | }
23 |
24 | @Override
25 | public Object load() {
26 | // nothing
27 | return this;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/framework/consumer/TestLoaderConfigPageObjectProfile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.consumer;
9 |
10 | import utam.core.element.Locator;
11 | import utam.core.framework.base.BasePageObject;
12 | import utam.core.framework.base.PageMarker;
13 |
14 | /** used to test loader config */
15 | @PageMarker.Find(css = "root")
16 | public class TestLoaderConfigPageObjectProfile extends BasePageObject
17 | implements TestLoaderConfigPageObject, TestLoaderConfigDefault {
18 |
19 | @Override
20 | public Locator getRoot() {
21 | return super.getRootLocator();
22 | }
23 |
24 | @Override
25 | public Object load() {
26 | // nothing
27 | return this;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/framework/consumer/impl/TestLoaderConfigPageObjectImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.framework.consumer.impl;
9 |
10 | import utam.core.element.Locator;
11 | import utam.core.framework.base.BasePageObject;
12 | import utam.core.framework.base.PageMarker;
13 | import utam.core.framework.consumer.TestLoaderConfigPageObject;
14 |
15 | @PageMarker.Find(css = "root")
16 | public class TestLoaderConfigPageObjectImpl extends BasePageObject
17 | implements TestLoaderConfigPageObject {
18 |
19 | @Override
20 | public Locator getRoot() {
21 | return getRootLocator();
22 | }
23 |
24 | @Override
25 | public Object load() {
26 | // nothing
27 | return this;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/selenium/utilities/PrivateConstructorFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.selenium.utilities;
9 |
10 | class PrivateConstructorFactory extends TestObjectFactory {
11 | private PrivateConstructorFactory() {}
12 |
13 | static TestObjectFactory getFactory() {
14 | return new PrivateConstructorFactory();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/utam-core/src/test/java/utam/core/selenium/utilities/ThrowingConstructorFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021, salesforce.com, inc.
3 | * All rights reserved.
4 | * SPDX-License-Identifier: MIT
5 | * For full license text, see the LICENSE file in the repo root
6 | * or https://opensource.org/licenses/MIT
7 | */
8 | package utam.core.selenium.utilities;
9 |
10 | public class ThrowingConstructorFactory extends TestObjectFactory {
11 | public ThrowingConstructorFactory() {
12 | throw new RuntimeException("constructor exception");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/config/emptyFile.config.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/salesforce/utam-java/38fd54d7d8f77aeddba0db4f035fdf970c62ee62/utam-core/src/test/resources/config/emptyFile.config.json
--------------------------------------------------------------------------------
/utam-core/src/test/resources/config/emptyProfiles.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "emptyName": {},
3 | "emptyValue": {
4 | "empty" : []
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/config/module1.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": {
3 | "value1": [
4 | {
5 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
6 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectProfile"
7 | }
8 | ]
9 | },
10 | "name2": {
11 | "value2": [
12 | {
13 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
14 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectOverride"
15 | }
16 | ]
17 | },
18 | "test": {
19 | "one": [
20 | {
21 | "interface": "utam.core.framework.consumer.TestLoaderConfigDefault",
22 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectProfile"
23 | }
24 | ],
25 | "two": [
26 | {
27 | "interface": "utam.core.framework.consumer.TestLoaderConfigDefault",
28 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectOverride"
29 | }
30 | ]
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/config/module2.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": {
3 | "value2": [
4 | {
5 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
6 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectOverride"
7 | }
8 | ]
9 | },
10 | "name2": {
11 | "value2": [
12 | {
13 | "interface": "utam.core.framework.consumer.TestLoaderConfigDefault",
14 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectOverride"
15 | }
16 | ]
17 | },
18 | "test": {
19 | "one": [
20 | {
21 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
22 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectProfile"
23 | }
24 | ]
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/config/wrongFormat.config.json:
--------------------------------------------------------------------------------
1 | {
2 | []
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/loaderconfig/test_duplicate_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "injectionConfigs": [
3 | "module1.config.json",
4 | "module2.config.json",
5 | "module2.config.json"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/loaderconfig/test_empty_config.json:
--------------------------------------------------------------------------------
1 | {
2 | }
3 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/loaderconfig/test_incorrect_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "modules": []
3 | }
4 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/loaderconfig/test_loader_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "injectionConfigs": [
3 | "module1.config.json",
4 | "module2.config.json"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/loaderconfig/test_one_module_loader_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "injectionConfigs": [
3 | "config/module1.config.json"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/module1.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "custom": {
3 | "one": [
4 | {
5 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
6 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectOverride"
7 | }
8 | ]
9 | },
10 | "default": {
11 | "impl": [
12 | {
13 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
14 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectProfile"
15 | }
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/utam-core/src/test/resources/module2.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "custom": {
3 | "two": [
4 | {
5 | "interface": "utam.core.framework.consumer.TestLoaderConfigPageObject",
6 | "implementation": "utam.core.framework.consumer.impl.TestLoaderConfigPageObjectImpl"
7 | }
8 | ]
9 | },
10 | "default": {
11 | "impl": [
12 | {
13 | "interface": "utam.core.framework.consumer.TestLoaderConfigDefault",
14 | "implementation": "utam.core.framework.consumer.TestLoaderConfigPageObjectProfile"
15 | }
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------