-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.feature
52 lines (42 loc) · 2.52 KB
/
variables.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@demo
Feature: Variable handling
These scenarios explore the possible variables the infrastructure offers
Scenario: Working with this / entities variables
Given I work with the entire json user list
And from this json user list, I work with the json user with fields: [email protected]
Then The variable ${this_json_user.name} equals Ervin Howell
And The variable ${entities_json_user_1.name} equals Ervin Howell
Scenario: Working with this / entities variables
Given I work with the entire json user list
And from this json user list, I work with the json user with fields: [email protected]
Then The variable ${this_json_user.name} equals Ervin Howell
And The variable ${entities_json_user_1.name} equals Ervin Howell
Scenario: Working with math variables
Given I work with the json user list with fields: [email protected]
Then This json user list has fields: length = ${=_10 - 3*3}
Scenario: Working with random variables
Given I create a demo entity with fields: number = ${random_10_30}
And I work with a demo entity with fields: id = ${this_demo_entity.id}
Then This demo entity has fields: number = ${this_random}
Scenario: Working with date variables - 1 of 2
Given I create a demo entity with fields: date = ${date_13/12/2000_-5_days_+5_months_format_DD-MM-YY}
And I work with a demo entity with fields: id = ${this_demo_entity.id}
Then This demo entity has fields: date = 08-05-01
Scenario: Working with date variables - 2 of 2
Given I create a demo entity with fields: date = ${date_now_format_YYYY}
And I work with a demo entity with fields: id = ${this_demo_entity.id}
Then This demo entity has fields: date = 2019
Scenario: Working with global variables - 1 of 2
Given I set the global variable variableData to thing
Scenario: Working with global variables - 2 of 2
Given I create a demo entity with fields: data = ${global_variableData}
And I work with a demo entity with fields: id = ${this_demo_entity.id}
Then This demo entity has fields: data = thing
Scenario: Working with regexp variables
Given I create a demo entity with fields: number = ${random_10_99}
And I work with a demo entity with fields: id = ${this_demo_entity.id}
Then This demo entity has fields: number = ${/\d\d/}
Scenario: Working with array variables
Given I create a demo entity with fields: data = ${[a, b]}
And I work with a demo entity with fields: id = ${this_demo_entity.id}
Then This demo entity has fields: data.0 = a