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

Screen will not maximize the window if you first use resizeWindow #8360

Closed
Yastrenky opened this issue Jan 14, 2025 · 1 comment · Fixed by #8361
Closed

Screen will not maximize the window if you first use resizeWindow #8360

Yastrenky opened this issue Jan 14, 2025 · 1 comment · Fixed by #8361
Assignees
Labels
TYPE: bug The described behavior is considered as wrong (bug).

Comments

@Yastrenky
Copy link

What is your Scenario?

Using native automation enabled
Navigate to www.google.com
Use method resizeWindow
Use method maximizeWindow

What is the Current behavior?

When using native automation, testcafe won't maximize if you use the resize window method first

What is the Expected behavior?

Testcafe should maximize if you use the resize window method first in native automation

What is the public URL of the test page? (attach your complete example)

www.google.com

What is your TestCafe test code?

fixture('Resize and maximize window')

test('Use maximize window after resize' async t =>{
await t.navigateTo("https://www.google.com")
await t.resizeWindow(1024, 400)
await t.maximizeWindow()
})

Your complete configuration file

No response

Your complete test report

No response

Screenshots

Image

Steps to Reproduce

TestCafe version

3.7.1

Node.js version

v20.15.0

Command-line arguments

testcafe chrome

Browser name(s) and version(s)

Chrome Version 131.0.6778.265

Platform(s) and version(s)

MacOs Sonoma Version 14.3.1 (23D60)

Other

No response

@Yastrenky Yastrenky added the TYPE: bug The described behavior is considered as wrong (bug). label Jan 14, 2025
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 14, 2025
@Yastrenky Yastrenky changed the title Screen will not maximize the window if you use resizeWindow first Screen will not maximize the window if you first use resizeWindow Jan 14, 2025
@aleks-pro aleks-pro added the STATE: Issue accepted An issue has been reproduced. label Jan 16, 2025
Copy link

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: Issue accepted An issue has been reproduced. labels Jan 16, 2025
@Bayheck Bayheck self-assigned this Jan 16, 2025
Bayheck added a commit that referenced this issue Jan 24, 2025
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->

## Purpose
Window did not maximize properly after resizing. 

## Approach
Remove redundant use of _setDeviceMetricsOverride in resize window using
CDP.

## References
closes #8360

## Pre-Merge TODO
- [ ] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail

---------

Co-authored-by: Bayheck <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants