fix(KAN-71): correct Apple navigation gestures and scroll bounds
CI/CD / preconditions (pull_request) Successful in 2s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 1m4s
macOS checks / Native Rust tests and unsigned build (pull_request) Successful in 1m31s
CI/CD / test_and_check_app (pull_request) Successful in 6m44s
CI/CD / Publish immutable image (pull_request) Skipped
CI/CD / preconditions (pull_request) Successful in 2s
Native JavaScript checks / Native launcher and release tests (pull_request) Successful in 1m4s
macOS checks / Native Rust tests and unsigned build (pull_request) Successful in 1m31s
CI/CD / test_and_check_app (pull_request) Successful in 6m44s
CI/CD / Publish immutable image (pull_request) Skipped
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
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(
|
||||
'AppKit gestures preserve single steps, cancellation, system preferences and scroll ownership',
|
||||
{ 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: AppKit/);
|
||||
} finally {
|
||||
rmSync(directory, { recursive: true, force: true });
|
||||
}
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user