generated from Arquisoft/viade_0
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from Arquisoft/cucumber
intento de cucumber
- Loading branch information
Showing
4 changed files
with
959 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Feature: Adding a Route | ||
|
||
Scenario: The user wants to add the name, date and description for the Route |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const {defineFeature, loadFeature}= require('jest-cucumber'); | ||
const feature = loadFeature('./addRoute.feature'); | ||
|
||
defineFeature(feature, test => { | ||
beforeEach(async () =>{ | ||
awaut page.goto('http://localhost:3000') | ||
}) | ||
|
||
test('The user wants to add the name, date and description for the Route', ({given, when, then}) => { | ||
given('The user', () =>{ | ||
webId = 'https://exampleuser.solid.community/profile/card#me'; | ||
}); | ||
|
||
when('I fill the name, date and description', async () => { | ||
WebElement name = driver.findElement(By.name("name")); | ||
WebElement description = driver.findElement(By.name("description")); | ||
// Enter something to search for | ||
name.sendKeys('route1'); | ||
description.sendKeys('description for route1'); | ||
// Now submit the form. WebDriver will find the form for us from the element | ||
WebElement next = driver.findElement(By.type("submit")); | ||
click_button(next); | ||
}); | ||
|
||
then('Map page shoul show', () => { | ||
await expect(page).toMatchElement('span', {text: ' Click on the map to add trackpoints to your route' }); | ||
}); | ||
}); | ||
|
||
|
||
}); |
Oops, something went wrong.