Skip to content

Add E2E toggle tests for 1.8.0 settings (#349, #179)#424

Open
tastybento wants to merge 1 commit into
developfrom
fix/e2e-pin-mineflayer
Open

Add E2E toggle tests for 1.8.0 settings (#349, #179)#424
tastybento wants to merge 1 commit into
developfrom
fix/e2e-pin-mineflayer

Conversation

@tastybento

Copy link
Copy Markdown
Member

Extends the plugwright in-game E2E suite with two tests that drive the admin Settings GUI on a live Paper 1.21.11 server (BentoBox 3.14.0 + BSkyBlock + Challenges 1.8.0) — the richest surface reachable without bootstrapping an island.

New tests

  • open-anywhere setting toggles in the admin settings GUI (#349) — finds the new "Open GUI Anywhere" Elytra toggle, clicks it, asserts the Enabled/Disabled lore flips, then restores it. Proves the full config → Settings → panel button → click-handler → saveSettings chain works on a real server, not just in the JUnit tests.
  • include-undeployed setting toggles in the admin settings GUI (#179) — same live toggle check for the "Include Undeployed Challenges" barrel button now shipped in config.yml.

Both tests are self-restoring (read current state → flip → assert → flip back), so they don't depend on the persisted run-dir config or on the order tests run in. Shared openSettingsPanel() / expectToggleFlips() helpers were extracted; LiveGuiHandle / GuiItemLocator types are derived from the exported PlayerWrapper since the package doesn't re-export them.

Verification

  • npm run build (tsc, strict: true) — clean.
  • ./gradlew plugwrightTest on Java 21 — 4/4 pass:
PASS  bot can interact with the server
PASS  confirmation prompts tell the player how to answer (#329)
PASS  open-anywhere setting toggles in the admin settings GUI (#349)
PASS  include-undeployed setting toggles in the admin settings GUI (#179)

Not covered

Other 1.8.0 features (toggleable-undeployed #175, default text colour #340, challenges_completed_percent #352, biome requirement #335, reward chance #76, island-level rewards #279) need an island + imported challenges to exercise in-game — the island-bootstrap the original spike deferred. Left for a follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DfEq1X2sy57G8nq2Cd23ba

Extends the plugwright in-game suite with two tests that drive the admin
Settings GUI on a live Paper 1.21.11 server:

- open-anywhere (#349): the new "Open GUI Anywhere" Elytra toggle renders
  and its click-handler flips + persists the setting.
- include-undeployed (#179): the "Include Undeployed Challenges" barrel
  toggle now shipped in config.yml behaves the same way.

Both are self-restoring (read state, flip, assert, flip back) so they are
independent of the persisted run-dir config and of test ordering. Shared
openSettingsPanel()/expectToggleFlips() helpers; LiveGuiHandle/
GuiItemLocator types derived from PlayerWrapper since the package does not
re-export them. README coverage list updated. Full suite: 4/4 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfEq1X2sy57G8nq2Cd23ba
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant