Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(music-video): Suno Max Mode + live-DOM option steps; drop duplicate empty-state buttons

Claudee2ba1e4045ee
diff --git a/client/src/components/musicVideo/AutonomousStartDrawer.jsx b/client/src/components/musicVideo/AutonomousStartDrawer.jsx
index 5307e87e84..955cecbced 100644
--- a/client/src/components/musicVideo/AutonomousStartDrawer.jsx
+++ b/client/src/components/musicVideo/AutonomousStartDrawer.jsx
@@ -103,7 +103,15 @@ export default function AutonomousStartDrawer({ open, onClose, onStarted }) {
<div>
<label htmlFor="mv-auto-suno-model" className="block text-xs text-port-text-muted mb-1">Suno model</label>
<input id="mv-auto-suno-model" type="text" maxLength={10} value={draft.suno.model} onChange={(e) => patchSuno({ model: e.target.value })} placeholder="Current (e.g. v6)" aria-invalid={!sunoModelValid} className={inputClass} />
- {!sunoModelValid && <p className="text-[11px] text-port-error mt-1">Use a version such as v6 or v4.5.</p>}
+ {!sunoModelValid && <p className="text-[11px] text-port-error mt-1">Use a version such as v6 or v6-wild.</p>}
+ </div>
+ <div>
+ <label htmlFor="mv-auto-suno-max" className="block text-xs text-port-text-muted mb-1">Max Mode</label>
+ <select id="mv-auto-suno-max" value={draft.suno.maxMode} onChange={(e) => patchSuno({ maxMode: e.target.value })} className={inputClass}>
+ <option value="">Suno decides</option>
+ <option value="on">On (higher quality, more credits)</option>
+ <option value="off">Off</option>
+ </select>
</div>
</div>
)}
diff --git a/client/src/lib/musicVideoAutonomous.js b/client/src/lib/musicVideoAutonomous.js
index 1163361cf3..6ca30a490a 100644
--- a/client/src/lib/musicVideoAutonomous.js
+++ b/client/src/lib/musicVideoAutonomous.js
@@ -41,7 +41,7 @@ export const emptyAutonomousDraft = () => ({
checkpoints: [],
moodBoardId: '',
// Suno's Advanced-form options; blank leaves that control as Suno has it.
- suno: { excludeStyles: '', vocalGender: '', model: '' },
+ suno: { excludeStyles: '', vocalGender: '', model: '', maxMode: '' },
});
/** A blank model is fine (Suno's current one); anything else must name a version such as v6. */
@@ -55,6 +55,7 @@ function sunoRequestFromDraft(suno = {}) {
...(excludeStyles ? { excludeStyles } : {}),
...(suno.vocalGender ? { vocalGender: suno.vocalGender } : {}),
...(model ? { model } : {}),
+ ...(suno.maxMode === 'on' || suno.maxMode === 'off' ? { maxMode: suno.maxMode === 'on' } : {}),
};
return Object.keys(out).length ? out : null;
}
diff --git a/client/src/pages/MusicVideo.jsx b/client/src/pages/MusicVideo.jsx
index 0d20b0b8ef..536fbbfa3e 100644
--- a/client/src/pages/MusicVideo.jsx
+++ b/client/src/pages/MusicVideo.jsx
@@ -1089,25 +1089,8 @@ export default function MusicVideo() {
)}
{!selected && (loading || !routeProjectId) && (
<div className="space-y-6">
- <div className="bg-port-card border border-port-border rounded-lg p-6 text-center">
- <p className="text-sm text-port-text-muted mb-3">Pick a project in the header, start a new one — seed a name, universe and board, choose the tools and a budget, and let autopilot churn — or go fully autonomous from a single prompt.</p>
- <div className="flex flex-wrap justify-center gap-2">
- <button
- type="button"
- onClick={() => setCreateOpen(true)}
- className="inline-flex items-center gap-1 bg-port-accent text-white rounded px-3 py-1.5 text-sm min-h-[44px] sm:min-h-0"
- >
- <Plus size={15} /> New music video
- </button>
- <button
- type="button"
- onClick={() => setAutonomousOpen(true)}
- className="inline-flex items-center gap-1 rounded border border-port-accent text-port-accent px-3 py-1.5 text-sm min-h-[44px] sm:min-h-0"
- >
- <Wand2 size={15} /> Autonomous
- </button>
- </div>
- </div>
+ {/* The header already carries New project / Autonomous: keep the hint, not a second pair of buttons. */}
+ <p className="text-sm text-port-text-muted">Pick a project above, start a new one — seed a name, universe and board, choose the tools and a budget, and let autopilot churn — or go fully autonomous from a single prompt.</p>
{loading ? (
<div className="text-center py-8 text-sm text-port-text-muted">
diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsx
index f9c7400f7d..a851751d5e 100644
--- a/client/src/pages/MusicVideo.test.jsx
+++ b/client/src/pages/MusicVideo.test.jsx
@@ -2385,8 +2385,9 @@ describe('MusicVideo main page project cards', () => {
listMusicVideoProjects.mockResolvedValueOnce([projectWithRender, PROJECT_NO_CLIP]);
renderMV();
- // New project card exists
- expect(await screen.findByRole('button', { name: /New music video/i })).toBeInTheDocument();
+ // The header's New project button is the only one (no duplicate card buttons)
+ expect(await screen.findByRole('button', { name: /New project/i })).toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: /New music video/i })).toBeNull();
// Project cards grid exists below new project card
const grid = await screen.findByTestId('mv-project-grid');
diff --git a/server/lib/musicVideoAutonomous.js b/server/lib/musicVideoAutonomous.js
index 4740a24f39..d68b283a33 100644
--- a/server/lib/musicVideoAutonomous.js
+++ b/server/lib/musicVideoAutonomous.js
@@ -71,7 +71,7 @@ export const SUNO_LIMITS = Object.freeze({ title: 80, style: 1000, lyrics: 5000,
// The Advanced form's optional controls a brief may set (`brief.suno`): the
// "Exclude styles" field, the vocal gender buttons and the model version menu.
export const SUNO_VOCAL_GENDERS = Object.freeze(['male', 'female']);
-export const SUNO_MODEL_PATTERN = /^v\d+(\.\d+)?$/i;
+export const SUNO_MODEL_PATTERN = /^v\d+(\.\d+)?(-[a-z]+)?$/i;
// Free (local, un-metered) tools only, the same default a hand-made autopilot
// brief starts from — nothing paid is spent unless the operator opts in.
@@ -91,7 +91,9 @@ export function normalizeSunoOptions(raw) {
const excludeStyles = isStr(raw.excludeStyles) ? clean(raw.excludeStyles, SUNO_LIMITS.excludeStyles) : null;
const vocalGender = SUNO_VOCAL_GENDERS.includes(raw.vocalGender) ? raw.vocalGender : null;
const model = isStr(raw.model) && SUNO_MODEL_PATTERN.test(raw.model.trim()) ? raw.model.trim() : null;
- return excludeStyles === null && !vocalGender && !model ? null : { excludeStyles, vocalGender, model };
+ // Max Mode is Suno's higher-quality (more credits) render tier: true/false, or null to leave the form's default.
+ const maxMode = typeof raw.maxMode === 'boolean' ? raw.maxMode : null;
+ return excludeStyles === null && !vocalGender && !model && maxMode === null ? null : { excludeStyles, vocalGender, model, maxMode };
}
/**
@@ -207,6 +209,7 @@ export function sunoSongFields({ title, style, lyrics, instrumental = false, sun
excludeStyles: options?.excludeStyles ?? null,
vocalGender: instrumental ? null : options?.vocalGender ?? null,
model: options?.model ?? null,
+ maxMode: options?.maxMode ?? null,
};
}
diff --git a/server/lib/musicVideoAutonomous.test.js b/server/lib/musicVideoAutonomous.test.js
index dcb04892ae..2d6c0b6571 100644
--- a/server/lib/musicVideoAutonomous.test.js
+++ b/server/lib/musicVideoAutonomous.test.js
@@ -60,10 +60,10 @@ describe('normalizeAutonomousBrief', () => {
it('carries the Suno form options: absent or blank is null, an explicit empty exclusion is kept, junk is dropped', () => {
expect(normalizeAutonomousBrief({ prompt: 'p' }).suno).toBeNull();
expect(normalizeAutonomousBrief({ prompt: 'p', suno: {} }).suno).toBeNull();
- const body = musicVideoAutonomousStartSchema.parse({ prompt: 'p', suno: { excludeStyles: ' metal, screamo ', vocalGender: 'female', model: 'v4.5' } });
- expect(normalizeAutonomousBrief(body).suno).toEqual({ excludeStyles: 'metal, screamo', vocalGender: 'female', model: 'v4.5' });
+ const body = musicVideoAutonomousStartSchema.parse({ prompt: 'p', suno: { excludeStyles: ' metal, screamo ', vocalGender: 'female', model: 'v4.5', maxMode: true } });
+ expect(normalizeAutonomousBrief(body).suno).toEqual({ excludeStyles: 'metal, screamo', vocalGender: 'female', model: 'v4.5', maxMode: true });
// '' asks the driver to clear the exclusions Suno remembers; it is not "unset".
- expect(normalizeAutonomousBrief({ prompt: 'p', suno: { excludeStyles: '' } }).suno).toEqual({ excludeStyles: '', vocalGender: null, model: null });
+ expect(normalizeAutonomousBrief({ prompt: 'p', suno: { excludeStyles: '' } }).suno).toEqual({ excludeStyles: '', vocalGender: null, model: null, maxMode: null });
expect(normalizeAutonomousBrief({ prompt: 'p', suno: { vocalGender: 'robot', model: 'latest' } }).suno).toBeNull();
for (const suno of [{ model: 'latest' }, { vocalGender: 'robot' }, { excludeStyles: 'x'.repeat(501) }, { extra: 1 }]) {
expect(() => musicVideoAutonomousStartSchema.parse({ prompt: 'p', suno })).toThrow();
@@ -71,7 +71,7 @@ describe('normalizeAutonomousBrief', () => {
// A resume patches per key and may clear one with null; retakeSong rides the same request.
expect(musicVideoAutonomousResumeSchema.parse({ suno: { vocalGender: null }, retakeSong: true })).toEqual({ suno: { vocalGender: null }, retakeSong: true });
// The scheduled task stores the same options and they survive a re-normalize.
- expect(normalizeAutopilotParams({ suno: { model: 'v6' } }).suno).toEqual({ excludeStyles: null, vocalGender: null, model: 'v6' });
+ expect(normalizeAutopilotParams({ suno: { model: 'v6' } }).suno).toEqual({ excludeStyles: null, vocalGender: null, model: 'v6', maxMode: null });
});
it('agrees with the start schema: whatever the schema accepts normalizes to a brief the run can use', () => {
@@ -106,7 +106,7 @@ describe('Suno field shaping', () => {
expect(fields.style.length).toBe(SUNO_LIMITS.style);
expect(fields.lyrics.length).toBe(SUNO_LIMITS.lyrics);
expect(sunoSongFields({ title: 't', style: 's', lyrics: 'words', instrumental: true })).toEqual({
- title: 't', style: 's', lyrics: '', instrumental: true, excludeStyles: null, vocalGender: null, model: null,
+ title: 't', style: 's', lyrics: '', instrumental: true, excludeStyles: null, vocalGender: null, model: null, maxMode: null,
});
expect(sunoSongFields({}).title).toBe('Untitled');
});
diff --git a/server/lib/musicVideoValidation.js b/server/lib/musicVideoValidation.js
index a49341ee91..0c8412debc 100644
--- a/server/lib/musicVideoValidation.js
+++ b/server/lib/musicVideoValidation.js
@@ -767,7 +767,8 @@ export const musicVideoProductionResumeSchema = z.object({
const musicVideoSunoOptionsSchema = z.object({
excludeStyles: z.string().trim().max(SUNO_LIMITS.excludeStyles).nullable().optional(),
vocalGender: z.enum(SUNO_VOCAL_GENDERS).nullable().optional(),
- model: z.string().trim().regex(SUNO_MODEL_PATTERN, 'A Suno model version such as v6').nullable().optional(),
+ model: z.string().trim().regex(SUNO_MODEL_PATTERN, 'A Suno model version such as v6 or v6-wild').nullable().optional(),
+ maxMode: z.boolean().nullable().optional(),
}).strict();
// The alternate entry point: no track, style or board is picked up front. Tool
diff --git a/server/services/musicVideo/autonomousService.test.js b/server/services/musicVideo/autonomousService.test.js
index cc71b08f49..15f8d09250 100644
--- a/server/services/musicVideo/autonomousService.test.js
+++ b/server/services/musicVideo/autonomousService.test.js
@@ -316,7 +316,7 @@ describe('retaking the song at the song checkpoint', () => {
await settled('awaiting-approval');
await service.resumeAutonomousVideo('mv-auto', { suno: { model: null, vocalGender: 'female' } });
await vi.waitFor(() => expect(calls).toContain('production'));
- expect(runOf().brief.suno).toEqual({ excludeStyles: 'metal', vocalGender: 'female', model: null });
+ expect(runOf().brief.suno).toEqual({ excludeStyles: 'metal', vocalGender: 'female', model: null, maxMode: null });
expect(doubles.generateSunoSong).toHaveBeenCalledWith(expect.objectContaining({ excludeStyles: 'metal', vocalGender: 'female', model: null }), expect.any(Object));
});
});
diff --git a/server/services/musicVideo/autonomousSuno.js b/server/services/musicVideo/autonomousSuno.js
index 4579937aec..5b933a50ff 100644
--- a/server/services/musicVideo/autonomousSuno.js
+++ b/server/services/musicVideo/autonomousSuno.js
@@ -93,6 +93,21 @@ const skipped = (control) => console.warn(`⚠️ ${LABEL}: ${control} not found
* vocal gender). Each is a no-op when unset and is skipped with a warning when
* the page has no such control; none of them blocks the song.
*/
+// Suno's option rows ("Vocal Gender", "Max Mode", "Duration") are a label span
+// beside a few plain buttons; the chosen one carries the `standard` button
+// variant, the rest the `tertiary` one. Clicking the chosen button again may
+// toggle it off, so only click when it is not already selected.
+const optionRow = (page, label) => page.locator(`div:has(> div > span:text-is("${label}"))`).last();
+const isSelected = async (button) => /hxc-btn-variant-standard/.test((await button.getAttribute('class')) || '');
+async function chooseInRow(page, label, name) {
+ const row = optionRow(page, label);
+ if (!await row.count()) return skipped(`the ${label} row`);
+ const button = row.getByRole('button', { name });
+ if (!await button.count()) return skipped(`the ${label} buttons`);
+ if (await isSelected(button.first())) return;
+ await button.first().click({ timeout: T });
+}
+
async function setSunoOptions(page, fields) {
if (fields.model) {
await step(LABEL, 'choose the model version', async () => {
@@ -102,7 +117,11 @@ async function setSunoOptions(page, fields) {
const current = (await version.first().innerText({ timeout: T })).trim();
if (current.toLowerCase() === fields.model.toLowerCase()) return;
await version.first().click({ timeout: T });
- const item = page.getByRole('menuitem', { name: new RegExp(`^${escapeRegExp(fields.model)}$`, 'i') });
+ // Menu entries are radio items whose accessible name starts with the version
+ // and goes on with a tier and blurb ("v6 Pro Powerful. Versatile. …",
+ // "v6-wild Pro Best for experimental ideas."): match the leading token only.
+ const name = new RegExp(`^${escapeRegExp(fields.model)}(\\s|$)`, 'i');
+ const item = page.getByRole('menuitemradio', { name }).or(page.getByRole('menuitem', { name }));
await item.first().waitFor({ state: 'visible', timeout: SUNO_MENU_WAIT_MS }).catch(() => {});
if (!await item.count()) {
await page.keyboard.press('Escape');
@@ -111,8 +130,8 @@ async function setSunoOptions(page, fields) {
await item.first().click({ timeout: T });
});
}
- // Exclude styles and vocal gender sit in the collapsible "More Options" section.
- if (fields.excludeStyles != null || fields.vocalGender) {
+ // Exclude styles, vocal gender and Max Mode sit in the collapsible "More Options" section.
+ if (fields.excludeStyles != null || fields.vocalGender || fields.maxMode != null) {
await step(LABEL, 'open More Options', async () => {
if (await page.locator('input[placeholder="Exclude styles"]:visible').count()) return;
const more = page.getByText(/^more options$/i);
@@ -129,12 +148,10 @@ async function setSunoOptions(page, fields) {
});
}
if (fields.vocalGender) {
- await step(LABEL, 'choose the vocal gender', async () => {
- // Plain Male / Female buttons; Suno exposes no pressed state to check.
- const gender = page.getByRole('button', { name: fields.vocalGender === 'female' ? /^female$/i : /^male$/i });
- if (!await gender.count()) return skipped('the vocal gender buttons');
- await gender.first().click({ timeout: T });
- });
+ await step(LABEL, 'choose the vocal gender', () => chooseInRow(page, 'Vocal Gender', fields.vocalGender === 'female' ? /^female$/i : /^male$/i));
+ }
+ if (fields.maxMode != null) {
+ await step(LABEL, `turn Max Mode ${fields.maxMode ? 'on' : 'off'}`, () => chooseInRow(page, 'Max Mode', fields.maxMode ? /^on$/i : /^off$/i));
}
}
diff --git a/server/services/musicVideo/autonomousSuno.test.js b/server/services/musicVideo/autonomousSuno.test.js
index 506fc59387..3063b00202 100644
--- a/server/services/musicVideo/autonomousSuno.test.js
+++ b/server/services/musicVideo/autonomousSuno.test.js
@@ -36,6 +36,24 @@ function fakePage({ url = 'https://suno.com/create', hasForm = true, modern = tr
return 1;
};
const locator = (selector) => {
+ const row = /span:text-is\("([^"]+)"\)/.exec(selector);
+ if (row) {
+ const label = row[1];
+ const present = options && (label === 'Vocal Gender' ? options.gender !== undefined : label === 'Max Mode' ? options.maxMode !== undefined : false);
+ const rowHandle = {
+ count: async () => (present ? 1 : 0),
+ getByRole: (_role, { name }) => {
+ const choice = ['male', 'female', 'on', 'off'].find((c) => name.test(c));
+ const selected = () => (label === 'Vocal Gender' ? options.gender : options.maxMode) === choice;
+ const btn = {
+ getAttribute: async () => (selected() ? 'hxc-btn-base hxc-btn-variant-standard-legacy' : 'hxc-btn-base hxc-btn-variant-tertiary-legacy'),
+ click: async () => { if (label === 'Vocal Gender') options.gender = choice; else options.maxMode = choice; actions.push(`${label === 'Vocal Gender' ? 'gender' : 'max'}:${choice}`); },
+ };
+ return { count: async () => 1, first: () => btn };
+ },
+ };
+ return { ...rowHandle, last: () => rowHandle };
+ }
const handle = {
count: async () => count(selector),
waitFor: async () => {},
@@ -46,14 +64,16 @@ function fakePage({ url = 'https://suno.com/create', hasForm = true, modern = tr
return { ...handle, first: () => handle, filter: () => ({ ...handle, first: () => handle }) };
};
const button = (role, options_) => {
- if (role === 'menuitem') {
- const match = () => (options?.menuItems || []).find((name) => options_.name.test(name));
- const item = { waitFor: async () => { if (!match()) throw new Error('menu item timeout'); }, click: async () => { options.version = match(); actions.push(`model:${match()}`); } };
- return { count: async () => (match() ? 1 : 0), first: () => item };
+ if (role === 'menuitemradio' || role === 'menuitem') {
+ // Real entries read "v6 Pro Powerful. Versatile. Refined." / "v6-wild Pro Best for experimental ideas.".
+ const match = () => role === 'menuitemradio' ? (options?.menuItems || []).find((name) => options_.name.test(name)) : undefined;
+ const item = { waitFor: async () => { if (!match()) throw new Error('menu item timeout'); }, click: async () => { options.version = match().split(' ')[0]; actions.push(`model:${options.version}`); } };
+ const handle = { count: async () => (match() ? 1 : 0), first: () => item };
+ return { ...handle, or: () => handle };
}
return {
- count: async () => role === 'textbox' || role === 'tab' ? (modern ? 1 : 0) : /instrumental|custom/.test(String(options_.name)) ? (modern ? 0 : 1) : /male/.test(String(options_.name)) ? (options ? 1 : 0) : 1,
- first: () => ({ click: async () => { if (/male/.test(String(options_.name))) actions.push(`gender:${options_.name}`); }, fill: async v => { fills[options_.name] = v; } }),
+ count: async () => role === 'textbox' || role === 'tab' ? (modern ? 1 : 0) : /instrumental|custom/.test(String(options_.name)) ? (modern ? 0 : 1) : 1,
+ first: () => ({ click: async () => {}, fill: async v => { fills[options_.name] = v; } }),
last: () => ({ click: async () => { created = true; actions.push('create'); onCreate?.(events); } }),
};
};
@@ -150,23 +170,29 @@ describe('submitSunoSong', () => {
expect(page.fills['textarea[placeholder*="style" i]']).toBe(fields.style);
});
- it('sets the model version, exclude styles and vocal gender, opening More Options for the hidden exclude field', async () => {
- const options = { version: 'v5', menuItems: ['v4.5', 'v5', 'v6'], expanded: false };
+ it('sets the model version, exclude styles, vocal gender and Max Mode, opening More Options for the hidden exclude field', async () => {
+ // Menu entries carry a tier and blurb; "v6" must pick "v6 Pro …", never "v6-wild Pro …". Nothing is selected yet.
+ const options = { version: 'v5', menuItems: ['v6-wild Pro Best for experimental ideas.', 'v6 Pro Powerful. Versatile. Refined.', 'v5 Pro'], expanded: false, gender: null, maxMode: 'off' };
const page = fakePage({ options });
- const ids = await submitSunoSong(page, { ...fields, excludeStyles: 'metal, screamo', vocalGender: 'female', model: 'V6' }, { sleep: noSleep });
+ const ids = await submitSunoSong(page, { ...fields, excludeStyles: 'metal, screamo', vocalGender: 'female', model: 'V6', maxMode: true }, { sleep: noSleep });
expect(ids).toEqual([NEW_A, NEW_B]);
- expect(page.actions).toEqual(['open-version-menu', 'model:v6', 'more-options', 'gender:/^female$/i', 'create']);
+ expect(page.actions).toEqual(['open-version-menu', 'model:v6', 'more-options', 'gender:female', 'max:on', 'create']);
expect(page.fills['input[placeholder="Exclude styles"]']).toBe('metal, screamo');
+
+ // Plain buttons toggle, so an already-selected choice is left alone (clicking again could deselect it).
+ const chosen = fakePage({ options: { version: 'v6', menuItems: ['v6 Pro'], expanded: true, gender: 'female', maxMode: 'on' } });
+ await submitSunoSong(chosen, { ...fields, vocalGender: 'female', maxMode: true, model: 'v6-wild' }, { sleep: noSleep });
+ expect(chosen.actions).toEqual(['open-version-menu', 'key:Escape', 'create']);
});
it('touches none of the options when the brief sets none, and clears exclusions only when asked', async () => {
- const page = fakePage({ options: { version: 'v5', menuItems: ['v5', 'v6'], expanded: false } });
- await submitSunoSong(page, { ...fields, excludeStyles: null, vocalGender: null, model: null }, { sleep: noSleep });
+ const page = fakePage({ options: { version: 'v5', menuItems: ['v5 Pro', 'v6 Pro'], expanded: false, gender: null, maxMode: 'off' } });
+ await submitSunoSong(page, { ...fields, excludeStyles: null, vocalGender: null, model: null, maxMode: null }, { sleep: noSleep });
expect(page.actions).toEqual(['create']);
expect(page.fills).not.toHaveProperty('input[placeholder="Exclude styles"]');
// Already on the wanted version and already expanded: no menu, no toggle; '' clears Suno's remembered draft.
- const cleared = fakePage({ options: { version: 'v6', menuItems: ['v6'], expanded: true } });
+ const cleared = fakePage({ options: { version: 'v6', menuItems: ['v6 Pro'], expanded: true } });
await submitSunoSong(cleared, { ...fields, excludeStyles: '', model: 'v6' }, { sleep: noSleep });
expect(cleared.actions).toEqual(['create']);
expect(cleared.fills['input[placeholder="Exclude styles"]']).toBe('');
@@ -175,18 +201,18 @@ describe('submitSunoSong', () => {
it('warns and still creates the song when the version menu lacks the model or an older UI lacks the controls', async () => {
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
try {
- const page = fakePage({ options: { version: 'v5', menuItems: ['v4.5', 'v5'], expanded: true } });
+ const page = fakePage({ options: { version: 'v5', menuItems: ['v4.5 Pro', 'v5 Pro'], expanded: true, gender: null } });
await submitSunoSong(page, { ...fields, model: 'v9', vocalGender: 'male' }, { sleep: noSleep });
- expect(page.actions).toEqual(['open-version-menu', 'key:Escape', 'gender:/^male$/i', 'create']);
+ expect(page.actions).toEqual(['open-version-menu', 'key:Escape', 'gender:male', 'create']);
expect(warn).toHaveBeenCalledWith(expect.stringMatching(/model v9 in the version menu/));
warn.mockClear();
const older = fakePage();
- await submitSunoSong(older, { ...fields, model: 'v6', excludeStyles: 'metal', vocalGender: 'female' }, { sleep: noSleep });
+ await submitSunoSong(older, { ...fields, model: 'v6', excludeStyles: 'metal', vocalGender: 'female', maxMode: true }, { sleep: noSleep });
expect(older.actions).toEqual(['create']);
expect(warn.mock.calls.map(([line]) => line)).toEqual([
expect.stringMatching(/model version menu/), expect.stringMatching(/More Options/),
- expect.stringMatching(/Exclude styles/), expect.stringMatching(/vocal gender/),
+ expect.stringMatching(/Exclude styles/), expect.stringMatching(/Vocal Gender row/), expect.stringMatching(/Max Mode row/),
]);
} finally {
warn.mockRestore();