@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:08.974
And
I install "metadata.yml" to custom formula metadata directory "testform"
00:00:06.411
When
I follow the left menu "Salt > Formula Catalog"
00:00:00.175
And
I enter "testform" as the filtered formula name
00:00:00.110
Then
I should see a "testform" text
00:00:00.066
@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.160
When
I follow "Create Group"
00:00:00.323
And
I enter "test-formula-group" as "name"
00:00:00.082
And
I enter "Test group with testform formula added" as "description"
00:00:00.096
And
I click on "Create Group"
00:00:00.489
Then
I should see a "System group test-formula-group created." text
00:00:00.076
When
I follow "Formulas" in the content area
00:00:00.090
Then
I should see a "Choose formulas:" text
00:00:00.071
And
I should see a "General System Configuration" text
00:00:00.220
And
I should see a "Testform" text
00:00:00.104
When
I check the "testform" formula
00:00:00.098
And
I click on "Save"
00:00:00.077
And
I wait until I see "Formula saved." text
00:00:00.408
And
I follow "Target Systems"
00:00:00.571
And
I check the "sle_minion" client
00:00:00.076
And
I click on "Add Systems"
00:00:01.307
Then
I should see a "1 systems were added to test-formula-group server group." text
00:00:00.115
When
I refresh the pillar data
00:00:04.109
Then
the pillar data for "testing:str" should be "" on "sle_minion"
00:00:03.679
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:04.489
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:03.591
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.602
And
the pillar data for "testing:num" should be "" on "sle_minion"
00:00:03.556
And
the pillar data for "testing:num_def" should be "0" on "sle_minion"
00:00:04.529
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:03.807
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:03.560
And
the pillar data for "testing:pw" should be "" on "sle_minion"
00:00:03.597
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.568
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:05.275
And
the pillar data for "testing:list_of_strings" should contain "def_item1" on "sle_minion"
00:00:03.503
And
the pillar data for "testing:list_of_strings" should contain "def_item2" on "sle_minion"
00:00:03.582
And
the pillar data for "testing:dict_of_strings:name1" should be "def_value1" on "sle_minion"
00:00:05.002
And
the pillar data for "testing:dict_of_strings:name2" should be "def_value2" on "sle_minion"
00:00:03.567
And
the pillar data for "testing:list_of_dicts:0:name" should be "def_user" on "sle_minion"
00:00:03.551
And
the pillar data for "testing:list_of_dicts:0:password" should be "secret1" on "sle_minion"
00:00:03.575
And
the pillar data for "testing:list_of_dicts:0" should not contain "full_name" on "sle_minion"
00:00:04.481
And
the pillar data for "testing:dict_of_dicts:def_user:name" should be "root" on "sle_minion"
00:00:03.604
And
the pillar data for "testing:dict_of_dicts:def_user:password" should be "secret2" on "sle_minion"
00:00:03.514
And
the pillar data for "testing:dict_of_dicts:def_user:full_name" should be "None" on "sle_minion"
00:00:03.465
And
the pillar data for "testing:recursive_dict_of_dicts:def_gr1:group_name" should be "default group 1" on "sle_minion"
00:00:04.449
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.584
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.523
@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.085
When
I follow "test-formula-group" in the content area
00:00:00.095
And
I follow "Formulas" in the content area
00:00:00.087
And
I follow first "Testform" in the content area
00:00:00.249
And
I click on "Expand All Sections"
00:00:00.245
And
I enter "text1" as "testing#str"
00:00:00.132
And
I enter "text2" as "testing#str_def"
00:00:00.186
And
I enter "text3" as "testing#str_or_null"
00:00:00.107
And
I enter "text4" as "testing#str_opt"
00:00:00.119
And
I enter "1" as "testing#num"
00:00:00.083
And
I enter "2" as "testing#num_def"
00:00:00.094
And
I enter "3" as "testing#num_or_null"
00:00:00.100
And
I enter "4" as "testing#num_opt"
00:00:00.079
And
I enter "pw1" as "testing#pw"
00:00:00.128
And
I enter "pw2" as "testing#pw_or_null"
00:00:00.118
And
I enter "pw3" as "testing#pw_opt"
00:00:00.095
And
I click on "Save Formula"
00:00:00.112
Then
I should see a "Formula saved" text
00:00:00.826
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:05.968
And
the pillar data for "testing:str_def" should be "text2" on "sle_minion"
00:00:03.471
And
the pillar data for "testing:str_or_null" should be "text3" on "sle_minion"
00:00:03.497
And
the pillar data for "testing:str_opt" should be "text4" on "sle_minion"
00:00:04.792
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.597
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.533
And
the pillar data for "testing:num_or_null" should be "3" on "sle_minion"
00:00:03.534
And
the pillar data for "testing:num_opt" should be "4" on "sle_minion"
00:00:04.688
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.722
And
the pillar data for "testing:pw_or_null" should be "pw2" on "sle_minion"
00:00:03.468
And
the pillar data for "testing:pw_opt" should be "pw3" on "sle_minion"
00:00:03.641
@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.086
When
I follow "test-formula-group" in the content area
00:00:00.081
And
I follow "Formulas" in the content area
00:00:00.085
And
I follow first "Testform" in the content area
00:00:00.218
And
I click on "Clear values" and confirm alert box
00:00:00.378
And
I click on "Save Formula"
00:00:00.072
Then
I should see a "Formula saved" text
00:00:00.699
When
I wait for "1" seconds
00:00:01.000
Then
the pillar data for "testing:str" should be "" on "sle_minion"
00:00:03.711
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.559
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:03.544
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:04.666
And
the pillar data for "testing:num" should be "" on "sle_minion"
00:00:03.676
And
the pillar data for "testing:num_def" should be "0" on "sle_minion"
00:00:03.645
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:03.485
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:04.517
And
the pillar data for "testing:pw" should be "" on "sle_minion"
00:00:04.220
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.486
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:03.487
And
the pillar data for "testing:list_of_strings" should contain "def_item1" on "sle_minion"
00:00:04.742
And
the pillar data for "testing:list_of_strings" should contain "def_item2" on "sle_minion"
00:00:03.550
And
the pillar data for "testing:dict_of_strings:name1" should be "def_value1" on "sle_minion"
00:00:03.520
And
the pillar data for "testing:dict_of_strings:name2" should be "def_value2" on "sle_minion"
00:00:03.511
And
the pillar data for "testing:list_of_dicts:0:name" should be "def_user" on "sle_minion"
00:00:04.699
And
the pillar data for "testing:list_of_dicts:0:password" should be "secret1" on "sle_minion"
00:00:03.543
And
the pillar data for "testing:list_of_dicts:0" should not contain "full_name" on "sle_minion"
00:00:03.484
And
the pillar data for "testing:dict_of_dicts:def_user:name" should be "root" on "sle_minion"
00:00:03.715
And
the pillar data for "testing:dict_of_dicts:def_user:password" should be "secret2" on "sle_minion"
00:00:04.598
And
the pillar data for "testing:dict_of_dicts:def_user:full_name" should be "None" on "sle_minion"
00:00:03.527
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.561
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.475
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.499
@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.078
When
I follow "test-formula-group" in the content area
00:00:00.080
And
I follow "Formulas" in the content area
00:00:00.070
And
I follow first "Testform" in the content area
00:00:00.292
And
I click on "Expand All Sections"
00:00:00.232
And
I enter "text1" as "testing#str"
00:00:00.118
And
I enter "1" as "testing#num"
00:00:00.090
And
I enter "2" as "testing#num_def"
00:00:00.095
And
I enter "pw1" as "testing#pw"
00:00:00.122
And
I click on "Save Formula"
00:00:00.096
Then
I should see a "Formula saved" text
00:00:01.000
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.524
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.479
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:05.289
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.577
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.492
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.520
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:04.711
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:03.567
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.515
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.665
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:04.466
@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.749
When
I follow "Formulas" in the content area
00:00:00.082
And
I follow first "Testform" in the content area
00:00:00.319
And
I click on "Save Formula"
00:00:00.236
Then
I should see a "Formula saved" text
00:00:00.547
And
the pillar data for "testing:str" should be "text1" on "sle_minion"
00:00:03.688
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.548
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:04.483
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.750
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.496
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.478
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:05.187
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:03.526
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.473
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.506
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:04.618
@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.074
And
I follow first "Testform" in the content area
00:00:00.249
And
I click on "Expand All Sections"
00:00:00.277
And
I enter "min_text1" as "testing#str"
00:00:00.209
And
I enter "min_text2" as "testing#str_def"
00:00:00.193
And
I enter "min_text3" as "testing#str_or_null"
00:00:00.129
And
I enter "min_text4" as "testing#str_opt"
00:00:00.133
And
I enter "101" as "testing#num"
00:00:00.092
And
I enter "102" as "testing#num_def"
00:00:00.117
And
I enter "103" as "testing#num_or_null"
00:00:00.087
And
I enter "104" as "testing#num_opt"
00:00:00.085
And
I enter "min_pw1" as "testing#pw"
00:00:00.156
And
I enter "min_pw2" as "testing#pw_or_null"
00:00:00.124
And
I enter "min_pw3" as "testing#pw_opt"
00:00:00.104
And
I click on "Save Formula"
00:00:00.081
Then
I should see a "Formula saved" text
00:00:00.808
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.538
And
the pillar data for "testing:str_def" should be "min_text2" on "sle_minion"
00:00:03.752
And
the pillar data for "testing:str_or_null" should be "min_text3" on "sle_minion"
00:00:04.556
And
the pillar data for "testing:str_opt" should be "min_text4" on "sle_minion"
00:00:03.547
And
the pillar data for "testing:num" should be "101" on "sle_minion"
00:00:03.583
And
the pillar data for "testing:num_def" should be "102" on "sle_minion"
00:00:03.544
And
the pillar data for "testing:num_or_null" should be "103" on "sle_minion"
00:00:04.470
And
the pillar data for "testing:num_opt" should be "104" on "sle_minion"
00:00:03.691
And
the pillar data for "testing:pw" should be "min_pw1" on "sle_minion"
00:00:03.558
And
the pillar data for "testing:pw_or_null" should be "min_pw2" on "sle_minion"
00:00:03.548
And
the pillar data for "testing:pw_opt" should be "min_pw3" on "sle_minion"
00:00:04.852
@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.114
And
I follow first "Testform" in the content area
00:00:00.268
And
I click on "Clear values" and confirm alert box
00:00:00.400
And
I click on "Save Formula"
00:00:00.082
Then
I should see a "Formula saved" text
00:00:00.618
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.504
And
the pillar data for "testing:str_def" should be "defvalue" on "sle_minion"
00:00:03.467
And
the pillar data for "testing:str_or_null" should be "None" on "sle_minion"
00:00:04.592
And
the pillar data for "testing" should not contain "str_opt" on "sle_minion"
00:00:03.544
And
the pillar data for "testing:num" should be "1" on "sle_minion"
00:00:03.479
And
the pillar data for "testing:num_def" should be "2" on "sle_minion"
00:00:03.523
And
the pillar data for "testing:num_or_null" should be "None" on "sle_minion"
00:00:04.879
And
the pillar data for "testing" should not contain "num_opt" on "sle_minion"
00:00:03.545
And
the pillar data for "testing:pw" should be "pw1" on "sle_minion"
00:00:03.545
And
the pillar data for "testing:pw_or_null" should be "None" on "sle_minion"
00:00:03.572
And
the pillar data for "testing" should not contain "pw_opt" on "sle_minion"
00:00:04.487
@flaky
@scope_formulas
@bug_reported
Scenario: Cleanup: remove formula from minion
When
I follow "Formulas" in the content area
00:00:00.069
And
I uncheck the "testform" formula
00:00:00.253
And
I click on "Save"
00:00:00.071
And
I wait until I see "Formula saved." text
00:00:00.710
Then
the "testform" formula should be unchecked
00:00:10.043
@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.088
And
I follow "test-formula-group" in the content area
00:00:00.087
And
I follow "Delete Group" in the content area
00:00:00.084
When
I click on "Confirm Deletion"
00:00:01.223
Then
I should see a "System group" text
00:00:00.072
Then
I should see a "test-formula-group" text
00:00:00.060
And
I should see a "deleted" text
00:00:00.062
And
I wait until there is no pillar refresh salt job active
00:00:05.665
Then
the pillar data for "testing" should be empty on "sle_minion"
00:00:03.479