Skip to content

Commit 2fb7627

Browse files
authored
Improved Behat tests with correct Gherkin structure and JS screenshot probing. (#2447)
1 parent b6e739e commit 2fb7627

4 files changed

Lines changed: 18 additions & 14 deletions

File tree

.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/behat/features/behat.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Behat configuration
55
I want to ensure Behat is properly configured
66
So that behavioral tests can run successfully across all environments
77

8-
@api
8+
@api @javascript
99
Scenario: Screenshot functionality works
1010
Given I am an anonymous user
1111
When I am on the homepage

.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/behat/features/homepage.feature

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ Feature: Homepage
77

88
@api
99
Scenario: Anonymous user visits homepage
10-
Given I go to the homepage
11-
And the path should be "<front>"
12-
Then I save screenshot
10+
Given I am an anonymous user
11+
When I go to the homepage
12+
Then the path should be "<front>"
13+
And I save screenshot
1314

1415
@api @javascript
1516
Scenario: Anonymous user visits homepage using a real browser
16-
Given I go to the homepage
17-
And the path should be "<front>"
18-
Then I save screenshot
17+
Given I am an anonymous user
18+
When I go to the homepage
19+
Then the path should be "<front>"
20+
And I save screenshot

tests/behat/features/behat.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Behat configuration
55
I want to ensure Behat is properly configured
66
So that behavioral tests can run successfully across all environments
77

8-
@api
8+
@api @javascript
99
Scenario: Screenshot functionality works
1010
Given I am an anonymous user
1111
When I am on the homepage

tests/behat/features/homepage.feature

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ Feature: Homepage
77

88
@api
99
Scenario: Anonymous user visits homepage
10-
Given I go to the homepage
11-
And the path should be "<front>"
12-
Then I save screenshot
10+
Given I am an anonymous user
11+
When I go to the homepage
12+
Then the path should be "<front>"
13+
And I save screenshot
1314

1415
@api @javascript
1516
Scenario: Anonymous user visits homepage using a real browser
16-
Given I go to the homepage
17-
And the path should be "<front>"
18-
Then I save screenshot
17+
Given I am an anonymous user
18+
When I go to the homepage
19+
Then the path should be "<front>"
20+
And I save screenshot

0 commit comments

Comments
 (0)