`.maximizeWindow()` not working on M1 Mac
See original GitHub issueWhat is your Scenario?
We have a fixure that maximizes the window before each test run. It was working fine in testcafe 1.17.1
and now it isn’t working on 1.18.1
.
What is the Current behavior?
Using the chrome
browser:
Starting on an extended display: The browser opens up like normal and then once it hits the .maximizeWindow()
command the browser moves over to the main display and resizes to the mobile aspect ratio.
Starting on the main display: The browser opens up like normal and then once it hits the .maximizeWindow()
command the browser disappears even though the test continues to run.
What is the Expected behavior?
Using the chrome
browser:
The active window will maximize properly.
What is your public website URL? (or attach your complete example)
www.google.com
What is your TestCafe test code?
import { Selector, t } from 'testcafe'
fixture `test`
.page `www.google.com`
.beforeEach(async t => {
await t.maximizeWindow()
})
test
('user_is_able_to_search_for_clickfunnels', async t => {
await t
.typeText(Selector('input').withAttribute('name', 'q'), 'ClickFunnels')
.pressKey('enter')
.expect(Selector('a').withText('ClickFunnels').visible).ok()
})
Your complete configuration file
let filtered_tests = [
// Located in editor_page_tests.js
'user_is_able_to_add_a_section_column_row_and_element_to_editor',
'pop_up_element_displays_during_page_preview',
'clicking_button_shows_hides_elements',
'user_is_able_to_save_when_adding_a_video',
'user_is_able_to_save_when_leaving_video_embed_blank',
// Located in courses_page_tests.js
'user_can_preview_existing_course',
'optin_user_can_navigate_through_course',
'manually_added_user_can_navigate_through_course',
// Located in funnels_page_tests.js
'user_can_navigate_through_funnel',
// Located in developer_portal_page_tests.js
'user_can_navigate_to_developer_portal_page',
// Located in members_page_tests.js
'user_can_navigate_to_team_members_page',
// Located in teams_dashboard_pages_tests.js
'user_can_navigate_to_team_dashboard_page',
// Located in workspaces_page_tests.js
'user_can_navigate_to_team_workspaces_page'
]
let isolated_tests = [
// Located in sites_overview_page_tests.js
'user_can_make_site_public',
'user_can_edit_site_name',
'user_can_make_site_password_protected',
'user_can_make_site_private',
'user_can_edit_site_domain',
'changing_site_domain_updates_funnel_urls',
// Located in account_details_page_tests.js
'user_can_edit_account_name',
// Located in account_details_page_tests.js
'user_can_edit_account_password',
// Located in general_page_tests.js
'user_can_edit_workspace_details'
]
let full_filter = filtered_tests.concat(isolated_tests)
let build_filter = () => {
// Purpose: To set the suite that we want to run. (Sanity, Smoke, Regression)
var filter = {}
if(process.env.SCOPE) {
filter = {
testGrep: `^(?!.*(${filtered_tests.join('|')})).*$`,
testMeta: {
scope: process.env.SCOPE
}
}
} else {
filter = {
testGrep: `^(?!.*(${full_filter.join('|')})).*$`
}
}
return filter
}
let determine_concurrency = () => {
// Purpose: To set concurrency dependant on the scope that is passed
let concurrency = 5
if (process.env.SCOPE == 'isolated') {
concurrency = 1
}
return concurrency
}
module.exports = {
assertionTimeout: 5000,
browsers: [
"chrome:headless --window-size=1920,1159"
],
concurrency: determine_concurrency(),
cache: true,
clientScripts: "scripts/hide_notifications.js",
pageLoadTimeout: 30000,
filter: build_filter(),
quarantineMode: {
successThreshold: 1,
attemptLimit: 3
},
reporter: [
{
name: "spec",
output: "artifacts/reports/spec_results"
},
{
name: "xunit",
output: "artifacts/reports/xunit_results.xml"
}
],
screenshots: {
path: "artifacts/screenshots",
pathPattern: "${TEST}_${DATE}_${TIME}.png",
takeOnFails: true,
thumbnails: false
},
selectorTimeout: 5000,
skipJsErrors: true,
skipUncaughtErrors: true,
src: "tests/**",
videoEncodingOptions: {
aspect: "16:9",
framerate: 30
},
videoOptions: {
failedOnly: true,
pathPattern: "${TEST}_${DATE}_${TIME}.mp4",
singleFile: false
},
videoPath: "artifacts/recordings"
}
Your complete test report
Running tests in:
- Chrome 97.0.4692.71 / macOS 10.15.7
editor
✓ user_is_able_search_for_clickfunnels
1 passed (8s)
Warnings (3):
--
The "browsers", "concurrency", and "filter" options from the configuration
file will be ignored.
--
Video recording is not supported by the "chrome --window-size=1920,1159"
browser.
--
The browser window was resized during the
"user_is_able_search_for_clickfunnels" test while TestCafe recorded a
video. TestCafe cannot adjust the video resolution during recording. As a
result, the video content may appear broken. Do not resize the browser
window when TestCafe records a video.
Screenshots
Starting on an extended display: https://d.pr/v/7C0BDT Starting on the main display: https://d.pr/v/Z0PrJG
Steps to Reproduce
- Use a Mac with M1
- Run the test code
TestCafe version
1.18.1
Node.js version
17.2.0
Command-line arguments
testcafe chrome -t ‘user_is_able_to_search_for_clickfunnels’ -c1
Browser name(s) and version(s)
Chrome 97.0.4692.71
Platform(s) and version(s)
macOS 12.0.1
Other
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top GitHub Comments
This issue should be fixed in testcafe@v1.18.6. If you still can reproduce it with the latest TestCafe version, please let me know and I will reopen the issue.
Hi,
We have reproduced the issue. Please stay tuned.