Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/bored.mp4
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/cheer.mp4
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/clap.mp4
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/ecstatic.mp4
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/engaged.mp4
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/intro.mp4
Binary file not shown.
8 changes: 8 additions & 0 deletions plugins/career/venue-packs/arena/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"venue": "arena",
"version": 1,
"loops": {"bored": "bored.mp4", "neutral": "neutral.mp4", "engaged": "engaged.mp4", "ecstatic": "ecstatic.mp4"},
"stingers": {"clap": "clap.mp4", "cheer": "cheer.mp4"},
"intro": {"video": "intro.mp4", "audio": "arena-ambience.mp3"},
"sfx": {"up": "sfx-up.mp3", "down": "sfx-down.mp3"}
}
Binary file added plugins/career/venue-packs/arena/neutral.mp4
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/sfx-down.mp3
Binary file not shown.
Binary file added plugins/career/venue-packs/arena/sfx-up.mp3
Binary file not shown.
21 changes: 21 additions & 0 deletions tests/js/career_plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,27 @@ test('bar venue pack ships with intro media in the plugin checkout', () => {
}
});

test('arena venue pack ships with full media in the plugin checkout', () => {
const packDir = path.join(PLUGIN_DIR, 'venue-packs', 'arena');
const manifest = JSON.parse(fs.readFileSync(path.join(packDir, 'manifest.json'), 'utf8'));
assert.equal(manifest.venue, 'arena');
assert.deepEqual(Object.keys(manifest.loops).sort(),
['bored', 'ecstatic', 'engaged', 'neutral']);
assert.equal(manifest.intro.video, 'intro.mp4');
assert.equal(manifest.intro.audio, 'arena-ambience.mp3');
for (const f of [
...Object.values(manifest.loops),
...Object.values(manifest.stingers),
manifest.intro.video,
manifest.intro.audio,
manifest.sfx.up,
manifest.sfx.down,
Comment on lines +58 to +68

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the exact media mappings, not only file presence.

The test currently checks loop keys and that referenced files exist, so swapped loop filenames or incorrect stinger/SFX keys would still pass. Assert the complete expected loops, stingers, and sfx objects to catch incorrect runtime wiring.

Proposed test strengthening
-    assert.deepEqual(Object.keys(manifest.loops).sort(),
-        ['bored', 'ecstatic', 'engaged', 'neutral']);
+    assert.deepEqual(manifest.loops, {
+        bored: 'bored.mp4',
+        neutral: 'neutral.mp4',
+        engaged: 'engaged.mp4',
+        ecstatic: 'ecstatic.mp4',
+    });
+    assert.deepEqual(manifest.stingers, {
+        clap: 'clap.mp4',
+        cheer: 'cheer.mp4',
+    });
+    assert.deepEqual(manifest.sfx, {
+        up: 'sfx-up.mp3',
+        down: 'sfx-down.mp3',
+    });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert.deepEqual(Object.keys(manifest.loops).sort(),
['bored', 'ecstatic', 'engaged', 'neutral']);
assert.equal(manifest.intro.video, 'intro.mp4');
assert.equal(manifest.intro.audio, 'arena-ambience.mp3');
for (const f of [
...Object.values(manifest.loops),
...Object.values(manifest.stingers),
manifest.intro.video,
manifest.intro.audio,
manifest.sfx.up,
manifest.sfx.down,
assert.deepEqual(manifest.loops, {
bored: 'bored.mp4',
neutral: 'neutral.mp4',
engaged: 'engaged.mp4',
ecstatic: 'ecstatic.mp4',
});
assert.deepEqual(manifest.stingers, {
clap: 'clap.mp4',
cheer: 'cheer.mp4',
});
assert.deepEqual(manifest.sfx, {
up: 'sfx-up.mp3',
down: 'sfx-down.mp3',
});
assert.equal(manifest.intro.video, 'intro.mp4');
assert.equal(manifest.intro.audio, 'arena-ambience.mp3');
for (const f of [
...Object.values(manifest.loops),
...Object.values(manifest.stingers),
manifest.intro.video,
manifest.intro.audio,
manifest.sfx.up,
manifest.sfx.down,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/js/career_plugin.test.js` around lines 58 - 68, Strengthen the manifest
assertions in the career plugin test by comparing the complete manifest.loops,
manifest.stingers, and manifest.sfx objects against their expected key-to-file
mappings, rather than only checking loop keys and file existence. Preserve the
existing intro assertions and media existence checks.

]) {
const stat = fs.statSync(path.join(packDir, f));
assert.ok(stat.size > 0, `${f} must be present`);
}
});

test('shell promotes the career plugin into the sidebar', () => {
const src = fs.readFileSync(SHELL_JS, 'utf8');
assert.match(src, /key: 'career',\s*screen: 'plugin-career'/);
Expand Down
Loading