mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
desktop: fix tests on windows
This commit is contained in:
committed by
Abdullah Atta
parent
6d377ded9a
commit
00b62df2e8
@@ -19,12 +19,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
import { execSync } from "child_process";
|
import { execSync } from "child_process";
|
||||||
import { mkdir } from "fs/promises";
|
import { mkdir } from "fs/promises";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { _electron as electron } from "playwright";
|
import { _electron as electron } from "playwright";
|
||||||
import slugify from "slugify";
|
import slugify from "slugify";
|
||||||
import { TaskContext } from "vitest";
|
import { TaskContext } from "vitest";
|
||||||
|
|
||||||
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
const IS_DEBUG = process.env.NN_DEBUG === "true" || process.env.CI === "true";
|
const IS_DEBUG = process.env.NN_DEBUG === "true" || process.env.CI === "true";
|
||||||
|
|
||||||
interface AppContext {
|
interface AppContext {
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ async function createWindow() {
|
|||||||
const mainWindowState = new WindowState({});
|
const mainWindowState = new WindowState({});
|
||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
show: !cliOptions.hidden,
|
show: !cliOptions.hidden,
|
||||||
|
paintWhenInitiallyHidden: cliOptions.hidden,
|
||||||
|
skipTaskbar: cliOptions.hidden,
|
||||||
x: mainWindowState.x,
|
x: mainWindowState.x,
|
||||||
y: mainWindowState.y,
|
y: mainWindowState.y,
|
||||||
width: mainWindowState.width,
|
width: mainWindowState.width,
|
||||||
@@ -101,7 +103,10 @@ async function createWindow() {
|
|||||||
...(config.desktopSettings.nativeTitlebar
|
...(config.desktopSettings.nativeTitlebar
|
||||||
? {}
|
? {}
|
||||||
: {
|
: {
|
||||||
titleBarStyle: process.platform === "win32" || process.platform === "darwin" ? "hidden" : "default",
|
titleBarStyle:
|
||||||
|
process.platform === "win32" || process.platform === "darwin"
|
||||||
|
? "hidden"
|
||||||
|
: "default",
|
||||||
frame: process.platform === "win32" || process.platform === "darwin",
|
frame: process.platform === "win32" || process.platform === "darwin",
|
||||||
titleBarOverlay: {
|
titleBarOverlay: {
|
||||||
height: 37,
|
height: 37,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { defineConfig } from "vitest/config";
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
test: {
|
test: {
|
||||||
testTimeout: process.env.CI ? 120 * 1000 : 30 * 1000,
|
testTimeout: process.env.CI ? 120 * 1000 : 120 * 1000,
|
||||||
sequence: {
|
sequence: {
|
||||||
concurrent: true,
|
concurrent: true,
|
||||||
shuffle: true
|
shuffle: true
|
||||||
|
|||||||
Reference in New Issue
Block a user