Skip to content

Expand the end-to-end suite to cover permissions, teleport mechanics, admin commands, the GUI and the blacklist #76

Description

@milanmalhotra

The harness added in #34 ships with 7 tests: 2 boot, 5 homes. It covers that the
jar loads on a real server and that the basic create, list and teleport paths
work. Everything else the plugin does is either covered only in-process by the
MockBukkit suite or not covered at all.

This adds the cases that need a real server, and deliberately does not re-test
command logic the 389 unit tests already cover.

The enabler is the config the harness writes. It currently disables the delay,
cancel-on-move, safety and max-homes so an assertion never races a timer. Those
can all be turned on instead, because a holder of sh2.bypass-teleport-delay
takes a delay of 0 and skips attempt tracking, and a holder of
sh2.bypass-max-homes skips the cap. Both are children of sh2.admin, so an op
keeps the deterministic path while an ordinary player exercises the real one.
Setting sh2.player: true rather than op gives the two tiers.

Planned specs:

  • permissions.spec.ts - ordinary player allowed their own homes and refused
    admin commands through Brigadier, op allowed, a node pinned to op in config
    denied, deOp revoking access mid-session.
  • teleport.spec.ts - the countdown, move-cancel, the op bypass arriving
    instantly, the delay message, an attempt surviving a rejoin.
  • maxhomes.spec.ts - the cap, the op bypass, deleting freeing a slot.
  • admin.spec.ts - two bots: get-player-homes, go-player-home, move-player-home,
    delete-player-home, and the admin view offering no management.
  • gui.spec.ts - right-click opens HomeActionsGui, move here, set icon, the
    delete confirmation, and pagination past 45 homes.
  • blacklist.spec.ts - listing, adding, creating in a blacklisted world being
    refused, the bypass node, and removal.
  • worlds.spec.ts - homes in the nether and the end, and teleporting across
    dimensions.
  • items.spec.ts - give-homes-item, right-clicking the compass to open the GUI,
    and the refusal without the node.
  • anvil.spec.ts - the rename prompt.

The anvil is the one uncertain item. Plugwright's GUI API is title matching plus
item locators and clicks, with nothing for an anvil rename, which needs the
serverbound name_item packet through raw mineflayer. CLAUDE.md records that this
prompt cannot run under MockBukkit at all, so it is the largest hole in the
plugin's coverage, but if driving it from a bot does not work it drops to its own
issue and the rest ships without it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions