|
| 1 | +GET http://localhost:8080 |
| 2 | +HTTP 200 |
| 3 | +[Asserts] |
| 4 | +body contains "Welcome to Corporate Conundrum" |
| 5 | +body contains "Start a New Game" |
| 6 | +body not contains "An error occurred" |
| 7 | + |
| 8 | +GET http://localhost:8080/New%20Game.sql |
| 9 | +HTTP 302 |
| 10 | +[Captures] |
| 11 | +game_id: header "Location" regex "id=(-?\\d+)" |
| 12 | +[Asserts] |
| 13 | +header "Location" matches "^game\\.sql\\?id=-?\\d+$" |
| 14 | + |
| 15 | +GET http://localhost:8080/game.sql?id={{game_id}}&Player=Alice |
| 16 | +HTTP 200 |
| 17 | +[Asserts] |
| 18 | +body contains "Players" |
| 19 | +body contains "Alice" |
| 20 | +body contains "Add a new player" |
| 21 | +body not contains "An error occurred" |
| 22 | + |
| 23 | +GET http://localhost:8080/next-question.sql?game_id={{game_id}}&player=Alice |
| 24 | +HTTP 302 |
| 25 | +[Captures] |
| 26 | +question_id: header "Location" regex "question%5Fid=(\\d+)" |
| 27 | +[Asserts] |
| 28 | +header "Location" contains "question.sql" |
| 29 | +header "Location" contains "player=Alice" |
| 30 | + |
| 31 | +GET http://localhost:8080/question.sql?game_id={{game_id}}&question_id={{question_id}}&player=Alice |
| 32 | +HTTP 200 |
| 33 | +[Asserts] |
| 34 | +body contains "Submit your answer" |
| 35 | +body contains "Your answer" |
| 36 | +body not contains "An error occurred" |
| 37 | + |
| 38 | +GET http://localhost:8080/wait.sql?game_id={{game_id}}&question_id={{question_id}}&player=Alice&answer=42 |
| 39 | +HTTP 200 |
| 40 | +[Asserts] |
| 41 | +body contains "Waiting for other players to answer" |
| 42 | +body not contains "An error occurred" |
| 43 | + |
| 44 | +GET http://localhost:8080/next-question.sql?game_id={{game_id}}&player=Alice |
| 45 | +HTTP 302 |
| 46 | +[Asserts] |
| 47 | +header "Location" contains "game-over.sql" |
| 48 | + |
| 49 | +GET http://localhost:8080/game-over.sql?game_id={{game_id}} |
| 50 | +HTTP 200 |
| 51 | +[Asserts] |
| 52 | +body contains "The game is over" |
| 53 | +body contains "Scores" |
| 54 | +body contains "Alice" |
| 55 | +body not contains "An error occurred" |
0 commit comments