Snap the routing graph of a song with the header's magnet (#350)
The routing of a song is the same graph editor as a sound FX, but its tab had no magnet, so its nodes could not be put on the grid. - The Song tab carries the magnet next to Routing. It is off at first and acts on the routing graph. - It is greyed out on the timeline, as Grid is greyed out in the routing. Switching the view only updates these two buttons, so a playing song is not handed its sequence again. - The check hooks give the magnet and the snapping of the routing. Tests: - e2e 65 (melektaus-atx): ALL PASSED, 52 checks (1 new) - Counter-check (magnet enabled on the timeline): exactly this check red - Gate (melektaus-atx): CHECK EXIT 0, 270 files, 4178 tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
668682c4ff
commit
8c0d1cfd3f
3 files changed
+32
-2
No files matched your search
@@ -890,9 +890,27 @@ export async function song(t) {
|
||||
song.tracks.forEach((track) => Object.assign(track, { mute: false, solo: false, fx: '' }));`);
|
||||
await evaluate(`__gm.state.openAsset(${JSON.stringify(id)})`);
|
||||
await sleep(200);
|
||||
const magnetOnTimeline = await json('__gm.song.routing.snapButton()');
|
||||
p = await json("__gm.song.viewAt('routing')");
|
||||
await click(p.x, p.y);
|
||||
await sleep(300);
|
||||
// The magnet is the routing's, as in every graph tab: off at first, greyed out on the timeline.
|
||||
const magnet = await json('__gm.song.routing.snapButton()');
|
||||
const snapOff = await json('__gm.song.routing.snapping()');
|
||||
await click(magnet.x, magnet.y);
|
||||
const snapOn = await json('__gm.song.routing.snapping()');
|
||||
const lit = (await json('__gm.song.routing.snapButton()')).toggled;
|
||||
await click(magnet.x, magnet.y);
|
||||
check(
|
||||
'the magnet in the header switches snapping in the routing on and off',
|
||||
!magnetOnTimeline.enabled &&
|
||||
magnet.enabled &&
|
||||
snapOff === false &&
|
||||
snapOn === true &&
|
||||
lit &&
|
||||
(await json('__gm.song.routing.snapping()')) === false,
|
||||
JSON.stringify({ magnetOnTimeline, magnet, snapOff, snapOn, lit }),
|
||||
);
|
||||
const routingOf = () => json(`__gm.song.routing.graph(${JSON.stringify(id)})`);
|
||||
// The tracks as they are now: more than in 65a.
|
||||
const ids = (await model()).tracks.map((track) => track.id);
|
||||
|
||||
Reference in new issue
Block a user