mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-22 16:46:10 -08:00
Controller: subtitle line actions, Button Style, keyboard-only mode pause, Alt+C fixes (#316)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
6d0f37ac21
commit
b99409bbcd
60 files changed
+1900
-219
No files matched your search
@@ -2216,6 +2216,34 @@ test('parses controller face button labels and warns on unknown styles', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('controller profiles inherit the button style unless they set their own', () => {
|
||||
const dir = makeTempDir();
|
||||
fs.writeFileSync(
|
||||
path.join(dir, 'config.jsonc'),
|
||||
JSON.stringify({
|
||||
controller: {
|
||||
faceButtonLabels: 'nintendo',
|
||||
profiles: {
|
||||
'pad-ps': { faceButtonLabels: 'playstation' },
|
||||
'pad-plain': { label: 'Plain' },
|
||||
'pad-bad': { faceButtonLabels: 'sega' },
|
||||
},
|
||||
},
|
||||
}),
|
||||
'utf-8',
|
||||
);
|
||||
const service = new ConfigService(dir);
|
||||
const { profiles } = service.getConfig().controller;
|
||||
|
||||
assert.equal(profiles['pad-ps']!.faceButtonLabels, 'playstation');
|
||||
assert.equal(profiles['pad-plain']!.faceButtonLabels, 'nintendo');
|
||||
assert.equal(profiles['pad-bad']!.faceButtonLabels, 'nintendo');
|
||||
assert.deepEqual(
|
||||
service.getWarnings().map((warning) => warning.path),
|
||||
['controller.profiles.pad-bad.faceButtonLabels'],
|
||||
);
|
||||
});
|
||||
|
||||
test('parses controller review bindings globally and per profile, and warns on bad entries', () => {
|
||||
const dir = makeTempDir();
|
||||
fs.writeFileSync(
|
||||
|
||||
Reference in new issue
Block a user