Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run some webUI tests with mobile-sized browser #38759

Closed
phil-davis opened this issue May 20, 2021 · 4 comments
Closed

Run some webUI tests with mobile-sized browser #38759

phil-davis opened this issue May 20, 2021 · 4 comments
Assignees
Labels

Comments

@phil-davis
Copy link
Contributor

phil-davis commented May 20, 2021

PR #38748 adjusts some UI elements for smaller screens. We could run some webUI test scenarios on a smaller browser window to know if they work OK. We do not want to "explode" CI by running all UI test scenarios! Maybe just run smokeTest scenarios.

See my comment #38748 (comment)

Hint: The Behat-Mink-Selenium stack allows resizing the browser:

$this->getSession()->resizeWindow(375, 812, 'current');
@sakshamgurung
Copy link
Contributor

sakshamgurung commented Sep 1, 2021

@individual-it
Right now I am using the suggested code $this->getSession()->resizeWindow(375, 812, 'current') under @BeforeScenario tagged function in WebUIFilesContext.php and running test suite with BEHAT_FILTER_TAGS=@smokeTest. It runs well for any test that uses WebUIFilesContext.php. Now, the question is

  • How to run test, once for all test in full resolution and once for all @smokeTest test in mobile size resolution in local and ci.
  • Is there a better location to place the resize code to support the above point.

@individual-it
Copy link
Member

@sakshamgurung you can create an extra tag for small resolutions and run $this->getSession()->resizeWindow(375, 812, 'current') in a BeforeScenario that is only for that resolution

or you use the EXTRA_CAPABILITIES='"screenResolution":"375x812" environment variable, see

EXTRA_CAPABILITIES='"screenResolution":"1920x1080",'

Then you should not need any resizeWindow at all

@individual-it
Copy link
Member

I just tried using the EXTRA_CAPABILITIES and it seems not to work :-(

@saw-jan
Copy link
Member

saw-jan commented Oct 18, 2021

Closing the issue. as PR #39161 has been merged

@saw-jan saw-jan closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants