diff --git a/README.md b/README.md index 1e4bdc0..d4da0a3 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,24 @@ A little web-browser turn-based strategy game. Just open the `index.html` file with your browser of choice 👍 +## Features details: + +- Hover a unit to display a tooltip with extra information +- You can drag and drop a Roman soldier to move it, or just select it and then click where do you want to move it + # Url Params (cheat codes): -- Choose the map/level: 'index.html?level=2' +- Choose the map/level: `index.html?level=2` (1 - 10 are used for the main campaign, 0 and 11 - XX are used for testing) -- Mute the story narration on startup: 'index.html?muteNarration' -- Disable animations on startup: 'index.html?disableAnimations' -- Disable modals (pop-ups) on startup: 'index.html?disableModals' +- Mute the story narration on startup: `index.html?muteNarration` +- Disable animations on startup: `index.html?disableAnimations` +- Disable modals (pop-ups) on startup: `index.html?disableModals` + +Example (useful for manual testing): -Example (useful for manual testing): `index.html?level=12&muteNarration&disableAnimations&disableModals` +``` +index.html?level=12&muteNarration&disableAnimations&disableModals +``` # How to test diff --git a/cypress/integration/core/soldiers_actions.spec.js b/cypress/integration/core/soldiers_actions.spec.js index d9ee02a..f060d31 100644 --- a/cypress/integration/core/soldiers_actions.spec.js +++ b/cypress/integration/core/soldiers_actions.spec.js @@ -33,7 +33,7 @@ context("Soldiers actions", () => { cy.get("#strength").should("contain", "Combat strength: [2]."); moreStrength(); - cy.get("#modal-content").should("contain", "You don't have enough gold!"); + cy.get("#modal-content").should("contain", "You don't have enough 💰!"); click("#modal-ok"); cy.get("#strength").should("contain", "Combat strength: [2]."); @@ -46,20 +46,32 @@ context("Soldiers actions", () => { click("#icon70a"); cy.get("#strength").should("contain", "Combat strength: [1]."); - cy.get("#improve_strength").should("contain", "Improve Strength (1 Gold)"); + cy.get("#improve_strength").should( + "contain", + "💪 Improve Strength (-1 💰)" + ); cy.get("#gold").should("have.value", 4); moreStrength(); cy.get("#gold").should("have.value", 3); cy.get("#strength").should("contain", "Combat strength: [2]."); - cy.get("#improve_strength").should("contain", "Improve Strength (2 Gold)"); + cy.get("#improve_strength").should( + "contain", + "💪 Improve Strength (-2 💰)" + ); click("#icon71a"); cy.get("#strength").should("contain", "Combat strength: [1]."); - cy.get("#improve_strength").should("contain", "Improve Strength (1 Gold)"); + cy.get("#improve_strength").should( + "contain", + "💪 Improve Strength (-1 💰)" + ); moreStrength(); cy.get("#gold").should("have.value", 2); cy.get("#strength").should("contain", "Combat strength: [2]."); - cy.get("#improve_strength").should("contain", "Improve Strength (2 Gold)"); + cy.get("#improve_strength").should( + "contain", + "💪 Improve Strength (-2 💰)" + ); }); it("Destroy one of the soldiers after confirmation", () => { diff --git a/cypress/integration/core/towns.spec.js b/cypress/integration/core/towns.spec.js index 85b4825..acb198e 100644 --- a/cypress/integration/core/towns.spec.js +++ b/cypress/integration/core/towns.spec.js @@ -46,12 +46,12 @@ context("Towns upgrades and unit generation", () => { click("#icon11A"); cy.get("#prod").should( "contain", - "Producing [1] soldiers with [1] strength each turn. Upgrade: " + "Producing [1] soldiers with [1] strength each turn." ); click("#improve_quantity"); cy.get("#prod").should( "contain", - "Producing [2] soldiers with [1] strength each turn. Upgrade: " + "Producing [2] soldiers with [1] strength each turn." ); endTurn(); @@ -74,7 +74,7 @@ context("Towns upgrades and unit generation", () => { click("#icon11A"); cy.get("#prod").should( "contain", - "Producing [1] soldiers with [1] strength each turn. Upgrade: " + "Producing [1] soldiers with [1] strength each turn." ); endTurn(); @@ -87,7 +87,7 @@ context("Towns upgrades and unit generation", () => { click("#icon11A"); cy.get("#prod").should( "contain", - "Producing [1] soldiers with [2] strength each turn. Upgrade: " + "Producing [1] soldiers with [2] strength each turn." ); endTurn(); diff --git a/index.html b/index.html index b6a5ffa..1a9de53 100644 --- a/index.html +++ b/index.html @@ -23,12 +23,12 @@