From 2563432fc735d6a6ba4251b49dce93c788dd584a Mon Sep 17 00:00:00 2001 From: johncross Date: Tue, 8 May 2018 16:24:30 +0100 Subject: [PATCH] See: #1254 --- ...ckDataModelPolicyEnumeratedTypeSpec.groovy | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/datamodel/CheckDataModelPolicyEnumeratedTypeSpec.groovy diff --git a/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/datamodel/CheckDataModelPolicyEnumeratedTypeSpec.groovy b/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/datamodel/CheckDataModelPolicyEnumeratedTypeSpec.groovy new file mode 100644 index 0000000000..a2a4ddd863 --- /dev/null +++ b/ModelCatalogueCorePluginTestApp/test/functional/org/modelcatalogue/core/datamodel/CheckDataModelPolicyEnumeratedTypeSpec.groovy @@ -0,0 +1,22 @@ +package org.modelcatalogue.core.datamodel + +import geb.spock.GebSpec +import spock.lang.Issue +import spock.lang.Narrative +import spock.lang.Specification +import spock.lang.Title + +@Issue('https://metadata.atlassian.net/browse/MET-1766') +@Title('Check Model Policy - enumeratedType property') +@Narrative($/ + - Login to Metadata Exchange as supervisor or curator | Login successful + - Navigate to the top right menu and click on the Settings menu button | Settings menu drop-down appears + - Select Data Model Policies from Settings menu drop-down | Redirected to Data Model Policies page is displayed. 'Data Model Policies' is the title + - From list of Data Model Policies, select 'Enumeration Checks' | Redirected to 'Enumeration Checks' policy main page. 'Enumeration Checks' is the title. + - Check that the Enumeration Policy Text is correct . | Enumeration Checks Policy Text is the same as shown below: +//key-value should be lowercase and underscore separated and no special characters +check enumeratedType property 'enumAsString' apply negativeRegex: /.*"key"\s*:\s*(?!"[a-z0-9]+").*/ +/$) + +class CheckDataModelPolicyEnumeratedTypeSpec extends GebSpec { +}