@suffolklitlab/alkiln 4.6.2 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ @random_input
2
+ Feature: Assembly Line package-specific Steps
3
+
4
+ # In tag names, 'ri' is for 'random input'
5
+
6
+ @fast @ri1 @random
7
+ Scenario: I fill in random input till the end
8
+   Given I start the interview at "test_random_input"
9
+ And I answer randomly for at most 20 pages
10
+ Then the question id should be "end"
11
+
12
+ @fast @ri2 @random
13
+ Scenario: I fill in random input for 1 page
14
+   Given I start the interview at "test_random_input"
15
+ And I answer randomly for at most 1 page
16
+
17
+ # Should create two unique folders for random step screenshots which
18
+ # must be checked manually
19
+ @fast @ri3 @random
20
+ Scenario: I answer randomly till the end twice
21
+ Given I start the interview at "test_random_input"
22
+ And I answer randomly for at most 50 pages
23
+ Given I start the interview at "test_random_input"
24
+ And I answer randomly for at most 50 pages
25
+
26
+ @fast @ri4 @random @error
27
+ Scenario: Fail with error page from random input
28
+ Given the final Scenario status should be "failed"
29
+ Given I start the interview at "test_missing_var_error_screen"
30
+ And the max seconds for each step in this scenario is 10
31
+ And I answer randomly for at most 3 pages
@@ -0,0 +1,155 @@
1
+ @reload
2
+ Feature: Errors caused by server reload
3
+
4
+ # These can only be run locally one at a time once you uncomment them:
5
+ # 1. Make sure you have two versions of the repo locally and open a terminal window for each of them
6
+ # 2. With one repo, start one specific test
7
+ # 3. Be ready to run the setup step for the 2nd repo
8
+ # 4. Prepatory explanation: With some noted exceptions, when the 1st test is _starting_ its long wait time (which they should each have), start the setup step in the other terminal.
9
+ # 4a. Start the test in the 1st repo. Ex: npm run cucumber -- "--tags" "@reload1"
10
+ # 4b. Wait until the long wait time is just starting (count the number of steps to match the progress dots)
11
+ # 4c. Start the setup in the 2nd repo: npm run setup
12
+ # 5. Make sure the test waits longer than the scope.timeout
13
+ # 6. Make sure the reload error is triggered for the first attempt of the test
14
+ # 7. Make sure the reload error is not present for the second attempt
15
+ # 8. For the second repo: npm run takedown
16
+
17
+ # # Tests that need to be written and run:
18
+ # # Theoretically implemented
19
+ # - [ ] 1. sign in to server with `.sign_in` on two levels:
20
+ # - [x] (throw_after_server_reloads() solved this I think) when navigating to server
21
+ # - [ ] when submitting to log in (impossible to time? they both happen at once)
22
+ # - [x] 2. (waits full time for sign-out page, but I think it's working otherwise) I tap the ... tab (should not cause timeout at all, so should be fine)
23
+ # - [x] 3. tap elements
24
+ # - [x] I tap the ... element$
25
+ # - [ ] (same as above?) I tap the ... element and wait
26
+ # - [x] 4. Set the var of a continue button
27
+ # - [x] I set the var ... (using a button press to continue)
28
+ # - [x] (same as above?) I set the var ... GitHub)? secret (for a button press)
29
+ # - [ ] (same as above? We don't have an interview ready for this yet. Seen notes in 4c) I set the var for a button in a story table
30
+ # - [x] 5. Signing out at end of step
31
+ # - [x] 6. Tap to continue
32
+ # - [x] I tap to continue
33
+ # - [x] In the middle of a story table (basically same as "tap to continue")
34
+ # - [x] 7. Fails both tests
35
+ # - [x] 8. The server does actually finish reloading during the first attempt, so there's only one error printed in the report.
36
+ #
37
+ # # Not yet implemented
38
+ # - [ ] I download
39
+ #
40
+ # Skipping for now because not a documented step yet
41
+ # - [ ] I tap the defined text link
42
+
43
+ ## For this scenario, start the server setup before you start running the test and wait till 4th attempt to pull in the code.
44
+ ## No screenshots are taken because these are secrets
45
+ #@reload1a
46
+ #Scenario: The server reloads while I navigate to the server sign in page
47
+ # Given the max seconds for each step in this scenario is 5
48
+ #  Given I sign in with the email "USER1_EMAIL" and the password "USER1_PASSWORD"
49
+ #
50
+ #@reload1b
51
+ ##Scenario: The server reloads while I'm submitting my signin (impossible)
52
+ #
53
+ ## Should error after finishing test, but only because can't finish the test by going to the sign out page during server #reload. Sign out page is a necessary evil at the moment to make sure the next test starts fresh.
54
+ #@reload2
55
+ #Scenario: The server reloads while I tap a tab
56
+ # Given I start the interview at "test_taps"
57
+ # And I wait 20 seconds
58
+ # And I tap the "Tests-second_template-tab" tab
59
+ # Then I see the phrase "villify"
60
+ #
61
+ #@reload3a
62
+ #Scenario: The server reloads while I tap an element selector
63
+ # Given I start the interview at "all_tests"
64
+ # And I wait 18 seconds
65
+ # Given the max seconds for each step in this scenario is 5
66
+ # Then I tap the "button.btn.btn-da.btn-primary[type='submit']" element
67
+ #
68
+ ##@reload3b
69
+ ## Given I start the interview at "all_tests"
70
+ ## And I wait 18 seconds
71
+ ## Given the max seconds for each step in this scenario is 5
72
+ ## Then I tap the "button.btn.btn-da.btn-primary[type='submit']" element and wait 1 seconds
73
+ #
74
+ ## Start setup on the 12th dot
75
+ #@reload4a
76
+ #Scenario: The server reloads while I set the var of a continue button
77
+ # Given I start the interview at "all_tests"
78
+ # And I tap to continue
79
+ # And I tap to continue
80
+ # When I set the var "checkboxes_yesno" to "True"
81
+ # And I set the var "checkboxes_other['checkbox_other_opt_1']" to "true"
82
+ # And I set the var "dropdown_test" to "dropdown_opt_2"
83
+ # And I set the var "radio_yesno" to "False"
84
+ # And I set the var "radio_other" to "radio_other_opt_3"
85
+ # And I set the var "text_input" to "Regular text input field value"
86
+ # And I set the var "textarea" to "Multiline text\narea value"
87
+ # And I wait 25 seconds
88
+ # Given the max seconds for each step in this scenario is 5
89
+ # Then I set the var "direct_standard_fields" to "True"
90
+ #
91
+ ## You must add the env var `STANDARD_FIELDS`. Otherwise, it's just like @reload4a
92
+ #@reload4b
93
+ #Scenario: The server reloads while I set the var of a continue button
94
+ # Given I start the interview at "all_tests"
95
+ # And I tap to continue
96
+ # And I tap to continue
97
+ # When I set the var "checkboxes_yesno" to "True"
98
+ # And I set the var "checkboxes_other['checkbox_other_opt_1']" to "true"
99
+ # And I set the var "dropdown_test" to "dropdown_opt_2"
100
+ # And I set the var "radio_yesno" to "False"
101
+ # And I set the var "radio_other" to "radio_other_opt_3"
102
+ # And I set the var "text_input" to "Regular text input field value"
103
+ # And I set the var "textarea" to "Multiline text\narea value"
104
+ # And I wait 25 seconds
105
+ # Given the max seconds for each step in this scenario is 5
106
+ # Then I set the var "direct_standard_fields" to the github secret "STANDARD_FIELDS"
107
+ #
108
+ ### We don't have an interview set up for this yet. We need one where the _first_ page
109
+ ### has a continue button field that sets a variable.
110
+ ##@reload4c
111
+ ##Scenario: The server reloads while I run a story table
112
+ ##  Given I start the interview at "all_tests"
113
+ ## And I wait 18 seconds
114
+ ## Given the max seconds for each step in this scenario is 3
115
+ ##  And I get to "id of second page" with this data:
116
+ ## | var | value | trigger |
117
+ ## | some_continue_button_var_on_first_page | true | |
118
+ #
119
+ #@reload5
120
+ #Scenario: The server reloads while signing out
121
+ # Given I start the interview at "all_tests"
122
+ # And I wait 16 seconds
123
+ # Given the max seconds for each step in this scenario is 1
124
+ #
125
+ #@reload6a
126
+ #Scenario: The server reloads while I tap to continue
127
+ # Given I start the interview at "all_tests"
128
+ # And I wait 18 seconds
129
+ # Given the max seconds for each step in this scenario is 3
130
+ # And I tap to continue
131
+ #
132
+ #@reload6b
133
+ #Scenario: The server reloads while I run a story table
134
+ #  Given I start the interview at "all_tests"
135
+ # And I wait 18 seconds
136
+ # Given the max seconds for each step in this scenario is 3
137
+ #  And I get to "direct standard fields" with this data:
138
+ # | var | value | trigger |
139
+ # | double_quote_dict['double_quote_key']["dq_two"] | true | |
140
+ # | single_quote_dict["single_quote_key"]['sq_two'] | true | |
141
+ #
142
+ ## This test might not be necessary. The test run should end in failure and the message should appear in both reports.
143
+ ## Run `npm run setup` both times. This will complicate takedown - it creates two projects, so at the end you have to takedown #the current project, which removes the project name in the config, then you have to put the name of the first project into the #config and then run takedown again.
144
+ #@reload7
145
+ #Scenario: The server is reloading in both attempts
146
+ # Given I start the interview at "all_tests"
147
+ # And I wait 22 seconds
148
+ # Given the max seconds for each step in this scenario is 1
149
+ #
150
+ #@reload8
151
+ #Scenario: The server finishes reloading before the first timeout
152
+ # Given I start the interview at "all_tests"
153
+ # And I wait 18 seconds
154
+ # Given the max seconds for each step in this scenario is 30
155
+ # And I tap to continue
@@ -3,7 +3,6 @@ Feature: Supported story table formats
3
3
 
4
4
  NOTE:
5
5
  Unsupported formats:
6
- - Arrays (see https://github.com/plocket/docassemble-cucumber/issues/257)
7
6
  - Format 1 and 2 tables (permanent) (see https://github.com/plocket/docassemble-cucumber/issues/264)
8
7
 
9
8
  NOTE:
@@ -75,3 +74,52 @@ Scenario: Table MISSING trigger column
75
74
  | single_quote_dict['single_quote_key']['sq_two'] | true |
76
75
  | text_input | Regular text input field value |
77
76
  | textarea | Multiline text\narea value |
77
+
78
+ @fast @stf5
79
+ Scenario: Table has no header row, has trigger column
80
+   Given I start the interview at "all_tests"
81
+   And I get to "showifs" with this data:
82
+ | double_quote_dict["double_quote_key"]['dq_two'] | true | |
83
+ | checkboxes_other['checkbox_other_opt_1'] | true | |
84
+ | checkboxes_other['checkbox_other_opt_2'] | true | |
85
+ | checkboxes_other['checkbox_other_opt_3'] | false | |
86
+ | checkboxes_yesno | True | |
87
+ | dropdown_test | dropdown_opt_2 | |
88
+ | radio_other | radio_other_opt_3 | |
89
+ | radio_yesno | False | |
90
+ | single_quote_dict['single_quote_key']['sq_two'] | true | |
91
+ | text_input | Regular text input field value | |
92
+ | textarea | Multiline text\narea value | |
93
+
94
+ @fast @stf6
95
+ Scenario: Table has no header row, MISSING trigger column
96
+   Given I start the interview at "all_tests"
97
+   And I get to "showifs" with this data:
98
+ | double_quote_dict["double_quote_key"]['dq_two'] | true |
99
+ | checkboxes_other['checkbox_other_opt_2'] | true |
100
+ | checkboxes_yesno | True |
101
+ | dropdown_test | dropdown_opt_2 |
102
+ | radio_other | radio_other_opt_3 |
103
+ | radio_yesno | False |
104
+ | single_quote_dict['single_quote_key']['sq_two'] | true |
105
+ | text_input | Regular text input field value |
106
+ | textarea | Multiline text\narea value |
107
+
108
+ @fast @stf7
109
+ Scenario: Fails when table has no header row and rows have only one column
110
+ Given the final Scenario status should be "failed"
111
+ And the Scenario report should include:
112
+ """
113
+ Your Story Table definition needs to be changed.
114
+ """
115
+   Given I start the interview at "all_tests"
116
+   And I get to "showifs" with this data:
117
+ | double_quote_dict["double_quote_key"]['dq_two'] |
118
+ | checkboxes_other['checkbox_other_opt_2'] |
119
+ | checkboxes_yesno |
120
+ | dropdown_test |
121
+ | radio_other |
122
+ | radio_yesno |
123
+ | single_quote_dict['single_quote_key']['sq_two'] |
124
+ | text_input |
125
+ | textarea |