test: draggable region allows moving window (#41127)
* chore: add nut.js * test: dragging window updates position * instantly move mouse position * limit platforms to run drag tests on * defer loading nut-js
This commit is contained in:
parent
fb88375ab4
commit
85bebfb180
4 changed files with 841 additions and 6 deletions
|
@ -91,3 +91,16 @@ export const areColorsSimilar = (
|
|||
const distance = colorDistance(hexColorA, hexColorB);
|
||||
return distance <= distanceThreshold;
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether the current VM has a valid screen which can be used to capture.
|
||||
*
|
||||
* This is specific to Electron's CI test runners.
|
||||
* - Linux: virtual screen display is 0x0
|
||||
* - Win32 arm64 (WOA): virtual screen display is 0x0
|
||||
* - Win32 ia32: skipped
|
||||
*/
|
||||
export const hasCapturableScreen = () => {
|
||||
return process.platform === 'darwin' ||
|
||||
(process.platform === 'win32' && process.arch === 'x64');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue