CI/CD / preconditions (pull_request) Successful in 1s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 1m13s
macOS checks / Native Rust tests and unsigned build (pull_request) Successful in 1m44s
CI/CD / test_and_check_app (pull_request) Successful in 7m4s
CI/CD / Publish immutable image (pull_request) Skipped
59 lines
1.9 KiB
JavaScript
59 lines
1.9 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { spawnSync } from 'node:child_process';
|
|
import { mkdtempSync, rmSync } from 'node:fs';
|
|
import { tmpdir } from 'node:os';
|
|
import { join } from 'node:path';
|
|
import process from 'node:process';
|
|
import test from 'node:test';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
test(
|
|
'WebKit owns interactive navigation and preserves native back/forward history',
|
|
{ skip: process.platform !== 'darwin' },
|
|
() => {
|
|
const directory = mkdtempSync(join(tmpdir(), 'kanbangit-navigation-'));
|
|
const binary = join(directory, 'navigation-test');
|
|
try {
|
|
const compile = spawnSync(
|
|
'xcrun',
|
|
[
|
|
'--sdk',
|
|
'macosx',
|
|
'clang',
|
|
'-fobjc-arc',
|
|
'-fblocks',
|
|
'-Wall',
|
|
'-Werror',
|
|
'-framework',
|
|
'AppKit',
|
|
'-framework',
|
|
'WebKit',
|
|
fileURLToPath(
|
|
new URL('./navigation-macos.m', import.meta.url),
|
|
),
|
|
'-o',
|
|
binary,
|
|
],
|
|
{ encoding: 'utf8', timeout: 30000 },
|
|
);
|
|
assert.equal(
|
|
compile.status,
|
|
0,
|
|
compile.stderr || compile.error?.message,
|
|
);
|
|
const result = spawnSync(binary, [], {
|
|
encoding: 'utf8',
|
|
timeout: 30000,
|
|
});
|
|
assert.equal(
|
|
result.status,
|
|
0,
|
|
result.stderr || result.error?.message,
|
|
);
|
|
assert.match(result.stdout, /PASS: WebKit/);
|
|
} finally {
|
|
rmSync(directory, { recursive: true, force: true });
|
|
}
|
|
},
|
|
);
|