air_test 0.1.5.5 β 0.1.5.7
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.
- checksums.yaml +4 -4
- data/README.md +41 -22
- data/lib/air_test/notion_parser.rb +6 -6
- data/lib/air_test/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8174f558c0b41c33acc6d4a468ad38c36e621c188a6ea022b7dc2ae500fcee3c
|
4
|
+
data.tar.gz: d84cc877b0841689de2f62e7055b68955fcf7352bbda10f65cc60969f959a1ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2089f266b3606af5c05f5153305a56e1e695391642c3b5775c81ba55b8d4752748628d74ec6e30f3a3b0df0d02cd2aca856fcf8b8d4350eaaa0fc3833b9cb44
|
7
|
+
data.tar.gz: c41e1ca2dfeb4e694126276a262dded5e62e1e0252024ecca5a6a9cbcb46a39d61e80754a0488cfee83b4e844604bba1362ad790e1f009b83df30f48b7e75b1f
|
data/README.md
CHANGED
@@ -49,6 +49,47 @@ Make sure your environment variables are set (in `.env`, your shell, or your CI/
|
|
49
49
|
|
50
50
|
---
|
51
51
|
|
52
|
+
## π Creating Notion Tickets with Gherkin Format
|
53
|
+
|
54
|
+
To ensure that your Notion tickets are compatible with the air_test automation, follow these guidelines when creating your tickets:
|
55
|
+
|
56
|
+
### 1. Create a New Page in Notion
|
57
|
+
|
58
|
+
- Start by creating a new page in your Notion workspace for each ticket.
|
59
|
+
|
60
|
+
### 2. Use the Gherkin Syntax
|
61
|
+
|
62
|
+
- Each ticket should follow the Gherkin syntax, which includes the following keywords:
|
63
|
+
- **Feature**: A high-level description of the feature being implemented.
|
64
|
+
- **Scenario**: A specific situation or case that describes how the feature should behave.
|
65
|
+
- **Given**: The initial context or state before the scenario starts.
|
66
|
+
- **When**: The action that triggers the scenario.
|
67
|
+
- **Then**: The expected outcome or result of the action.
|
68
|
+
|
69
|
+
### 3. Example Structure
|
70
|
+
|
71
|
+
Hereβs an example of how to structure a ticket in Notion:
|
72
|
+
|
73
|
+
Feature: User Login
|
74
|
+
Scenario: Successful login with valid credentials
|
75
|
+
Given the user is on the login page
|
76
|
+
When the user enters valid credentials
|
77
|
+
Then the user should be redirected to the dashboard
|
78
|
+
Scenario: Unsuccessful login with invalid credentials
|
79
|
+
Given the user is on the login page
|
80
|
+
When the user enters invalid credentials
|
81
|
+
Then an error message should be displayed
|
82
|
+
|
83
|
+
### 4. Additional Tips
|
84
|
+
|
85
|
+
- Ensure that each ticket is clearly titled and contains all necessary scenarios.
|
86
|
+
- Use bullet points or toggle lists in Notion to organize multiple scenarios under a single feature.
|
87
|
+
- Make sure to keep the Gherkin syntax consistent across all tickets for better parsing.
|
88
|
+
|
89
|
+
By following these guidelines, you can create Notion tickets that are ready to be parsed by the air_test automation tool.
|
90
|
+
|
91
|
+
---
|
92
|
+
|
52
93
|
## π Usage
|
53
94
|
|
54
95
|
Run the automated workflow from your Rails project terminal:
|
@@ -74,17 +115,6 @@ bundle exec rake air_test:generate_specs_from_notion
|
|
74
115
|
|
75
116
|
---
|
76
117
|
|
77
|
-
## π§© Gem Structure
|
78
|
-
|
79
|
-
- `lib/air_test/configuration.rb`: centralized configuration
|
80
|
-
- `lib/air_test/notion_parser.rb`: Notion extraction and parsing
|
81
|
-
- `lib/air_test/spec_generator.rb`: spec and step file generation
|
82
|
-
- `lib/air_test/github_client.rb`: git and GitHub PR management
|
83
|
-
- `lib/air_test/runner.rb`: workflow orchestrator
|
84
|
-
- `lib/tasks/air_test.rake`: Rake task to launch the automation
|
85
|
-
|
86
|
-
---
|
87
|
-
|
88
118
|
## π Example .env
|
89
119
|
|
90
120
|
```
|
@@ -103,17 +133,6 @@ GITHUB_BOT_TOKEN=ghp_xxx
|
|
103
133
|
|
104
134
|
---
|
105
135
|
|
106
|
-
## π¦ Publishing the Gem (optional)
|
107
|
-
|
108
|
-
To publish the gem on RubyGems:
|
109
|
-
|
110
|
-
```sh
|
111
|
-
gem build air_test.gemspec
|
112
|
-
gem push air_test-x.y.z.gem
|
113
|
-
```
|
114
|
-
|
115
|
-
---
|
116
|
-
|
117
136
|
## π¨βπ» Author & License
|
118
137
|
|
119
138
|
- Author: [Airtest]
|
@@ -26,15 +26,15 @@ module AirTest
|
|
26
26
|
|
27
27
|
def parse_ticket_content(page_id)
|
28
28
|
blocks = get_page_content(page_id)
|
29
|
-
puts "\n===== RAW NOTION BLOCKS ====="
|
30
|
-
puts JSON.pretty_generate(blocks)
|
29
|
+
# puts "\n===== RAW NOTION BLOCKS ====="
|
30
|
+
# puts JSON.pretty_generate(blocks)
|
31
31
|
return nil unless blocks
|
32
32
|
normalized_blocks = normalize_blocks(blocks)
|
33
|
-
puts "\n===== NORMALIZED BLOCKS ====="
|
34
|
-
puts JSON.pretty_generate(normalized_blocks)
|
33
|
+
# puts "\n===== NORMALIZED BLOCKS ====="
|
34
|
+
# puts JSON.pretty_generate(normalized_blocks)
|
35
35
|
parsed_data = parse_content(normalized_blocks)
|
36
|
-
puts "\n===== PARSED DATA ====="
|
37
|
-
puts JSON.pretty_generate(parsed_data)
|
36
|
+
# puts "\n===== PARSED DATA ====="
|
37
|
+
# puts JSON.pretty_generate(parsed_data)
|
38
38
|
parsed_data
|
39
39
|
end
|
40
40
|
|
data/lib/air_test/version.rb
CHANGED