@@ -65,7 +58,7 @@
diff --git a/viewer/src/components/SetupStatus.spec.ts b/viewer/src/components/SetupStatus.spec.ts
index 97804240..c1e27c6b 100644
--- a/viewer/src/components/SetupStatus.spec.ts
+++ b/viewer/src/components/SetupStatus.spec.ts
@@ -23,59 +23,6 @@ describe("SetupStatus", () => {
return new Engine(["init 3 setup-status", ...moves], { auction: AuctionVariant.Silent });
}
- it("names the player on turn and what they have to do", () => {
- const engine = silentAuctionEngine();
- engine.players[0].name = "Mark";
- expect(engine.phase).to.equal(Phase.SetupFactionBan);
-
- const wrapper = mountFor(engine);
- expect(wrapper.text()).to.contain("Mark's turn");
- expect(wrapper.text()).to.contain("to ban a faction");
- wrapper.destroy();
- });
-
- it("addresses the player whose seat is being viewed in the second person", () => {
- const engine = silentAuctionEngine();
- engine.players[0].name = "Mark";
-
- const wrapper = mountFor(engine, 0);
- expect(wrapper.text()).to.contain("Your turn");
- expect(wrapper.text()).to.not.contain("Mark's turn");
- wrapper.destroy();
- });
-
- it("keeps showing whose turn it is for a player who cannot act (the case Commands.vue never covered)", () => {
- const engine = silentAuctionEngine();
- engine.players[0].name = "Mark";
-
- // Seat 2 is watching while seat 0 bans - the action panel isn't rendered for them at all.
- const wrapper = mountFor(engine, 2);
- expect(wrapper.text()).to.contain("Mark's turn");
- expect(wrapper.text()).to.contain("to ban a faction");
- wrapper.destroy();
- });
-
- it("follows the phase through pick and silent bid", () => {
- const picking = silentAuctionEngine(["p1 banFaction terrans", "p2 banFaction lantids", "p3 banFaction gleens"]);
- expect(picking.phase).to.equal(Phase.SetupFaction);
- let wrapper = mountFor(picking);
- expect(wrapper.text()).to.contain("to pick a faction");
- wrapper.destroy();
-
- const bidding = silentAuctionEngine([
- "p1 banFaction terrans",
- "p2 banFaction lantids",
- "p3 banFaction gleens",
- "p1 faction itars",
- "p2 faction taklons",
- "p3 faction xenos",
- ]);
- expect(bidding.phase).to.equal(Phase.SetupSilentBid);
- wrapper = mountFor(bidding);
- expect(wrapper.text()).to.contain("to submit their secret bids");
- wrapper.destroy();
- });
-
it("shows compact ban and auction links during an auction's ban phase, and opens the auction explainer", async () => {
const wrapper = mountFor(silentAuctionEngine());
@@ -99,7 +46,6 @@ describe("SetupStatus", () => {
expect(engine.phase).to.equal(Phase.SetupFactionBan);
const wrapper = mountFor(engine);
- expect(wrapper.text()).to.contain("to ban a faction");
expect(wrapper.find(".setup-status__info--ban").text()).to.contain("Ban phase");
expect(wrapper.find(".setup-status__info--auction").exists()).to.equal(false);
wrapper.destroy();
@@ -128,74 +74,16 @@ describe("SetupStatus", () => {
});
}
- it("offers no explainer at all for a plain faction pick", () => {
+ it("renders no banner for a plain faction pick", () => {
const engine = new Engine(["init 2 setup-status-plain"]);
expect(engine.phase).to.equal(Phase.SetupFaction);
const wrapper = mountFor(engine);
- expect(wrapper.text()).to.contain("to pick a faction");
+ expect(wrapper.find(".setup-status").exists()).to.equal(false);
expect(wrapper.find(".setup-status__info").exists()).to.equal(false);
wrapper.destroy();
});
- /** One "mark name" chip per seat, in seat order. */
- function roster(wrapper: ReturnType
): string[] {
- return wrapper.findAll(".setup-status__chip").wrappers.map((chip) => chip.text().replace(/\s+/g, " ").trim());
- }
-
- it("does not repeat ban turn order in a second roster beneath the status line", () => {
- const engine = silentAuctionEngine(["p1 banFaction terrans"]);
- engine.players[0].name = "Mark";
- engine.players[1].name = "Ada";
- engine.players[2].name = "Bo";
-
- const wrapper = mountFor(engine);
- expect(wrapper.text()).to.contain("Ada's turn");
- expect(roster(wrapper)).to.deep.equal([]);
- expect(wrapper.find(".setup-status__roster").exists()).to.equal(false);
- wrapper.destroy();
- });
-
- it("tracks who has picked a faction", () => {
- const engine = silentAuctionEngine([
- "p1 banFaction terrans",
- "p2 banFaction lantids",
- "p3 banFaction gleens",
- "p1 faction itars",
- ]);
- expect(engine.phase).to.equal(Phase.SetupFaction);
-
- const wrapper = mountFor(engine);
- // A player with a faction is named by it once they have one, which is also the "done" signal.
- expect(roster(wrapper)).to.deep.equal(["✔ Itars", "▸ Player 2", "· Player 3"]);
- expect(wrapper.text()).to.contain("Picks");
- expect(wrapper.text()).to.contain("1 of 3 in");
- wrapper.destroy();
- });
-
- it("leaves the Silent Auction's secret-bid round to its own panel, which already has a roster", () => {
- // Both simultaneous bid rounds behave the same way here (see the Preference Split's own case
- // below). Hot-seat: the strip itself still shows, because the device really is passed around,
- // but the roster belongs to SilentAuctionBid.vue - two on one screen would just be noise.
- const engine = silentAuctionEngine([
- "p1 banFaction terrans",
- "p2 banFaction lantids",
- "p3 banFaction gleens",
- "p1 faction itars",
- "p2 faction taklons",
- "p3 faction xenos",
- "p1 silentBid itars 17 taklons 4 xenos 0",
- ]);
- expect(engine.phase).to.equal(Phase.SetupSilentBid);
-
- const wrapper = mountFor(engine);
- expect(wrapper.text()).to.contain("to submit their secret bids");
- expect(roster(wrapper)).to.deep.equal([]);
- // The one thing this must never leak.
- expect(wrapper.text()).to.not.contain("17");
- wrapper.destroy();
- });
-
it("says nothing at all while a hosted sealed auction is open, where nobody is 'on turn'", () => {
// Every seat bids at once, so naming one of them would be actively wrong - and the bid panel
// right below reports what is really happening (n of 3 in).
@@ -217,67 +105,13 @@ describe("SetupStatus", () => {
wrapper.destroy();
});
- it("marks the viewer's own seat and explains each remaining roster chip for a screen reader", () => {
- const engine = silentAuctionEngine([
- "p1 banFaction terrans",
- "p2 banFaction lantids",
- "p3 banFaction gleens",
- "p1 faction itars",
- ]);
- engine.players[1].name = "Ada";
-
- const wrapper = mountFor(engine, 1);
- const chips = wrapper.findAll(".setup-status__chip");
- expect(chips.at(0).classes()).to.contain("setup-status__chip--done");
- expect(chips.at(0).attributes("aria-label")).to.equal("Itars has picked a faction");
- expect(chips.at(1).classes()).to.contain("setup-status__chip--mine");
- expect(chips.at(1).attributes("aria-label")).to.equal("Ada has not picked yet");
- wrapper.destroy();
- });
-
- it("offers no roster where 'done' is not a state: the ascending auction and the booster round", () => {
- // Choose-Then-Bid: a player bids, gets outbid, bids again - there is nothing to tick off.
- const auction = new Engine(["init 2 setup-status-cb", "p1 faction terrans", "p2 faction xenos"], {
- auction: AuctionVariant.ChooseBid,
- });
- expect(auction.phase).to.equal(Phase.SetupAuction);
- let wrapper = mountFor(auction);
- expect(wrapper.text()).to.contain("to bid on a faction");
- expect(roster(wrapper)).to.deep.equal([]);
- wrapper.destroy();
-
- // And the starting-building round, where a player owes two placements rather than one.
- const buildings = new Engine(["init 2 setup-status-build", "p1 faction terrans", "p2 faction xenos"]);
- expect(buildings.phase).to.equal(Phase.SetupBuilding);
- wrapper = mountFor(buildings);
- expect(wrapper.text()).to.contain("starting buildings");
- expect(roster(wrapper)).to.deep.equal([]);
- wrapper.destroy();
- });
-
- it("leaves the Preference Split bid phase to its own panel, which already has a roster", () => {
- const engine = new Engine(
- ["init 3 setup-status-ps", "p1 faction itars", "p2 faction taklons", "p3 faction xenos"],
- { auction: AuctionVariant.PreferenceSplit, auctionBudget: 60 }
- );
- expect(engine.phase).to.equal(Phase.SetupPreferenceBid);
-
- // Hot-seat: the strip itself still shows (the device really is passed around), but the roster
- // belongs to PreferenceSplitBid.vue - two on one screen would just be noise.
- const wrapper = mountFor(engine);
- expect(wrapper.text()).to.contain("to split their bid points");
- expect(roster(wrapper)).to.deep.equal([]);
- wrapper.destroy();
- });
-
it("renders nothing once round 1 has started", () => {
- const setup = mountFor(new Engine(["init 2 setup-status-round1"]));
+ const setup = mountFor(silentAuctionEngine());
expect(setup.find(".setup-status").exists()).to.equal(true);
setup.destroy();
- // The strip is a round-0 thing only - from round 1 on, Commands.vue's own status line and the
- // mobile sticky bar take over.
- const engine = new Engine(["init 2 setup-status-round1"]);
+ // Contextual setup rules are not shown once play begins.
+ const engine = silentAuctionEngine();
(engine as any).round = 1;
const wrapper = mountFor(engine);
diff --git a/viewer/src/components/SetupStatus.vue b/viewer/src/components/SetupStatus.vue
index 65498568..55cbaca7 100644
--- a/viewer/src/components/SetupStatus.vue
+++ b/viewer/src/components/SetupStatus.vue
@@ -1,239 +1,62 @@
-
-
-
-
- {{ who }}
- {{ assignment }}
-
-
-
- Ban phase i
-
-
- Auction type i
-
-
-
-
-
-
+
+
- {{ classicAuctionDescription }}
-
-
-
-
-
- {{ rosterLabel }}
- i
+
+
- {{ row.done ? "✔" : row.onTurn ? "▸" : "·" }}
- {{ row.name }}
-
- {{ doneCount }} of {{ roster.length }} in
-
+ Auction type
i
+
+
+
+
+
+
+ {{ classicAuctionDescription }}
+