@flaky
@scope_formulas
@bug_reported
Feature: 0132 - Use advanced features of Salt formulas
Description: * Related GitHub Card: https://github.com/SUSE/spacewalk/issues/30648
In order to use forms to apply changes to minions
As an authorized user
I want to be able to install and use Salt formulas
File name: min_salt_formulas_advanced.feature
Relative path: secondary/min_salt_formulas_advanced.feature
@flaky
@scope_formulas
@bug_reported
@bug_reported
Scenario: Install a test formula package on the server
When
I install "form.yml" to custom formula metadata directory "testform"
00:00:06.907
And
I install "metadata.yml" to custom formula metadata directory "testform"
00:00:08.158
When
I follow the left menu "Salt > Formula Catalog"
00:00:00.136
And
I enter "testform" as the filtered formula name
00:00:00.085
Text 'testform' not found (ScriptError) ./features/step_definitions/navigation_steps.rb:691:in `/^I should see a "([^"]*)" text$/' features/secondary/min_salt_formulas_advanced.feature:22:in `I should see a "testform" text'
@flaky
@scope_formulas
@bug_reported
Scenario: Assign test formula to minion via group formula
When
I follow the left menu "Systems > System Groups"
00:00:00.140
When
I follow "Create Group"
00:00:00.230
And
I enter "test-formula-group" as "name"
00:00:00.065
And
I enter "Test group with testform formula added" as "description"
00:00:00.077
And
I click on "Create Group"
00:00:00.418
Then
I should see a "System group test-formula-group created." text
00:00:00.163
When
I follow "Formulas" in the content area
00:00:00.073
Then
I should see a "Choose formulas:" text
00:00:00.144
And
I should see a "General System Configuration" text
00:00:00.212
And
I should see a "Testform" text
00:00:00.201
When
I check the "testform" formula
00:00:00.077
And
I click on "Save"
00:00:00.068
And
I wait until I see "Formula saved." text
00:00:00.460
And
I follow "Target Systems"
00:00:00.549
And
I check the "sle_minion" client
00:00:00.063
And
I click on "Add Systems"
00:00:01.171
Then
I should see a "1 systems were added to test-formula-group server group." text
00:00:00.216
When
I refresh the pillar data
00:00:03.986
Then
the pillar data for "testing:str" should be "" on "sle_minion"
00:00:04.529
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.630
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:03.391
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.515
And
the pillar data for "testing:num" should be "" on "sle_minion"
00:00:04.965
And
the pillar data for "testing:num_def" should be "0" on "sle_minion"
00:00:03.481
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:03.390
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:03.322
And
the pillar data for "testing:pw" should be "" on "sle_minion"
00:00:05.293
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.469
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:03.431
And
the pillar data for "testing:list_of_strings" should contain "def_item1" on "sle_minion"
00:00:03.493
And
the pillar data for "testing:list_of_strings" should contain "def_item2" on "sle_minion"
00:00:04.571
And
the pillar data for "testing:dict_of_strings:name1" should be "def_value1" on "sle_minion"
00:00:03.505
And
the pillar data for "testing:dict_of_strings:name2" should be "def_value2" on "sle_minion"
00:00:03.442
And
the pillar data for "testing:list_of_dicts:0:name" should be "def_user" on "sle_minion"
00:00:03.438
And
the pillar data for "testing:list_of_dicts:0:password" should be "secret1" on "sle_minion"
00:00:04.599
And
the pillar data for "testing:list_of_dicts:0" should not contain "full_name" on "sle_minion"
00:00:03.451
And
the pillar data for "testing:dict_of_dicts:def_user:name" should be "root" on "sle_minion"
00:00:03.499
And
the pillar data for "testing:dict_of_dicts:def_user:password" should be "secret2" on "sle_minion"
00:00:03.402
And
the pillar data for "testing:dict_of_dicts:def_user:full_name" should be "None" on "sle_minion"
00:00:04.606
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:group_name" should be "default group 1" on "sle_minion"
00:00:03.829
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:entries:def_entry1:entry_name" should be "default entry 1" on "sle_minion"
00:00:03.378
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:entries:def_entry1:entry_desc" should be "some text" on "sle_minion"
00:00:03.397
@flaky
@scope_formulas
@bug_reported
Scenario: Fill in and verify non-default values in group formula
When
I follow the left menu "Systems > System Groups"
00:00:00.064
When
I follow "test-formula-group" in the content area
00:00:00.074
And
I follow "Formulas" in the content area
00:00:00.060
And
I follow first "Testform" in the content area
00:00:00.239
And
I click on "Expand All Sections"
00:00:00.222
And
I enter "text1" as "testing#str"
00:00:00.102
And
I enter "text2" as "testing#str_def"
00:00:00.139
And
I enter "text3" as "testing#str_or_null"
00:00:00.083
And
I enter "text4" as "testing#str_opt"
00:00:00.090
And
I enter "1" as "testing#num"
00:00:00.061
And
I enter "2" as "testing#num_def"
00:00:00.081
And
I enter "3" as "testing#num_or_null"
00:00:00.065
And
I enter "4" as "testing#num_opt"
00:00:00.063
And
I enter "pw1" as "testing#pw"
00:00:00.097
And
I enter "pw2" as "testing#pw_or_null"
00:00:00.094
And
I enter "pw3" as "testing#pw_opt"
00:00:00.075
And
I click on "Save Formula"
00:00:00.099
Then
I should see a "Formula saved" text
00:00:00.894
When
I wait for "1" seconds
00:00:01.000
Then
the pillar data for "testing:str" should be "text1" on "sle_minion"
00:00:03.643
And
the pillar data for "testing:str_def" should be "text2" on "sle_minion"
00:00:03.395
And
the pillar data for "testing:str_or_null" should be "text3" on "sle_minion"
00:00:03.587
And
the pillar data for "testing:str_opt" should be "text4" on "sle_minion"
00:00:04.853
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.429
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.415
And
the pillar data for "testing:num_or_null" should be "3" on "sle_minion"
00:00:03.458
And
the pillar data for "testing:num_opt" should be "4" on "sle_minion"
00:00:04.732
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.456
And
the pillar data for "testing:pw_or_null" should be "pw2" on "sle_minion"
00:00:03.474
And
the pillar data for "testing:pw_opt" should be "pw3" on "sle_minion"
00:00:03.407
@flaky
@scope_formulas
@bug_reported
Scenario: Clear values in group formula and verify the defaults again
When
I follow the left menu "Systems > System Groups"
00:00:00.085
When
I follow "test-formula-group" in the content area
00:00:00.073
And
I follow "Formulas" in the content area
00:00:00.073
And
I follow first "Testform" in the content area
00:00:00.214
And
I click on "Clear values" and confirm alert box
00:00:00.372
And
I click on "Save Formula"
00:00:00.071
Then
I should see a "Formula saved" text
00:00:00.586
When
I wait for "1" seconds
00:00:01.000
Then
the pillar data for "testing:str" should be "" on "sle_minion"
00:00:04.215
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.554
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:03.401
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:04.887
And
the pillar data for "testing:num" should be "" on "sle_minion"
00:00:03.680
And
the pillar data for "testing:num_def" should be "0" on "sle_minion"
00:00:03.428
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:03.450
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:04.816
And
the pillar data for "testing:pw" should be "" on "sle_minion"
00:00:03.453
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.394
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:03.423
And
the pillar data for "testing:list_of_strings" should contain "def_item1" on "sle_minion"
00:00:04.475
And
the pillar data for "testing:list_of_strings" should contain "def_item2" on "sle_minion"
00:00:03.424
And
the pillar data for "testing:dict_of_strings:name1" should be "def_value1" on "sle_minion"
00:00:03.407
And
the pillar data for "testing:dict_of_strings:name2" should be "def_value2" on "sle_minion"
00:00:03.442
And
the pillar data for "testing:list_of_dicts:0:name" should be "def_user" on "sle_minion"
00:00:04.550
And
the pillar data for "testing:list_of_dicts:0:password" should be "secret1" on "sle_minion"
00:00:03.442
And
the pillar data for "testing:list_of_dicts:0" should not contain "full_name" on "sle_minion"
00:00:03.444
And
the pillar data for "testing:dict_of_dicts:def_user:name" should be "root" on "sle_minion"
00:00:03.588
And
the pillar data for "testing:dict_of_dicts:def_user:password" should be "secret2" on "sle_minion"
00:00:04.527
And
the pillar data for "testing:dict_of_dicts:def_user:full_name" should be "None" on "sle_minion"
00:00:03.444
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:group_name" should be "default group 1" on "sle_minion"
00:00:03.571
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:entries:def_entry1:entry_name" should be "default entry 1" on "sle_minion"
00:00:03.448
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:entries:def_entry1:entry_desc" should be "some text" on "sle_minion"
00:00:04.640
@flaky
@scope_formulas
@bug_reported
Scenario: Fill in and verify mix of default and non-default values in group formula
When
I follow the left menu "Systems > System Groups"
00:00:00.061
When
I follow "test-formula-group" in the content area
00:00:00.063
And
I follow "Formulas" in the content area
00:00:00.058
And
I follow first "Testform" in the content area
00:00:00.576
And
I click on "Expand All Sections"
00:00:00.283
And
I enter "text1" as "testing#str"
00:00:00.122
And
I enter "1" as "testing#num"
00:00:00.059
And
I enter "2" as "testing#num_def"
00:00:00.067
And
I enter "pw1" as "testing#pw"
00:00:00.100
And
I click on "Save Formula"
00:00:00.079
Then
I should see a "Formula saved" text
00:00:00.910
When
I wait for "1" seconds
00:00:01.000
Then
the pillar data for "testing:str" should be "text1" on "sle_minion"
00:00:03.375
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.408
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:04.903
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.456
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.371
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.394
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:05.136
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:03.470
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.398
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.522
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:04.557
@flaky
@scope_formulas
@bug_reported
Scenario: Verify that minion form inherits the values from group form
Given
I am on the Systems overview page of this "sle_minion"
00:00:01.635
When
I follow "Formulas" in the content area
00:00:00.077
And
I follow first "Testform" in the content area
00:00:00.269
And
I click on "Save Formula"
00:00:00.217
Then
I should see a "Formula saved" text
00:00:00.546
And
the pillar data for "testing:str" should be "text1" on "sle_minion"
00:00:03.558
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.493
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:04.432
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.497
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.538
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.412
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:04.472
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:04.325
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.379
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.515
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:04.933
@flaky
@scope_formulas
@bug_reported
Scenario: Fill in and verify non-default values in minion formula
When
I follow "Formulas" in the content area
00:00:00.065
And
I follow first "Testform" in the content area
00:00:00.259
And
I click on "Expand All Sections"
00:00:00.286
And
I enter "min_text1" as "testing#str"
00:00:00.181
And
I enter "min_text2" as "testing#str_def"
00:00:00.162
And
I enter "min_text3" as "testing#str_or_null"
00:00:00.111
And
I enter "min_text4" as "testing#str_opt"
00:00:00.101
And
I enter "101" as "testing#num"
00:00:00.091
And
I enter "102" as "testing#num_def"
00:00:00.084
And
I enter "103" as "testing#num_or_null"
00:00:00.071
And
I enter "104" as "testing#num_opt"
00:00:00.078
And
I enter "min_pw1" as "testing#pw"
00:00:00.122
And
I enter "min_pw2" as "testing#pw_or_null"
00:00:00.093
And
I enter "min_pw3" as "testing#pw_opt"
00:00:00.112
And
I click on "Save Formula"
00:00:00.095
Then
I should see a "Formula saved" text
00:00:00.710
When
I wait for "1" seconds
00:00:01.000
Then
the pillar data for "testing:str" should be "min_text1" on "sle_minion"
00:00:03.446
And
the pillar data for "testing:str_def" should be "min_text2" on "sle_minion"
00:00:03.457
And
the pillar data for "testing:str_or_null" should be "min_text3" on "sle_minion"
00:00:04.510
And
the pillar data for "testing:str_opt" should be "min_text4" on "sle_minion"
00:00:03.470
And
the pillar data for "testing:num" should be "101" on "sle_minion"
00:00:03.499
And
the pillar data for "testing:num_def" should be "102" on "sle_minion"
00:00:03.609
And
the pillar data for "testing:num_or_null" should be "103" on "sle_minion"
00:00:04.417
And
the pillar data for "testing:num_opt" should be "104" on "sle_minion"
00:00:03.451
And
the pillar data for "testing:pw" should be "min_pw1" on "sle_minion"
00:00:03.488
And
the pillar data for "testing:pw_or_null" should be "min_pw2" on "sle_minion"
00:00:03.391
And
the pillar data for "testing:pw_opt" should be "min_pw3" on "sle_minion"
00:00:04.445
@flaky
@scope_formulas
@bug_reported
Scenario: Clear values in minion formula and verify that the pillar is set to group values
When
I follow "Formulas" in the content area
00:00:00.082
And
I follow first "Testform" in the content area
00:00:00.275
And
I click on "Clear values" and confirm alert box
00:00:00.381
And
I click on "Save Formula"
00:00:00.063
Then
I should see a "Formula saved" text
00:00:00.550
When
I wait for "1" seconds
00:00:01.000
Then
the pillar data for "testing:str" should be "text1" on "sle_minion"
00:00:03.521
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.392
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:04.912
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.582
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.410
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.444
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:03.479
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:05.205
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.439
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.408
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:04.967
@flaky
@scope_formulas
@bug_reported
Scenario: Cleanup: remove formula from minion
When
I follow "Formulas" in the content area
00:00:00.062
And
I uncheck the "testform" formula
00:00:00.241
And
I click on "Save"
00:00:00.078
And
I wait until I see "Formula saved." text
00:00:00.634
Then
the "testform" formula should be unchecked
00:00:10.035
@flaky
@scope_formulas
@bug_reported
Scenario: Cleanup: remove "test-formula-group" system group
When
I follow the left menu "Systems > System Groups"
00:00:00.078
And
I follow "test-formula-group" in the content area
00:00:00.077
And
I follow "Delete Group" in the content area
00:00:00.067
When
I click on "Confirm Deletion"
00:00:01.093
Then
I should see a "System group" text
00:00:00.147
Then
I should see a "test-formula-group" text
00:00:00.145
And
I should see a "deleted" text
00:00:00.136
And
I wait until there is no pillar refresh salt job active
00:00:05.741
Then
the pillar data for "testing" should be empty on "sle_minion"
00:00:03.439