diff --git a/test/acceptance/101.feature b/test/acceptance/101.feature new file mode 100644 index 0000000..a86caff --- /dev/null +++ b/test/acceptance/101.feature @@ -0,0 +1,7 @@ +Feature: Build Rooms and/or Build Stables + +Scenario: Abort task if player does not have enough resources + Given I start playing + When I select "Build Rooms and/or Build Stables" + Then the game tells me I do not have enough resources + diff --git a/test/acceptance/steps.js b/test/acceptance/steps.js index 5919fc3..029d83d 100644 --- a/test/acceptance/steps.js +++ b/test/acceptance/steps.js @@ -5,13 +5,14 @@ import { } from '@cucumber/cucumber'; const task_map = { - 'Day Laborer' : 106, - 'Plow 1 Field' : 104, - 'Sow and/or Bake bread': 113, - 'Take 1 Grain' : 103, - 'Take x Clay' : 108, - 'Take x Reed' : 109, - 'Take x Wood' : 107, + 'Build Rooms and/or Build Stables': 101, + 'Day Laborer' : 106, + 'Plow 1 Field' : 104, + 'Sow and/or Bake bread' : 113, + 'Take 1 Grain' : 103, + 'Take x Clay' : 108, + 'Take x Reed' : 109, + 'Take x Wood' : 107, }; const stock_map = { @@ -65,3 +66,7 @@ When('I feed my family', async function () { await this.send({type: 'task.completed', task_id: '002'}); }); +Then('the game tells me I do not have enough resources', async function () { + await this.assert(game => game.error === 'NOT_ENOUGH_RESOURCES'); +}); +