25 lines
1.3 KiB
JavaScript
25 lines
1.3 KiB
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { readFile } from 'node:fs/promises';
|
|
|
|
test('changed file list has an independently scrollable bounded layout', async () => {
|
|
const css = await readFile(new URL('../src/renderer/styles.css', import.meta.url), 'utf8');
|
|
assert.match(css, /\.main-canvas\.repository-canvas\s*\{[^}]*overflow:\s*hidden/);
|
|
assert.match(css, /\.file-panel\s*\{[^}]*min-height:\s*0[^}]*overflow:\s*hidden/);
|
|
assert.match(css, /\.file-list\s*\{[^}]*flex:\s*1 1 auto[^}]*overflow-y:\s*auto/);
|
|
});
|
|
|
|
test('commit workflow explains every disabled prerequisite', async () => {
|
|
const renderer = await readFile(new URL('../src/renderer/app.js', import.meta.url), 'utf8');
|
|
assert.match(renderer, /Commit message <span class="required-mark">required/);
|
|
assert.match(renderer, /Enter a commit message to enable commit and push/);
|
|
assert.match(renderer, /ForgeFlow stages the selected files automatically/);
|
|
assert.match(renderer, /Commit selected & push to Gitea/);
|
|
});
|
|
|
|
test('ITWorx branding is integrated into titlebar and setup', async () => {
|
|
const renderer = await readFile(new URL('../src/renderer/app.js', import.meta.url), 'utf8');
|
|
assert.match(renderer, /itworx-mark\.png/);
|
|
assert.match(renderer, /itworx-wordmark\.png/);
|
|
});
|