@suffolklitlab/alkiln 5.0.2-feat-github-server-5 → 5.0.2-feat-github-server-6
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.
- package/.github/workflows/github_server.yml +1 -1
- package/action.yml +26 -26
- package/docassemble/ALKiln/__init__.py +1 -0
- package/docassemble/ALKiln/data/questions/AL_tests.yml +40 -0
- package/docassemble/ALKiln/data/questions/all_tests.yml +312 -0
- package/docassemble/ALKiln/data/questions/test.yml +14 -0
- package/docassemble/ALKiln/data/questions/test_date_and_time.yml +34 -0
- package/docassemble/ALKiln/data/questions/test_decoding.yml +101 -0
- package/docassemble/ALKiln/data/questions/test_kickout.yml +37 -0
- package/docassemble/ALKiln/data/questions/test_languages.yml +26 -0
- package/docassemble/ALKiln/data/questions/test_longest_filepath.yml +19 -0
- package/docassemble/ALKiln/data/questions/test_loops.yml +66 -0
- package/docassemble/ALKiln/data/questions/test_missing_var_error_screen.yml +9 -0
- package/docassemble/ALKiln/data/questions/test_random_input.yml +83 -0
- package/docassemble/ALKiln/data/questions/test_secret_vars.yml +32 -0
- package/docassemble/ALKiln/data/questions/test_signature.yml +25 -0
- package/docassemble/ALKiln/data/questions/test_taps.yml +43 -0
- package/docassemble/ALKiln/data/questions/test_trigger.yml +25 -0
- package/docassemble/ALKiln/data/questions/url_args.yml +33 -0
- package/docassemble/ALKiln/data/sources/README.md +4 -0
- package/docassemble/ALKiln/data/sources/ar.xlsx +0 -0
- package/docassemble/ALKiln/data/sources/assembly_line.feature +43 -0
- package/docassemble/ALKiln/data/sources/es.xlsx +0 -0
- package/docassemble/ALKiln/data/sources/establishing_steps.feature +62 -0
- package/docassemble/ALKiln/data/sources/example_test.feature +11 -0
- package/docassemble/ALKiln/data/sources/filepaths.feature +9 -0
- package/docassemble/ALKiln/data/sources/interactive_steps.feature +172 -0
- package/docassemble/ALKiln/data/sources/languages.feature +36 -0
- package/docassemble/ALKiln/data/sources/observation_steps.feature +174 -0
- package/docassemble/ALKiln/data/sources/random_input.feature +36 -0
- package/docassemble/ALKiln/data/sources/reload.feature +155 -0
- package/docassemble/ALKiln/data/sources/reports.feature +574 -0
- package/docassemble/ALKiln/data/sources/some_png_1.png +0 -0
- package/docassemble/ALKiln/data/sources/some_png_2.png +0 -0
- package/docassemble/ALKiln/data/sources/story_table_formats.feature +125 -0
- package/docassemble/ALKiln/data/sources/story_tables.feature +139 -0
- package/docassemble/ALKiln/data/static/README.md +4 -0
- package/docassemble/ALKiln/data/static/styles.css +46 -0
- package/docassemble/ALKiln/data/templates/README.md +3 -0
- package/docassemble/ALKiln/data/templates/simple.pdf +0 -0
- package/lib/scope.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
metadata:
|
|
2
|
+
title: Loop tests
|
|
3
|
+
description: Test loops with .there_is_another and .target_number
|
|
4
|
+
---
|
|
5
|
+
# Necessary to tell us what the sought var is on each page
|
|
6
|
+
# Every interview that wants testing will need to have an element like this
|
|
7
|
+
default screen parts:
|
|
8
|
+
post: |
|
|
9
|
+
<div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
|
|
10
|
+
---
|
|
11
|
+
objects:
|
|
12
|
+
- there_are_any_people: DAList.using(object_type=Individual)
|
|
13
|
+
- there_is_another_people: DAList.using(object_type=Individual, there_are_any=True)
|
|
14
|
+
- target_people: DAList.using(object_type=Individual, ask_number=True)
|
|
15
|
+
---
|
|
16
|
+
mandatory: True
|
|
17
|
+
code: |
|
|
18
|
+
there_are_any_people.gather()
|
|
19
|
+
there_is_another_people.gather()
|
|
20
|
+
target_people.gather()
|
|
21
|
+
end
|
|
22
|
+
---
|
|
23
|
+
id: there are any people
|
|
24
|
+
generic object: DAList
|
|
25
|
+
question: Are there any "${ x.object_name() }" people?
|
|
26
|
+
yesno: x.there_are_any
|
|
27
|
+
---
|
|
28
|
+
id: is there another person
|
|
29
|
+
generic object: DAList
|
|
30
|
+
question: Are there more "${ x.object_name() }" people?
|
|
31
|
+
yesno: x.there_is_another
|
|
32
|
+
---
|
|
33
|
+
id: target number
|
|
34
|
+
question: How many "target_number" people are there?
|
|
35
|
+
fields:
|
|
36
|
+
- Number of other people: target_people.target_number
|
|
37
|
+
input type: number
|
|
38
|
+
---
|
|
39
|
+
id: person name
|
|
40
|
+
generic object: DAList
|
|
41
|
+
question: Name of the "${ x[ i ].object_name() }" person
|
|
42
|
+
fields:
|
|
43
|
+
- Name: x[i].name.first
|
|
44
|
+
---
|
|
45
|
+
id: end
|
|
46
|
+
event: end
|
|
47
|
+
question: The end!
|
|
48
|
+
subquestion: |
|
|
49
|
+
`there_are_any_people` people: ${ len(there_are_any_people.complete_elements()) }
|
|
50
|
+
|
|
51
|
+
% for person in there_are_any_people:
|
|
52
|
+
* ${ person }
|
|
53
|
+
% endfor
|
|
54
|
+
|
|
55
|
+
`there_is_another_people` people: ${ len(there_is_another_people.complete_elements()) }
|
|
56
|
+
|
|
57
|
+
% for person in there_is_another_people:
|
|
58
|
+
* ${ person }
|
|
59
|
+
% endfor
|
|
60
|
+
|
|
61
|
+
`target_people` people: ${ len(target_people.complete_elements()) }
|
|
62
|
+
|
|
63
|
+
% for person in target_people:
|
|
64
|
+
* ${ person }
|
|
65
|
+
% endfor
|
|
66
|
+
---
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
metadata:
|
|
3
|
+
title: Test random input
|
|
4
|
+
comment: Test trying to get through an interview by giving randomly generated answers
|
|
5
|
+
---
|
|
6
|
+
modules:
|
|
7
|
+
- docassemble.ALToolbox.ThreePartsDate
|
|
8
|
+
---
|
|
9
|
+
# Necessary to tell us what the sought var is on each page
|
|
10
|
+
# Every interview that wants testing will need to have an element like this
|
|
11
|
+
default screen parts:
|
|
12
|
+
post: |
|
|
13
|
+
<div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
|
|
14
|
+
---
|
|
15
|
+
############# Interview order #############
|
|
16
|
+
mandatory: True
|
|
17
|
+
code: |
|
|
18
|
+
text
|
|
19
|
+
choices
|
|
20
|
+
signature
|
|
21
|
+
custom_data_types
|
|
22
|
+
end
|
|
23
|
+
---
|
|
24
|
+
id: text
|
|
25
|
+
question: Text test
|
|
26
|
+
fields:
|
|
27
|
+
- Random paragraph: textarea
|
|
28
|
+
input type: area
|
|
29
|
+
- Random text: text
|
|
30
|
+
- Random number: number
|
|
31
|
+
datatype: number
|
|
32
|
+
- Random date: date
|
|
33
|
+
datatype: date
|
|
34
|
+
- Random currency: currency
|
|
35
|
+
datatype: currency
|
|
36
|
+
- Random email: email
|
|
37
|
+
datatype: email
|
|
38
|
+
- Random password: password
|
|
39
|
+
datatype: password
|
|
40
|
+
---
|
|
41
|
+
id: Choices
|
|
42
|
+
question: Choices test
|
|
43
|
+
fields:
|
|
44
|
+
- Dropdown choices: select
|
|
45
|
+
choices:
|
|
46
|
+
- Dropdown 1
|
|
47
|
+
- Dropdown 2
|
|
48
|
+
- Dropdown 3
|
|
49
|
+
- Checkbox choices: checkbox
|
|
50
|
+
datatype: checkboxes
|
|
51
|
+
choices:
|
|
52
|
+
- Checkbox 1
|
|
53
|
+
- Checkbox 2
|
|
54
|
+
- Checkbox 3
|
|
55
|
+
- Radio button: radio
|
|
56
|
+
datatype: radio
|
|
57
|
+
choices:
|
|
58
|
+
- Radio 1
|
|
59
|
+
- Radio 2
|
|
60
|
+
- Radio 3
|
|
61
|
+
continue button field: choices
|
|
62
|
+
---
|
|
63
|
+
# Cannot handle this right now. It has a type of "hidden",
|
|
64
|
+
# like other special da fields that ALKiln shouldn't interact
|
|
65
|
+
# with.
|
|
66
|
+
id: custom_data_types
|
|
67
|
+
question: |
|
|
68
|
+
`CustomDataType`s
|
|
69
|
+
fields:
|
|
70
|
+
- ThreePartsDate: three_parts_date
|
|
71
|
+
datatype: ThreePartsDate
|
|
72
|
+
- Birth date: birth_date
|
|
73
|
+
datatype: BirthDate
|
|
74
|
+
continue button field: custom_data_types
|
|
75
|
+
---
|
|
76
|
+
id: signature
|
|
77
|
+
question: Signature
|
|
78
|
+
signature: signature
|
|
79
|
+
---
|
|
80
|
+
id: end
|
|
81
|
+
event: end
|
|
82
|
+
question: The end
|
|
83
|
+
---
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
mandatory: True
|
|
3
|
+
question: |
|
|
4
|
+
Enter the first secret
|
|
5
|
+
fields:
|
|
6
|
+
- 1st: first_text_entry
|
|
7
|
+
---
|
|
8
|
+
mandatory: True
|
|
9
|
+
question: |
|
|
10
|
+
The first secret you entered was ${ first_text_entry }
|
|
11
|
+
continue button field: continue_after_first
|
|
12
|
+
---
|
|
13
|
+
mandatory: True
|
|
14
|
+
question: |
|
|
15
|
+
Enter the second secret
|
|
16
|
+
fields:
|
|
17
|
+
- 2nd: second_text_entry
|
|
18
|
+
---
|
|
19
|
+
mandatory: True
|
|
20
|
+
question: |
|
|
21
|
+
The second secret you entered was ${ second_text_entry }
|
|
22
|
+
continue button field: continue_after_second
|
|
23
|
+
---
|
|
24
|
+
mandatory: True
|
|
25
|
+
question: |
|
|
26
|
+
Enter the thrid secret
|
|
27
|
+
fields:
|
|
28
|
+
- 3rd: third_text_entry
|
|
29
|
+
---
|
|
30
|
+
mandatory: True
|
|
31
|
+
question: |
|
|
32
|
+
The third secret you entered was ${ third_text_entry }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
metadata:
|
|
2
|
+
title: Signature screen test
|
|
3
|
+
short title: Siganture
|
|
4
|
+
---
|
|
5
|
+
# Necessary to tell us what the sought var is on each page
|
|
6
|
+
# Every interview that wants testing will need to have an element like this
|
|
7
|
+
default screen parts:
|
|
8
|
+
post: |
|
|
9
|
+
<div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
|
|
10
|
+
---
|
|
11
|
+
mandatory: True
|
|
12
|
+
id: interview order
|
|
13
|
+
code: |
|
|
14
|
+
signature
|
|
15
|
+
end
|
|
16
|
+
---
|
|
17
|
+
id: signature
|
|
18
|
+
question: |
|
|
19
|
+
Signature
|
|
20
|
+
signature: signature
|
|
21
|
+
---
|
|
22
|
+
id: the end
|
|
23
|
+
event: end
|
|
24
|
+
question: |
|
|
25
|
+
Congratulations! Tests have passed!
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
modules:
|
|
2
|
+
- docassemble.ALToolbox.misc
|
|
3
|
+
---
|
|
4
|
+
mandatory: True
|
|
5
|
+
event: main_screen
|
|
6
|
+
id: main screen
|
|
7
|
+
question: |
|
|
8
|
+
Tabbed Template Sceen
|
|
9
|
+
subquestion: |
|
|
10
|
+
${ tabbed_templates_html("Tests",
|
|
11
|
+
template_a,
|
|
12
|
+
template_b,
|
|
13
|
+
template_c
|
|
14
|
+
)}
|
|
15
|
+
---
|
|
16
|
+
template: template_a
|
|
17
|
+
subject: |
|
|
18
|
+
first template
|
|
19
|
+
content: |
|
|
20
|
+
This first, primary template has the unique word Mechanics that should be found.
|
|
21
|
+
---
|
|
22
|
+
template: template_b
|
|
23
|
+
subject: |
|
|
24
|
+
second template
|
|
25
|
+
content: |
|
|
26
|
+
This second, surplus template has the unique word villify that should be found.
|
|
27
|
+
---
|
|
28
|
+
template: template_c
|
|
29
|
+
subject: |
|
|
30
|
+
third template
|
|
31
|
+
content: |
|
|
32
|
+
This third, additional template has the unique word museum that should be found.
|
|
33
|
+
|
|
34
|
+
It also has a button that brings us to an event.
|
|
35
|
+
|
|
36
|
+
${ action_button_html(url_ask([{'recompute': ['special_event']}]),
|
|
37
|
+
label="Special event", id_tag="special_event")}
|
|
38
|
+
---
|
|
39
|
+
event: special_event
|
|
40
|
+
question: |
|
|
41
|
+
Special event
|
|
42
|
+
subquestion: |
|
|
43
|
+
The unique word on this screen is Portishead!
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
objects:
|
|
3
|
+
- person1: Individual
|
|
4
|
+
- person2: Individual
|
|
5
|
+
---
|
|
6
|
+
mandatory: True
|
|
7
|
+
code: |
|
|
8
|
+
person1.name.first
|
|
9
|
+
person2.name.first
|
|
10
|
+
end
|
|
11
|
+
---
|
|
12
|
+
id: name
|
|
13
|
+
generic object: Individual
|
|
14
|
+
question: Name of person ${ x.special_id }
|
|
15
|
+
fields:
|
|
16
|
+
- Name: x.name.first
|
|
17
|
+
---
|
|
18
|
+
id: end
|
|
19
|
+
event: end
|
|
20
|
+
question: The end of trigger tests!
|
|
21
|
+
---
|
|
22
|
+
code: |
|
|
23
|
+
person1.special_id = 1
|
|
24
|
+
person2.special_id = 2
|
|
25
|
+
---
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
metadata:
|
|
2
|
+
title: Test testing url args
|
|
3
|
+
short title: Test url args
|
|
4
|
+
comment: Test the automated integrated testing library for AssemblyLine with url functionality
|
|
5
|
+
---
|
|
6
|
+
# Necessary to tell us what the trigger var is on each page.
|
|
7
|
+
# In future, this should not be needed here.
|
|
8
|
+
default screen parts:
|
|
9
|
+
post: |
|
|
10
|
+
<div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
|
|
11
|
+
---
|
|
12
|
+
mandatory: True
|
|
13
|
+
id: interview order
|
|
14
|
+
code: |
|
|
15
|
+
url_args_test
|
|
16
|
+
end
|
|
17
|
+
---
|
|
18
|
+
id: url_args_test
|
|
19
|
+
question: Show url args
|
|
20
|
+
subquestion: |
|
|
21
|
+
Trying:
|
|
22
|
+
|
|
23
|
+
&from=theinternets&random=zoo
|
|
24
|
+
|
|
25
|
+
origin2: ${ url_args.get( 'from', 'unknown' ) }
|
|
26
|
+
|
|
27
|
+
random2: ${ url_args.get( 'random', 'unknown' ) }
|
|
28
|
+
continue button field: url_args_test
|
|
29
|
+
---
|
|
30
|
+
id: end
|
|
31
|
+
event: end
|
|
32
|
+
question: The end!
|
|
33
|
+
---
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@assembly_line
|
|
2
|
+
Feature: Assembly Line package-specific Steps
|
|
3
|
+
|
|
4
|
+
# In tag names, 'al' is for 'assembly line'
|
|
5
|
+
|
|
6
|
+
# Note: the first test for this suite is the first test in this file and we're having timeout issues, so we're trying to give the server longer to load.
|
|
7
|
+
|
|
8
|
+
@fast @al1
|
|
9
|
+
Scenario: I have two name parts
|
|
10
|
+
Given the max secs for each step is 120
|
|
11
|
+
Given I start the interview at "AL_tests"
|
|
12
|
+
And I set the name of "users[0]" to "Uli User"
|
|
13
|
+
And I tap to continue
|
|
14
|
+
And I set the address of "users[0]" to "120 Tremont Street, Unit 2, Boston, MA 02108"
|
|
15
|
+
And I tap to continue
|
|
16
|
+
And I set the name of "users[1]" to "Uli2 User2"
|
|
17
|
+
And I set the var "users[i].proxy_var" to "Mixed proxy var step test"
|
|
18
|
+
And I tap to continue
|
|
19
|
+
Then the question id should be "end"
|
|
20
|
+
|
|
21
|
+
@fast @al2
|
|
22
|
+
Scenario: I have three name parts
|
|
23
|
+
Given I start the interview at "AL_tests"
|
|
24
|
+
And I set the name of "users[0]" to "Uli Udo User"
|
|
25
|
+
And I tap to continue
|
|
26
|
+
And I set the address of "users[0]" to "120 Tremont Street, Unit 2, Boston, MA 02108"
|
|
27
|
+
And I tap to continue
|
|
28
|
+
And I set the name of "users[1]" to "Uli2 User2"
|
|
29
|
+
And I set the var "users[i].proxy_var" to "Mixed proxy var step test"
|
|
30
|
+
And I tap to continue
|
|
31
|
+
Then the question id should be "end"
|
|
32
|
+
|
|
33
|
+
@fast @al3
|
|
34
|
+
Scenario: I have four name parts
|
|
35
|
+
Given I start the interview at "AL_tests"
|
|
36
|
+
And I set the name of "users[0]" to "Uli Udo User Sr"
|
|
37
|
+
And I tap to continue
|
|
38
|
+
And I set the address of "users[0]" to "120 Tremont Street, Unit 2, Boston, MA 02108"
|
|
39
|
+
And I tap to continue
|
|
40
|
+
And I set the name of "users[1]" to "Uli2 User2"
|
|
41
|
+
And I set the var "users[i].proxy_var" to "Mixed proxy var step test"
|
|
42
|
+
And I tap to continue
|
|
43
|
+
Then the question id should be "end"
|
|
Binary file
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@establishing
|
|
2
|
+
Feature: Establishing steps
|
|
3
|
+
|
|
4
|
+
Steps that establish things about the state of the test
|
|
5
|
+
# In tag names, 'e' is for 'establishing'
|
|
6
|
+
|
|
7
|
+
@slow @e1 @wait
|
|
8
|
+
Scenario: I am able to set a custom wait time that allows steps to run longer than the half minute default
|
|
9
|
+
Given I start the interview at "all_tests"
|
|
10
|
+
And the max seconds for each step in this scenario is 40
|
|
11
|
+
And I wait 35 seconds
|
|
12
|
+
|
|
13
|
+
@slow @e2 @wait
|
|
14
|
+
Scenario: I am able to set a custom wait time before an interview has been loaded
|
|
15
|
+
Given the max seconds for each step in this scenario is 40
|
|
16
|
+
And I start the interview at "all_tests"
|
|
17
|
+
And I wait 35 seconds
|
|
18
|
+
|
|
19
|
+
@fast @e3 @urlargs
|
|
20
|
+
Scenario: Interview name includes url args
|
|
21
|
+
Given I start the interview at "url_args.yml&from=theinternets&random=zoo"
|
|
22
|
+
Then I should see the phrase "zoo"
|
|
23
|
+
|
|
24
|
+
@slow @e4 @wait_first
|
|
25
|
+
Scenario: I can wait as a first step in a test
|
|
26
|
+
Given I wait 1 second
|
|
27
|
+
|
|
28
|
+
@slow @e5 @wait_first
|
|
29
|
+
Scenario: Interview name includes url args with a wait
|
|
30
|
+
Given I wait 1 second
|
|
31
|
+
Then I start the interview at "url_args.yml&from=theinternets&random=zoo"
|
|
32
|
+
Then I should see the phrase "zoo"
|
|
33
|
+
|
|
34
|
+
@fast @e6 @signin
|
|
35
|
+
Scenario: I sign in
|
|
36
|
+
Given I sign in with the email "USER1_EMAIL" and the password "USER1_PASSWORD"
|
|
37
|
+
And I start the interview at "all_tests"
|
|
38
|
+
|
|
39
|
+
@fast @e7 @arbitraryurl
|
|
40
|
+
Scenario: I want to go to a full arbitrary url
|
|
41
|
+
Given the max seconds for each step in this scenario is 5
|
|
42
|
+
And the Scenario report should include:
|
|
43
|
+
"""
|
|
44
|
+
Trying to load the interview
|
|
45
|
+
"""
|
|
46
|
+
Given I start the interview at "https://apps-test.suffolklitlab.org/start/demo/questions"
|
|
47
|
+
Then I should see the phrase "What language do you speak?"
|
|
48
|
+
|
|
49
|
+
# WARNING: This Scenario may fail if the file moves or changes too much
|
|
50
|
+
@fast @failing @e8 @rfe8 @arbitraryurl
|
|
51
|
+
Scenario: Fail with no interview at arbitrary url
|
|
52
|
+
Given the final Scenario status should be "failed"
|
|
53
|
+
And the Scenario report should include:
|
|
54
|
+
"""
|
|
55
|
+
Trying to load the interview
|
|
56
|
+
"""
|
|
57
|
+
And the Scenario report should include:
|
|
58
|
+
"""
|
|
59
|
+
ALKiln could not find any interview question page
|
|
60
|
+
"""
|
|
61
|
+
And the max seconds for each step in this scenario is 5
|
|
62
|
+
Then I start the interview at "https://apps-test.suffolklitlab.org/list"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@example_feature_tag
|
|
2
|
+
Feature: An example test
|
|
3
|
+
|
|
4
|
+
The tests in this file should cover
|
|
5
|
+
- [x] Provide a template people can use to make their own tests.
|
|
6
|
+
- [ ] Direct people to more documentation.
|
|
7
|
+
- [ ] Find the ultimate question to life, the universe, and everything.
|
|
8
|
+
|
|
9
|
+
@example_scenario_tag
|
|
10
|
+
Scenario: Server finishes reloading
|
|
11
|
+
Given I start the interview at "test"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@filepaths
|
|
2
|
+
Feature: Filepaths lengths
|
|
3
|
+
|
|
4
|
+
# In tag names, 'fp' is for 'filepaths'
|
|
5
|
+
|
|
6
|
+
@fp1
|
|
7
|
+
Scenario: Longest filepath should be under 184 characters with scenario description cut off at 70 and question id cut off at 20
|
|
8
|
+
Given I start the interview at "test_longest_filepath.yml"
|
|
9
|
+
And I answer randomly for at most 3 pages
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@interactive
|
|
2
|
+
Feature: Interactive steps
|
|
3
|
+
|
|
4
|
+
# In tag names, 'i' is for 'interactive'
|
|
5
|
+
|
|
6
|
+
@slow @i1
|
|
7
|
+
Scenario: I set various values
|
|
8
|
+
Given I start the interview at "all_tests"
|
|
9
|
+
Then the question id should be "upload files"
|
|
10
|
+
When I set the var "upload_files_visible" to "some_png_1.png, some_png_2.png"
|
|
11
|
+
And I set the var "show_upload" to "True"
|
|
12
|
+
And I upload "some_png_2.png,some_png_1.png" to "upload_files_hidden"
|
|
13
|
+
And I tap to continue
|
|
14
|
+
# Next page
|
|
15
|
+
Then the question id should be "group of complex fields"
|
|
16
|
+
And I set the var "double_quote_dict['double_quote_key']['dq_two']" to "true"
|
|
17
|
+
And I set the var "single_quote_dict['single_quote_key']['sq_two']" to "true"
|
|
18
|
+
And I tap to continue
|
|
19
|
+
Then the question id should be "direct standard fields"
|
|
20
|
+
# Next page
|
|
21
|
+
When I set the var "checkboxes_yesno" to "True"
|
|
22
|
+
And I set the var "checkboxes_other['checkbox_other_opt_1']" to "true"
|
|
23
|
+
And I set the var "dropdown_test" to "dropdown_opt_2"
|
|
24
|
+
And I set the var "radio_yesno" to "False"
|
|
25
|
+
And I set the var "radio_other" to "radio_other_opt_3"
|
|
26
|
+
And I set the var "text_input" to "Regular text input field value"
|
|
27
|
+
And I set the var "textarea" to "Multiline text\narea value"
|
|
28
|
+
And I set the var "date_input" to "today - 1"
|
|
29
|
+
When I set the var "direct_standard_fields" to "True"
|
|
30
|
+
# Next page
|
|
31
|
+
Then the question id should be "showifs"
|
|
32
|
+
When I set the var "show_2" to "True"
|
|
33
|
+
And I set the var "show_3" to "True"
|
|
34
|
+
And I set the var "showif_checkbox_yesno" to "true"
|
|
35
|
+
And I set the var "showif_checkboxes_other['showif_checkboxes_nota_2']" to "true"
|
|
36
|
+
And I set the var "showif_checkboxes_other['showif_checkboxes_nota_3']" to "true"
|
|
37
|
+
And I set the var "showif_yesnoradio" to "True"
|
|
38
|
+
And I set the var "showif_radio_other" to "showif_radio_multi_2"
|
|
39
|
+
And I set the var "showif_text_input" to "Show if text input value"
|
|
40
|
+
And I set the var "showif_textarea" to "Show if\nmultiline text\narea value"
|
|
41
|
+
And I set the var "showif_dropdown" to "showif_dropdown_1"
|
|
42
|
+
When I tap to continue
|
|
43
|
+
# Next page
|
|
44
|
+
Then the question id should be "object checkboxes"
|
|
45
|
+
And I set the var "object_checkboxes_test['obj_chkbx_opt_1']" to "true"
|
|
46
|
+
And I set the var "object_dropdown" to "obj_opt_2"
|
|
47
|
+
When I tap to continue
|
|
48
|
+
# Next page
|
|
49
|
+
Then the question id should be "buttons yesnomaybe"
|
|
50
|
+
When I set the var "buttons_yesnomaybe" to "None"
|
|
51
|
+
# Next page
|
|
52
|
+
Then the question id should be "buttons other"
|
|
53
|
+
When I set the var "buttons_other" to "button_3"
|
|
54
|
+
# Next page
|
|
55
|
+
Then the question id should be "button continue"
|
|
56
|
+
When I set the var "button_continue" to "True"
|
|
57
|
+
# Next page
|
|
58
|
+
Then the question id should be "screen features"
|
|
59
|
+
When I tap to continue
|
|
60
|
+
# Next page
|
|
61
|
+
Then the question id should be "proxy vars"
|
|
62
|
+
When I set the var "x[i].name.first" to "Proxyname1"
|
|
63
|
+
And I tap to continue
|
|
64
|
+
# Next page
|
|
65
|
+
Then the question id should be "is there another generic"
|
|
66
|
+
When I set the var "x.there_is_another" to "True"
|
|
67
|
+
# Next page
|
|
68
|
+
Then the question id should be "proxy vars"
|
|
69
|
+
When I set the var "x[i].name.first" to "Proxyname2"
|
|
70
|
+
And I tap to continue
|
|
71
|
+
# Next page
|
|
72
|
+
Then the question id should be "is there another generic"
|
|
73
|
+
When I set the var "x.there_is_another" to "False"
|
|
74
|
+
# Next page
|
|
75
|
+
Then the question id should be "first signature"
|
|
76
|
+
When I sign
|
|
77
|
+
And I tap to continue
|
|
78
|
+
# Next page
|
|
79
|
+
Then the question id should be "second signature"
|
|
80
|
+
When I sign
|
|
81
|
+
And I tap to continue
|
|
82
|
+
# Next page
|
|
83
|
+
Then the question id should be "simple doc"
|
|
84
|
+
When I download "simple-doc.pdf"
|
|
85
|
+
And I tap to continue
|
|
86
|
+
# Next page
|
|
87
|
+
Then the question id should be "button event action"
|
|
88
|
+
And I tap to continue
|
|
89
|
+
# Next page
|
|
90
|
+
Then the question id should be "single-dropdown-field"
|
|
91
|
+
And I set the var "single_dropdown_field" to "email"
|
|
92
|
+
And I tap to continue
|
|
93
|
+
# Next page
|
|
94
|
+
Then the question id should be "the end"
|
|
95
|
+
|
|
96
|
+
@fast @i2 @secret
|
|
97
|
+
Scenario: handles settings from Github secrets
|
|
98
|
+
Given the final Scenario status should be "failed"
|
|
99
|
+
And the Scenario report should include:
|
|
100
|
+
"""
|
|
101
|
+
The GitHub SECRET "SECRET_NOT_THERE" doesn't exist
|
|
102
|
+
"""
|
|
103
|
+
Given I start the interview at "test_secret_vars"
|
|
104
|
+
When I set the var "first_text_entry" to the secret "SECRET_VAR1"
|
|
105
|
+
And I tap to continue
|
|
106
|
+
Then I see the phrase "secret-var1-value"
|
|
107
|
+
When I tap to continue
|
|
108
|
+
And I set the var "second_text_entry" to the github secret "SECRET_VAR2"
|
|
109
|
+
And I tap to continue
|
|
110
|
+
Then I see the phrase "secret-var2-value"
|
|
111
|
+
When I tap to continue
|
|
112
|
+
And I set the variable "third_text_entry" to secret "SECRET_NOT_THERE"
|
|
113
|
+
|
|
114
|
+
@i3 @tap-elements @tabs
|
|
115
|
+
Scenario: tap elements
|
|
116
|
+
Given I start the interview at "test_taps"
|
|
117
|
+
And I tap the "Tests-first_template-tab" tab
|
|
118
|
+
Then I see the phrase "Mechanics"
|
|
119
|
+
And I tap the "Tests-second_template-tab" tab
|
|
120
|
+
Then I see the phrase "villify"
|
|
121
|
+
And I tap the "Tests-third_template-tab" tab
|
|
122
|
+
Then I see the phrase "museum"
|
|
123
|
+
And I tap the "#special_event" element and wait 1 second
|
|
124
|
+
Then I see the phrase "Portishead"
|
|
125
|
+
|
|
126
|
+
@i4 @tap-elements @tabs @error
|
|
127
|
+
Scenario: tap element with an error
|
|
128
|
+
Given the final Scenario status should be "failed"
|
|
129
|
+
And the Scenario report should include:
|
|
130
|
+
"""
|
|
131
|
+
is there a typo?
|
|
132
|
+
"""
|
|
133
|
+
Given I start the interview at "test_taps"
|
|
134
|
+
And I tap the "Tests-not_there-tab" tab
|
|
135
|
+
|
|
136
|
+
@i5 @decoding-test @object-multiselect
|
|
137
|
+
Scenario: Base64 encoded corner cases are decoded correctly
|
|
138
|
+
Given I start the interview at "test_decoding"
|
|
139
|
+
And I get to "end screen" with this data:
|
|
140
|
+
| var | value | trigger |
|
|
141
|
+
| object_multiselect_test['obj_opt_1'] | True | |
|
|
142
|
+
| object_multiselect_test['obj_opt_3'] | True | |
|
|
143
|
+
| multiselect_test['hi'] | True | |
|
|
144
|
+
| multiselect_test['dear'] | True | |
|
|
145
|
+
| object_radio_field | object_radio_choice_one | |
|
|
146
|
+
| object_checkboxes_test['obj_chkbx_opt_1'] | True | |
|
|
147
|
+
| object_dropdown | obj_opt_2 | |
|
|
148
|
+
| checkbox_dict['single_quote_key']['🁳🧴🥫🅍🗎🗷🌲🯵'] | True | |
|
|
149
|
+
|
|
150
|
+
# This test should fail because it's target id is never found, but that also means
|
|
151
|
+
# it has succeeded because it didn't try to keep looking for the id by pressing 'restart'
|
|
152
|
+
# to continue.
|
|
153
|
+
@fast @i6
|
|
154
|
+
Scenario: Fails as it doesn't try to 'continue' with a restart button
|
|
155
|
+
Given the final Scenario status should be "failed"
|
|
156
|
+
And the Scenario report should include:
|
|
157
|
+
"""
|
|
158
|
+
The test got stuck on "kickout-screen"
|
|
159
|
+
"""
|
|
160
|
+
Given the max seconds for each step in this scenario is 10
|
|
161
|
+
Given I start the interview at "test_kickout"
|
|
162
|
+
And I get to "doesnt exist" with this data:
|
|
163
|
+
| var | value | trigger |
|
|
164
|
+
| user_choice | wrong | |
|
|
165
|
+
|
|
166
|
+
@fast @i7 @signature @screenshot
|
|
167
|
+
Scenario: I take a screenshot of the signature
|
|
168
|
+
Given I start the interview at "test_signature.yml"
|
|
169
|
+
When I sign with the name "David"
|
|
170
|
+
And I take a screenshot
|
|
171
|
+
Then I tap to continue
|
|
172
|
+
Then the question id should be "the end"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@langs
|
|
2
|
+
Feature: Multi-language tests
|
|
3
|
+
|
|
4
|
+
# Usually only run default test and skip or shorten others
|
|
5
|
+
# When commanded, run all non-default language tests
|
|
6
|
+
|
|
7
|
+
# We'll need to test these manually each time, as our users would,
|
|
8
|
+
# and check that the automatic tests didn't trigger the language
|
|
9
|
+
# tests
|
|
10
|
+
|
|
11
|
+
# Tag use examples:
|
|
12
|
+
# # No tags to test all languages
|
|
13
|
+
# @es # language tag to isolate one language
|
|
14
|
+
|
|
15
|
+
# The screenshot will help us check manually that the right stuff is
|
|
16
|
+
# going on
|
|
17
|
+
@l1
|
|
18
|
+
Scenario Outline: language url
|
|
19
|
+
Given I start the interview at "test_languages.yml<arg>"
|
|
20
|
+
Then I SHOULD see the phrase "<text>"
|
|
21
|
+
And I take a screenshot
|
|
22
|
+
|
|
23
|
+
@en
|
|
24
|
+
Examples: english
|
|
25
|
+
| arg | text |
|
|
26
|
+
| &new_session=1&lang=en | English page |
|
|
27
|
+
|
|
28
|
+
@es
|
|
29
|
+
Examples: spanish
|
|
30
|
+
| arg | text |
|
|
31
|
+
| &new_session=1&lang=es | Español page |
|
|
32
|
+
|
|
33
|
+
@ar
|
|
34
|
+
Examples: arabic
|
|
35
|
+
| arg | text |
|
|
36
|
+
| &new_session=1&lang=ar | عربي page |
|