Skip to content

Commit

Permalink
fix testsAT
Browse files Browse the repository at this point in the history
  • Loading branch information
aalfonso-stratio committed Feb 18, 2016
1 parent 05326ff commit 127970a
Show file tree
Hide file tree
Showing 7 changed files with 337 additions and 355 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,38 @@ Feature: Test adding a new policy in Sparta GUI
# Add empty output field
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '0' elements exist with 'css:span[data-qa="policy-model-output-list-0"]'
Then '0' elements exist with 'css:label[data-qa="policy-model-output-list-0"]'
# Add output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Then I type 'myOutput2' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:span[data-qa="policy-model-output-list-0"]'
Then '1' element exists with 'css:label[data-qa="policy-model-output-list-0"]'
And '1' element exists with 'css:select[data-qa="policy-model-output-list-0-type"]'

# Add same output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Then I type 'myOutput2' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:div[data-qa="policy-modal-error-msg-outputs"]'
And '1' element exists with 'css:span[data-qa^="policy-model-output-list-"]'
And '1' element exists with 'css:label[data-qa^="policy-model-output-list-"]'

# Add second output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:label[data-qa="policy-model-output-list-1"]'
And '1' element exists with 'css:select[data-qa="policy-model-output-list-1-type"]'
And '2' element exists with 'css:label[data-qa^="policy-model-output-list-"]'

# Delete first output field
Given '1' element exists with 'css:i[data-qa="policy-model-output-list-0-remove"]'
When I click on the element on index '0'
Then '1' element exists with 'css:label[data-qa="policy-model-output-list-0"]'
And '1' element exists with 'css:select[data-qa="policy-model-output-list-0-type"]'
And '1' element exists with 'css:label[data-qa^="policy-model-output-list-"]'

# Add model (Morphline)
Given '1' element exists with 'css:button[data-qa="policy-model-add-button"]'
Expand Down Expand Up @@ -184,29 +201,31 @@ Feature: Test adding a new policy in Sparta GUI
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'

Then '0' elements exist with 'css:span[data-qa="policy-model-output-list-0"]'
Then '0' elements exist with 'css:label[data-qa="policy-model-output-list-0"]'
# Add output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:span[data-qa="policy-model-output-list-0"]'
Then '1' element exists with 'css:label[data-qa="policy-model-output-list-0"]'

# Add same output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:div[data-qa="policy-modal-error-msg-outputs"]'
And '1' element exists with 'css:span[data-qa^="policy-model-output-list-"]'
And '1' element exists with 'css:label[data-qa^="policy-model-output-list-"]'

# Add model
Given '1' element exists with 'css:button[data-qa="policy-model-add-button"]'
Then I click on the element on index '0'

# Delete model
Given '1' element exists with 'css:i[data-qa="policy-model-arrow-2"]'
Then I click on the element on index '0'
Then I send 'PAGE_UP'
And I wait '5' seconds
And I click on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-arrow-1"]'
Then I click on the element on index '0'
Given '1' element exists with 'css:button[data-qa="policy-model-delete-button"]'
Expand Down Expand Up @@ -238,21 +257,21 @@ Feature: Test adding a new policy in Sparta GUI
Then I send 'HOME, SHIFT + END, DELETE' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '0' elements exists with 'css:span[data-qa="policy-model-output-list-0"]'
Then '0' elements exists with 'css:label[data-qa="policy-model-output-list-0"]'
# Add output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:span[data-qa="policy-model-output-list-0"]'
Then '1' element exists with 'css:label[data-qa="policy-model-output-list-0"]'

# Add same output field
Given '1' element exists with 'css:input[data-qa="policy-model-outputs"]'
Then I type 'myOutput' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:div[data-qa="policy-modal-error-msg-outputs"]'
And '1' element exists with 'css:span[data-qa^="policy-model-output-list-"]'
And '1' element exists with 'css:label[data-qa^="policy-model-output-list-"]'

# Add model
Given '1' element exists with 'css:button[data-qa="policy-model-add-button"]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ Feature: Test editting a policy in Sparta GUI
Then I type 'myOutput2' on the element on index '0'
Given '1' element exists with 'css:i[data-qa="policy-model-outputs-add-button"]'
When I click on the element on index '0'
Then '1' element exists with 'css:span[data-qa="policy-model-output-list-0"]'
Then '1' element exists with 'css:label[data-qa="policy-model-output-list-0"]'
And '1' element exists with 'css:select[data-qa="policy-model-output-list-0-type"]'
Given '1' element exists with 'css:button[data-qa="policy-model-add-button"]'
Then I click on the element on index '0'
# Continue
Expand Down
21 changes: 15 additions & 6 deletions testsAT/src/test/resources/schemas/policies/iSocketoCSV.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@
"hostname": "localhost",
"port": "10666"
}
}
,
},
"transformations": [
{
"name": "morphline-parser",
"order": 0,
"type": "Morphlines",
"outputFields": [
"product",
"timestamp",
"price",
"text"
{"name":"product"},
{"name":"price"},
{"name":"text"}
],
"configuration": {
"morphline": {
Expand All @@ -53,6 +51,17 @@
]
}
}
},
{
"name": "timestamp",
"order": 1,
"type": "DateTime",
"outputFields": [
{"name":"timestamp", "type": "long"}
],
"configuration": {
"inputFormat": "autoGenerated"
}
}
],
"cubes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
"hostname": "localhost",
"port": "10666"
}
}
,
},
"transformations": [
{
"name": "morphline-parser",
"order": 0,
"type": "Morphlines",
"outputFields": [
"product",
"price",
"text"
{"name":"product"},
{"name":"price"},
{"name":"text"}
],
"configuration": {
"morphline": {
Expand Down Expand Up @@ -58,7 +57,7 @@
"order": 1,
"type": "DateTime",
"outputFields": [
"timestamp"
{"name":"timestamp", "type": "long"}
],
"configuration": {
"inputFormat": "autoGenerated"
Expand All @@ -69,7 +68,7 @@
{
"name": "testCubeWithTime",
"checkpointConfig": {
"timeDimension": "minute",
"timeDimension": "timestamp",
"granularity": "minute",
"interval": 100000,
"timeAvailability": 90000
Expand Down Expand Up @@ -315,4 +314,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
"hostname": "localhost",
"port": "10666"
}
}
,
},
"transformations": [
{
"name": "morphline-parser",
"order": 0,
"type": "Morphlines",
"outputFields": [
"product",
"price",
"text"
{"name":"product"},
{"name":"price"},
{"name":"text"}
],
"configuration": {
"morphline": {
Expand Down Expand Up @@ -58,7 +57,7 @@
"order": 1,
"type": "DateTime",
"outputFields": [
"timestamp"
{"name":"timestamp", "type": "long"}
],
"configuration": {
"inputFormat": "autoGenerated"
Expand All @@ -69,7 +68,7 @@
{
"name": "testCubeWithTime",
"checkpointConfig": {
"timeDimension": "minute",
"timeDimension": "timestamp",
"granularity": "minute",
"interval": 100000,
"timeAvailability": 90000
Expand Down
Loading

0 comments on commit 127970a

Please sign in to comment.