mirror of
https://github.com/mihawk-99/PS5_RetroArch.git
synced 2026-10-18 23:09:29 -05:00
Enable automatic media downloads for new game drafts
Keep opt-out available and restore the enabled default on each new draft. Browser coverage verifies source visibility, labels, manual opt-out and the default download flow. Validation: tools/verify.sh format unit build integration evidence; 185 unit and 185 integration tests pass. Build fd8f648f deployed; defaults and config preservation verified. Evidence: evidence/webui-auto-media-default/capture.json. Replay: tools/verify.sh evidence.
This commit is contained in:
1 parent
7301a9e92e
commit
b0904bc11e
5 files changed
+64
-5
No files matched your search
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"step": "webui-auto-media-default",
|
||||
"revision": "working tree on 7301a9e",
|
||||
"command": "PS5_FRONTENDS=\"es-de picker\" PS5_VULKAN_TEMPLATE=\"$PWD/build/picker-template\" bash tools/verify.sh format unit build integration evidence",
|
||||
"raw_capture": "build/webui-auto-media-gates.log",
|
||||
"raw_lines": 2790,
|
||||
"lines": [
|
||||
"== format",
|
||||
" PASS (11s)",
|
||||
"== unit",
|
||||
"Ran 185 tests in 274.629s",
|
||||
" PASS (274s)",
|
||||
"== build",
|
||||
" PASS (101s)",
|
||||
"== integration",
|
||||
"Ran 185 tests in 272.541s",
|
||||
" PASS (280s)",
|
||||
"== evidence",
|
||||
"113 capture(s) replayed, 0 failed",
|
||||
" PASS (0s)",
|
||||
"verify: PASS (format unit build integration evidence)",
|
||||
"Installed Add Game opens with automatic media enabled and source options visible",
|
||||
"Submit action reads Add game & download media",
|
||||
"Disabling downloads restores Add to library; a new draft defaults to enabled",
|
||||
"Running WebUI assets match source and stage",
|
||||
"RetroArch and frontend configuration bytes unchanged"
|
||||
],
|
||||
"console": {
|
||||
"build": "fd8f648f5b51be2cc762f4533e9cd3703d71ef22842ece649b1bbd78c4d83099",
|
||||
"frontend": "picker",
|
||||
"assets": {
|
||||
"index.html": "d873ebc4ce26be029467536ac66abdb85dffb992b5efd2e86937ba99a11da4ac",
|
||||
"add-game.js": "b96220df31d246433b0ff80291b6e44a0c7264b0fce98676f1f5b5d4bd22eeda"
|
||||
}
|
||||
},
|
||||
"screenshot": "klog/webui-auto-media/default-media.jpg",
|
||||
"scope": "Automatic downloads default on for each new Add Game draft; libretro remains the initial selected source. No game added or scraper job started in console validation."
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"step": "webui-auto-media-default",
|
||||
"must_contain": [
|
||||
"verify: PASS (format unit build integration evidence)",
|
||||
"Installed Add Game opens with automatic media enabled and source options visible",
|
||||
"Submit action reads Add game & download media",
|
||||
"Disabling downloads restores Add to library; a new draft defaults to enabled",
|
||||
"Running WebUI assets match source and stage",
|
||||
"RetroArch and frontend configuration bytes unchanged"
|
||||
],
|
||||
"must_not_contain": [
|
||||
"FAILED",
|
||||
"Traceback"
|
||||
],
|
||||
"human_check": "Installed Add Game Media screenshot shows Enabled, source choices and Add game & download media without toggling it on."
|
||||
}
|
||||
@@ -43,7 +43,9 @@ const { chromium } = require(process.env.PLAYWRIGHT_PATH || 'playwright');
|
||||
});
|
||||
assert.equal(mediaIcons.length,10);
|
||||
assert.ok(mediaIcons.every(Boolean),'every media selector icon renders under the production CSP');
|
||||
await page.locator('#add-download').click();
|
||||
assert.equal(await page.locator('#add-download').getAttribute('aria-pressed'),'true');
|
||||
assert.equal(await page.locator('#add-scrapers').isVisible(),true);
|
||||
assert.match(await page.locator('#add-submit').innerText(),/Add game & download media/);
|
||||
await page.locator('.add-source', {hasText:'ScreenScraper'}).getByRole('button', {name:'Sign in',exact:true}).click();
|
||||
await page.locator('#sign-in-user').fill('browser fixture');
|
||||
await page.locator('#sign-in-password').fill('fixture');
|
||||
@@ -185,6 +187,9 @@ const { chromium } = require(process.env.PLAYWRIGHT_PATH || 'playwright');
|
||||
await page.locator('#add-name').fill('My Browser Homebrew');
|
||||
await page.locator('#add-developer').fill('Homebrew author');
|
||||
await page.locator('[data-add-tab=media]').click();
|
||||
await page.locator('#add-download').click();
|
||||
assert.equal(await page.locator('#add-download').getAttribute('aria-pressed'),'false');
|
||||
assert.match(await page.locator('#add-submit').innerText(),/Add to library/);
|
||||
await page.locator('#add-media-file').setInputFiles({name:'cover.png', mimeType:'image/png', buffer:Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGP4////fwAJ+wP9KobjigAAAABJRU5ErkJggg==','base64')});
|
||||
await page.locator('[data-add-tab=details]').click();
|
||||
assert.equal(await page.locator('#add-developer').inputValue(),'Homebrew author');
|
||||
@@ -209,7 +214,7 @@ const { chromium } = require(process.env.PLAYWRIGHT_PATH || 'playwright');
|
||||
await page.locator('[data-add-tab=details]').click();
|
||||
await page.locator('#add-name').fill('Super Metroid (Japan, USA) (En,Ja)');
|
||||
await page.locator('[data-add-tab=media]').click();
|
||||
await page.locator('#add-download').click();
|
||||
assert.equal(await page.locator('#add-download').getAttribute('aria-pressed'),'true');
|
||||
assert.match(await page.locator('#add-submit').innerText(),/Add game & download media/);
|
||||
// Keep the running phase visible even on a fast local fixture.
|
||||
let polls = 0, lastAddJob;
|
||||
|
||||
+2
-2
@@ -42,9 +42,9 @@ async function openAddGame() {
|
||||
const context = addGame;
|
||||
$('#add-game').showModal(); addTab('file'); $('#add-results').replaceChildren(); $('#add-match').textContent = ''; $('#add-search-status').textContent = ''; $('#add-search').value = ''; $('#add-search-button').disabled = false;
|
||||
$('#add-file-name').textContent = 'Choose a game backup'; $('#add-file-hint').textContent = 'Drop one file here, or browse your device';
|
||||
setAddDownloads(false); $('#add-layout').hidden = false; $('#add-activity').hidden = true; $('#add-submit').hidden = false; $('#add-progress').hidden = true; $('#add-submit').disabled = true;
|
||||
setAddDownloads(true); $('#add-layout').hidden = false; $('#add-activity').hidden = true; $('#add-submit').hidden = false; $('#add-progress').hidden = true; $('#add-submit').disabled = true;
|
||||
$('#add-system').disabled = $('#add-drop').disabled = false; $('#add-fetch-details').checked = true;
|
||||
$('#add-submit').replaceChildren(uiIcon('plus'), document.createTextNode('Add to library')); addMessage('Loading your installed systems…');
|
||||
addMessage('Loading your installed systems…');
|
||||
$('#add-fields').replaceChildren(...ADD_FIELDS.map(([key, title]) => {
|
||||
const label = element('label', title, key === 'name' || key === 'description' ? 'wide-field' : '');
|
||||
const input = document.createElement(key === 'description' ? 'textarea' : 'input'); input.id = 'add-' + key;
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@
|
||||
<div class="sheet-layout" id="add-layout"><nav class="sheet-nav" aria-label="Add Game sections"><button type="button" data-add-tab="file" aria-pressed="true">Game file</button><button type="button" data-add-tab="details" aria-pressed="false">Details</button><button type="button" data-add-tab="media" aria-pressed="false">Media</button><p>Choose a backup.<br>Make it yours.<br>Add it to your library.</p></nav><div class="sheet-body">
|
||||
<section data-add-panel="file"><h3>Start with your game</h3><p class="muted sheet-hint">Add a legally obtained backup of a game you own. Your existing games stay untouched.</p><label class="add-field">System<span class="system-select"><span id="add-system-icon"></span><select id="add-system" required><option value="">Loading installed systems…</option></select></span></label><button type="button" id="add-drop" class="add-drop"><span data-ui-icon="cloud-upload"></span><strong id="add-file-name">Choose a game backup</strong><span id="add-file-hint">Drop one file here, or browse your device</span></button><input id="add-file" type="file" hidden><p id="add-destination" class="muted sheet-path"></p><p class="muted sheet-hint">The system’s installed core is detected automatically. For multi-file discs or folder-based games, upload the complete folder in Content.</p></section>
|
||||
<section data-add-panel="details" hidden><h3>Give it a place in your library</h3><p class="muted sheet-hint">Write your own details, or choose a match from the LaunchBox Games Database. You can edit everything afterward.</p><form id="add-search-form" class="add-search"><label>Find in LaunchBox<input type="search" id="add-search" placeholder="Game title" maxlength="160" minlength="2"></label><button type="submit" id="add-search-button" class="secondary"><span data-ui-icon="search"></span>Search</button></form><p id="add-search-status" class="sheet-status" role="status"></p><div id="add-results" class="add-results"></div><p id="add-match" class="sheet-status"></p><div id="add-fields" class="sheet-fields"></div></section>
|
||||
<section data-add-panel="media" hidden><h3>Make your game recognizable</h3><p class="muted sheet-hint">Add your own artwork, video or manual. Optional downloads fill the gaps; your files are kept.</p><button type="button" id="add-download" class="add-download-cta" aria-pressed="false"><span data-ui-icon="download"></span><span><strong>Download media automatically</strong><small>Find covers, screenshots and more from your chosen sources.</small></span><span id="add-download-state">Enable</span></button><div id="add-scrapers" hidden><p class="muted sheet-hint">Choose sources in the order they should run. Downloads use the same engine as Download Media and continue on your PS5.</p><div id="add-sources"></div><div class="add-download-options"><label>Region<select id="add-region"><option value="us">USA</option><option value="eu">Europe</option><option value="jp">Japan</option><option value="wor">World</option></select></label><label>Details language<select id="add-language"><option value="en">English</option><option value="fr">French</option><option value="de">German</option><option value="es">Spanish</option><option value="it">Italian</option><option value="ja">Japanese</option></select></label></div><label class="add-download"><input id="add-fetch-details" type="checkbox" checked>Fill missing game details too</label><p class="muted sheet-hint">All media types offered by your selected sources are requested. You can follow progress and resolve uncertain matches in Download Media.</p></div><div id="add-media-preview" class="add-media-preview"></div><div id="add-media-types" class="sheet-thumbs" aria-label="Media types to add"></div><input id="add-media-file" type="file" hidden></section>
|
||||
<section data-add-panel="media" hidden><h3>Make your game recognizable</h3><p class="muted sheet-hint">Add your own artwork, video or manual. Optional downloads fill the gaps; your files are kept.</p><button type="button" id="add-download" class="add-download-cta" aria-pressed="true"><span data-ui-icon="download"></span><span><strong>Download media automatically</strong><small>Find covers, screenshots and more from your chosen sources.</small></span><span id="add-download-state">Enabled</span></button><div id="add-scrapers"><p class="muted sheet-hint">Choose sources in the order they should run. Downloads use the same engine as Download Media and continue on your PS5.</p><div id="add-sources"></div><div class="add-download-options"><label>Region<select id="add-region"><option value="us">USA</option><option value="eu">Europe</option><option value="jp">Japan</option><option value="wor">World</option></select></label><label>Details language<select id="add-language"><option value="en">English</option><option value="fr">French</option><option value="de">German</option><option value="es">Spanish</option><option value="it">Italian</option><option value="ja">Japanese</option></select></label></div><label class="add-download"><input id="add-fetch-details" type="checkbox" checked>Fill missing game details too</label><p class="muted sheet-hint">All media types offered by your selected sources are requested. You can follow progress and resolve uncertain matches in Download Media.</p></div><div id="add-media-preview" class="add-media-preview"></div><div id="add-media-types" class="sheet-thumbs" aria-label="Media types to add"></div><input id="add-media-file" type="file" hidden></section>
|
||||
</div></div><section id="add-activity" class="add-activity" hidden aria-labelledby="add-activity-title"><div class="add-activity-heading"><span data-ui-icon="download"></span><div><h3 id="add-activity-title">Finding your game’s media</h3><p id="add-activity-game" class="muted"></p></div></div><p id="add-activity-detail" role="status"></p><progress id="add-activity-progress" max="100" aria-label="Media download progress"></progress><div id="add-live-media" class="add-live-media"></div><p id="add-activity-hint" class="muted">Your game backup is already saved. Artwork appears here as it arrives.</p></section><footer class="add-footer"><div class="add-progress"><p id="add-status" role="status">Choose a system and a game backup to begin.</p><progress id="add-progress" max="100" value="0" hidden aria-label="Add Game progress"></progress></div><button type="button" id="add-cancel" class="secondary">Cancel</button><button type="button" id="add-submit" class="primary"><span data-ui-icon="plus"></span>Add to library</button></footer></dialog>
|
||||
|
||||
<dialog id="game-sheet" class="game-sheet" aria-labelledby="sheet-title"><div class="sheet-head"><div class="sheet-cover" id="sheet-cover"></div><div class="sheet-heading"><h2 id="sheet-title"></h2><div id="sheet-tags" class="version-tags"></div><p id="sheet-sub" class="muted"></p></div><button type="button" id="sheet-edit" class="secondary">Edit details</button><button type="button" id="sheet-close" class="sheet-close" aria-label="Close"><span data-ui-icon="x" class=""></span></button></div>
|
||||
|
||||
Reference in new issue
Block a user