Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

Commit

Permalink
Added step description for screen size.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk authored Jun 21, 2018
1 parent 7205edf commit a2084ba
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions behat.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default:
autoload: [ %paths.base%/tests/behat/features/bootstrap ]
autoload: [ %paths.base%/tests/behat/bootstrap ]
suites:
default:
paths: [ %paths.base%/tests/behat/features ]
Expand All @@ -15,7 +15,7 @@ default:
Behat\MinkExtension:
base_url: "http://localhost:8888/"
browser_name: chrome
files_path: ./features/fixtures
files_path: ./fixtures
default_session: selenium2
goutte: ~
selenium2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public function setJqueryVersion($version)
*
* @Given /^I am viewing the site on a ([a-zA-Z0-9\s,_]+) screen$/
* @Given /^I am viewing the site on a ([a-zA-Z0-9\s,_]+) device$/
* @Given /^I am viewing the site on a "(?P<screen>[^"]*)" screen$/
* @Given /^I am viewing the site on a "(?P<screen>[^"]*)" device$/
*/
public function iAmViewingTheSiteOnScreen($screen)
{
Expand Down
11 changes: 11 additions & 0 deletions tests/behat/features/screen_resize.feature
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ Feature: Behat relative assertions work using breakpoints
And I see top, main and left above bottom
Then I save screenshot

@javascript @phpserver
Scenario Outline: Scenario Outline can be used to resize screen.
Given I am viewing the site on a "<screen_size>" device
When I am on the test page
Then I see top above main
And I see bottom below main
Examples:
| screen_size |
| desktop |
| desktop_large |

@javascript @phpserver
Scenario: Viewport size is calculated correctly when screen is resized.
Given I am viewing the site on a desktop device
Expand Down

0 comments on commit a2084ba

Please sign in to comment.