mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-04 14:00:22 -05:00
fix: update userChrome.css to correctly hide the toolbox in firefox (#30728)
This commit is contained in:
@@ -180,25 +180,6 @@ export const normalizeStdout = function (str: string, options: any = {}) {
|
||||
str = str.split('\n').filter((line) => !line.includes(wdsFailedMsg)).join('\n')
|
||||
}
|
||||
|
||||
// in Firefox 130, height dimensions are off by 1 pixel in CI, so we need to fix the offset to match common snapshots
|
||||
if (options.browser === 'firefox' && process.env.CI) {
|
||||
const dimensionRegex = new RegExp(/(\((?<width>\d+)x(?<height>\d+)\))/g)
|
||||
|
||||
const matches = dimensionRegex.exec(str)
|
||||
|
||||
if (matches?.groups?.height && matches?.groups?.width) {
|
||||
const height = parseInt(matches?.groups?.height)
|
||||
|
||||
// only happens on default height for whatever reason in firefox 130...
|
||||
if (height === 719) {
|
||||
const expectedHeight = height + 1
|
||||
const expectedWidth = matches?.groups?.width
|
||||
|
||||
str = str.replaceAll(`(${expectedWidth}x${height})`, `(${expectedWidth}x${expectedHeight})`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (options.sanitizeScreenshotDimensions) {
|
||||
// screenshot dimensions
|
||||
str = str.replace(/(\(\d+x\d+\))/g, replaceScreenshotDims)
|
||||
|
||||
@@ -3,12 +3,7 @@ module.exports = {
|
||||
if (config.env['NO_RESIZE']) return
|
||||
|
||||
if (browser.family === 'firefox') {
|
||||
// this is needed to ensure correct error screenshot / video recording
|
||||
// resolution of exactly 1280x720
|
||||
// (height must account for firefox url bar, which we can only shrink to 2px)
|
||||
options.args.push(
|
||||
'-width', '1280', '-height', '722',
|
||||
)
|
||||
options.args.push('-width', '1280', '-height', '720')
|
||||
} else if (browser.name === 'electron') {
|
||||
options.preferences.width = 1280
|
||||
options.preferences.height = 720
|
||||
|
||||
Reference in New Issue
Block a user