|
@avalanche_demo
Feature: Avalanche Demo
In order to test avalanche
As an developer
I want a tour thru the system
Background:
Given the website is configured
And the following list of missions
| title | objective | briefing | status |
| Test 001 | 1 2 3 testing | Testing the website | 2 |
| Bank Robbery | Rob a bank and get rich | The target will be Fort Knox. Only expert agents allowed. | 2 |
And the the mission "Bank Robbery" has the following rewards
| title | description | img |
| 1M Dollars | You get 1.000.000,00 dollars | money.png |
| 200K Dollars | You get 200.000,00 dollars | money.png |
And the the mission "Bank Robbery" has the following agents
| role | objective | briefing | description |
| Mr. Pink | Get the inside the vault | Find the manager, make him open the vault and get all the money | |
| Mr. Blue | Take care of the hostages | Make sure the hostages dont try anything stupid. | |
| Mr. Green | Drive the gettaway car | Wait for the others to return and lose the cops. | |
And the agent "Mr. Pink" in the mission "Bank Robbery" has the following steps
| position | title | description | completed |
| 1 | Get to the bank | Make everbody surrender | false |
| 2 | Find the bank manager | Find the bank manager with the vault keys | false |
| 3 | Open the vault | Use the keys to open the vault | false |
| 4 | Get the money | Put all the money in the bag | false |
| 5 | Leave the bank | Exit the bank and get to the getaway car | false |
And the step "Get to the bank" from agent "Mr. Pink" in the mission "Bank Robbery" has the following validations
| validation_type | description |
| ValidationText | What time did you arrive? |
| ValidationText | How many hostages where there? |
And the step "Find the bank manager" from agent "Mr. Pink" in the mission "Bank Robbery" has the following validations
| validation_type | description |
| ValidationText | What is the bank manager's name? |
And the agent "Mr. Blue" in the mission "Bank Robbery" has the following steps
| position | title | description | completed |
| 1 | Get to the bank | Make everbody surrender | false |
| 2 | Secure the hostages | Secure the hostages while Mr. pink gets the vault | false |
| 3 | Leave the bank | Exit the bank and get to the getaway car | false |
And the agent "Mr. Green" in the mission "Bank Robbery" has the following steps
| position | title | description | completed |
| 1 | Get a good car for the job | Find a good car for the mission | false |
| 2 | Take everbody to the bank | Take Mr. Pink and Mr. Blue to the bank | false |
| 3 | Getaway | Wait for Mr. Pink and Mr. Blue to return and lose the cops | false |
And the agent "Mr. Pink" in the mission "Bank Robbery" has the reward "1M Dollars"
And the agent "Mr. Blue" in the mission "Bank Robbery" has the reward "1M Dollars"
And the agent "Mr. Green" in the mission "Bank Robbery" has the reward "200K Dollars"
@javascript
Scenario: Avalanche Tour
Given the user "Monty" "Cantsin" with email "monty_cantsin@canada.com" and password "12345678" exists
And I am not logged in
When I go to the homepage
Then I should see ""
And I wait for 1 seconds
And I go to the login page
Then I should see "Sign In"
And I log in with the email "monty_cantsin@canada.com" and password "12345678"
Then I should see "Signed in successfully"
And I should see "Monty Cantsin"
And I wait for 3 seconds
And I go to the missions page
And I wait for 3 seconds
And I click in the link "New Mission"
And I wait for 1 seconds
Then within "h1" I should see "Create Mission"
And I fill in "Mission Title" with "Treaure Hunt"
And I fill in "Mission Objective" with "Follow the steps to find the treasure."
And I fill in "Mission Briefing" with "Hello, welcome to the Treasure Hunt Mission!"
And I upload the file "cats_with_lasers.jpg" to the field "mission_cover_img"
And I fill in "mission_duration_number" with "5"
And I wait for 1 seconds
And I click in the button "Save & Continue"
And I wait for 2 seconds
Then within "h1" I should see "Rewards"
And I should see "No rewards"
And I click in the link "Add Reward"
Then within "h1" I should see "Add Reward"
And I fill in "Reward Title" with "Chocolate Bar"
And I fill in "Reward Description" with "A Delicious chocolate bar."
And I upload the file "chocolate_bar.png" to the field "reward_img"
And I click in the button "Save Reward"
And I wait for 2 seconds
Then within "h1" I should see "Rewards"
And I should see "Chocolate Bar"
And I click in the link "Next"
And I wait for 2 seconds
Then within "h1" I should see "Agents"
And I should see "No agents"
And I click in the link "Add Agent Role"
Then within "h1" I should see "Add Agent"
And I fill in "Agent Role" with "Treasure Hunter"
And I fill in "Objective" with "Follow the step to find the treasure."
And I fill in "Briefing" with "Follow each step carefully to get to the secret location where the treasure is hidden."
Then within the ".step_form" number "1" I click in the link "Step"
Then within the ".step_form" number "1" I fill in "Step Title" with "Go to the train station"
And within the ".step_form" number "1" I fill in "Description" with "Start of by going to the train station."
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "1" I fill in "Validation description" with "What is the name of the station?"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "2" I fill in "Validation description" with "What time did you arrive?"
And I click in the link "Add a step"
Then within the ".step_form" number "2" I click in the link "Step"
And within the ".step_form" number "2" I fill in "Step Title" with "Get the first train"
And within the ".step_form" number "2" I fill in "Description" with "Take the first train towards the countryside"
And within the ".step_form" number "2" I click in the link "Add Validation"
And within the ".step_form" number "2" I click in the link "Text Validation"
And within the ".step-validation" number "3" I fill in "Validation description" with "What is the final destination?"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "4" I fill in "Validation description" with "What is your ETA?"
And I click in the link "Add a step"
Then within the ".step_form" number "3" I click in the link "Step"
And within the ".step_form" number "3" I fill in "Step Title" with "Go to the last station"
And within the ".step_form" number "3" I fill in "Description" with "Stay in the train ultil it reaches the last station in the line. Get out of the train"
And I click in the link "Add a step"
Then within the ".step_form" number "4" I click in the link "Step"
And within the ".step_form" number "4" I fill in "Step Title" with "Wait for the pickup"
And within the ".step_form" number "4" I fill in "Description" with "Somebody is gonna come and take you to the next checkpoint"
And I wait for 2 seconds
And I click in the button "Save Agent"
And I wait for 1 seconds
And I click in the link "Add Agent Role"
Then within "h1" I should see "Add Agent"
And I fill in "Agent Role" with "Treasure Hunter"
And I fill in "Objective" with "Follow the step to find the treasure."
And I fill in "Briefing" with "Follow each step carefully to get to the secret location where the treasure is hidden."
Then within the ".step_form" number "1" I click in the link "Step"
Then within the ".step_form" number "1" I fill in "Step Title" with "Go to the train station"
And within the ".step_form" number "1" I fill in "Description" with "Start of by going to the train station."
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "1" I fill in "Validation description" with "What is the name of the station?"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "2" I fill in "Validation description" with "What time did you arrive?"
And I wait for 1 seconds
And I click in the button "Save Agent"
And I wait for 1 seconds
And I click in the link "Add Agent Role"
Then within "h1" I should see "Add Agent"
And I fill in "Agent Role" with "Treasure Hunter"
And I fill in "Objective" with "Follow the step to find the treasure."
And I fill in "Briefing" with "Follow each step carefully to get to the secret location where the treasure is hidden."
Then within the ".step_form" number "1" I click in the link "Step"
Then within the ".step_form" number "1" I fill in "Step Title" with "Go to the train station"
And within the ".step_form" number "1" I fill in "Description" with "Start of by going to the train station."
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "1" I fill in "Validation description" with "What is the name of the station?"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Add Validation"
And within the ".step_form" number "1" I click in the link "Text Validation"
And within the ".step-validation" number "2" I fill in "Validation description" with "What time did you arrive?"
And I wait for 1 seconds
And I click in the button "Save Agent"
And I wait for 3 seconds
Then within "h1" I should see "Agents"
And I should see "Treasure Hunter"
And I click in the link "Next"
Then within "h1" I should see "Launch Mission"
And I wait for 2 seconds
And I click in the link "Review Mission"
And I wait for 2 seconds
Then within "h1" I should see "Treaure Hunt"
And I should see "Planning"
And I should see "Follow the steps to find the treasure."
And I should see "Hello, welcome to the Treasure Hunt Mission!"
And I should see "Chocolate Bar"
And within ".mission-director-name" I should see "Monty Cantsin"
Then within "#mission-tabs-nav" I click in the link "Agents"
And I wait for 2 seconds
And I should see "Treasure Hunter"
And I should see "Planning"
And I should see "Follow the step to find the treasure."
And I should see "Go to the train station"
And I should see "Get the first train"
And I should not see "Go to the last station"
And I should not see "Wait for the pickup"
Then I click in the link "Edit Mission"
And I wait for 3 seconds
And within "h1" I should see "Launch Mission"
And I click in the link "Launch Mission"
Then within "h1" I should see "Treaure Hunt"
And I should see "Launched"
And within ".mission-timer" I should see "5"
And I should see "Days remaining"
And within ".mission-director-name" I should see "Monty Cantsin"
And I wait for 3 seconds
Then I go to the missions page
And I wait for 3 seconds
Then I go to the homepage
And I wait for 3 seconds
|