Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/target/
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>sapi2020test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
6 changes: 6 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.5
4 changes: 3 additions & 1 deletion src/test/java/ro/sapientia/mesteri2015/SCRUMTitleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
public class SCRUMTitleTest {
public class SCRUMTitleTest
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package ro.sapientia.mesteri2015.test;

import java.util.concurrent.TimeUnit;

import org.junit.Assert;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;

import cucumber.api.java.After;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class ASCRUMAddPriorityStepDefinition {

protected WebDriver driver;

@Before
public void setup() {
driver = new FirefoxDriver();
}

@Given("^I open the scrum tool priority add page$")
public void I_open_the_scrum_tool_priority_add_page() throws Throwable {
// Set implicit wait of 10 seconds and launch google
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.get("http://localhost:8080/priority/add");
}

@When("^I enter \"([^\"]*)\" in the name textbox and I push the add button$")
public void I_enter_in_the_name_textbox_and_I_push_the_add_button(
String additionTerms) throws Throwable {
WebElement addButton = driver.findElement(By.id("add-priority-button"));
addButton.click();

// Write term in google textbox
WebElement titleTextBox = driver.findElement(By.id("priority-name"));
titleTextBox.clear();
titleTextBox.sendKeys(additionTerms);

// Click on searchButton
WebElement searchButton = driver.findElement(By.id("add-priority-button"));
searchButton.click();
}

@Then("^I should get result \"([^\"]*)\" in priority list$")
public void I_should_get_result_in_priorities_list(String expectedResult)
throws Throwable {
WebElement calculatorTextBox = driver.findElement(By.id("priority-name"));
String result = calculatorTextBox.getText();

// Verify that result of 2+2 is 4
Assert.assertEquals(result, expectedResult);

driver.close();
}

@After
public void closeBrowser() {
driver.quit();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package ro.sapientia.mesteri2015.test;

import java.util.concurrent.TimeUnit;

import org.junit.Assert;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;

import cucumber.api.java.After;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class BSCRUMAssignPriorityStepDefinition {

protected WebDriver driver;

@Before
public void setup() {
driver = new FirefoxDriver();
}

@Given("^I open the scrum tool priority assign page$")
public void I_open_the_scrum_tool_priority_add_page() throws Throwable {
// Set implicit wait of 10 seconds and launch google
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.get("http://localhost:8080/story/add");
}

@When("^I enter \"([^\"]*)\" in the title textbox select \"([^\"]*)\" and I push the add button$")
public void I_enter_in_the_title_textbox_select_priority_and_I_push_the_add_button(
String additionTerms, String priority) throws Throwable {
//WebElement addButton = driver.findElement(By.id("add-button"));
//addButton.click();

// Write term in google textbox
WebElement titleTextBox = driver.findElement(By.id("story-title"));
titleTextBox.clear();
titleTextBox.sendKeys(additionTerms);

Select prioritySelect = new Select( driver.findElement(By.id( "story-priority" )) );
prioritySelect.selectByVisibleText( priority );

// Click on searchButton
WebElement searchButton = driver.findElement(By.id("add-story-button"));
searchButton.click();
}

@Then("^I should get result \"([^\"]*)\" in story detail page$")
public void I_should_get_result_in_story_detail_page(String expectedResult)
throws Throwable {
WebElement calculatorTextBox = driver.findElement(By.id("priority-name"));
String result = calculatorTextBox.getText();

// Verify that result of 2+2 is 4
Assert.assertEquals(result, expectedResult);

driver.close();
}

@After
public void closeBrowser() {
driver.quit();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class SCRUMTitleStepDefinition {
public class CSCRUMTitleStepDefinition {

protected WebDriver driver;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class SCRUMSprintUpdateStepDefinition {
public class DSCRUMSprintUpdateStepDefinition {

protected WebDriver driver;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package ro.sapientia.mesteri2015.test;

import java.util.concurrent.TimeUnit;

import org.junit.Assert;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;

import cucumber.api.java.After;
import cucumber.api.java.Before;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

public class ESCRUMPriorityUpdateStepDefinition {

protected WebDriver driver;

@Before
public void setup() {
driver = new FirefoxDriver();
}

@Given("^I edit the scrum list's first priority$")
public void I_edit_the_scrum_list_s_first_priority() throws Throwable {
// Express the Regexp above with the code you wish you had
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.get("http://localhost:8080/priority/list");
}

@When("^I enter \"([^\"]*)\" in the name textbox and I push the update button$")
public void I_enter_in_the_name_textbox_and_I_push_the_update_button(String updateTitle) throws Throwable {
// Express the Regexp above with the code you wish you had
WebElement addButton = driver.findElement(By.id("priority-1"));
addButton.click();
//driver.wait(1000);
WebElement updateButton = driver.findElement(By.id("action-update-button"));
updateButton.click();
//driver.wait(1000);
WebElement titleField = driver.findElement(By.id("priority-name"));
titleField.sendKeys(Keys.CONTROL + "a");
titleField.sendKeys(Keys.DELETE);
titleField.sendKeys(updateTitle);

WebElement updateStoryButton = driver.findElement(By.id("update-priority-button"));
updateStoryButton.click();

}

@Then("^I should get result \"([^\"]*)\" in new priority list$")
public void I_should_get_result_in_new_priority_list(String expectedResult) throws Throwable {
// Express the Regexp above with the code you wish you had
WebElement titleText = driver.findElement(By.id("priority-name"));
String result = titleText.getText();

// Verify that result of 2+2 is 4
Assert.assertEquals(result, expectedResult);
//Assert.assertNotSame(result, expectedResult);
driver.close();
}

@After
public void closeBrowser() {
driver.quit();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature: Check if the scrum priority add
As Sapientia scrum tool user I want to be able to add priorities

Scenario: Low
Given I open the scrum tool priority assign page
When I enter "low" in the name textbox and I push the add button
Then I should get result "low" in priority list
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature: Check if the scrum priority assign
As Sapientia scrum tool user I want to be able to asign priority to a user

Scenario: Assign priority to new story
Given I open the scrum tool story add page
When I enter "Story for priority1" in the title textbox select "low" and I push the add button
Then I should get result "low" in story detail page
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature: Check if the priority update works
As Sapientia scrum tool user I want to be able to update a priority

Scenario: UpdateFirst
Given I edit the scrum list's first priority
When I enter "updatefirstnew" in the name textbox and I push the update button
Then I should get result "updatefirstnew" in new priority list
2 changes: 1 addition & 1 deletion target/classes/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
Built-By: sapi
Build-Jdk: 11.0.9
Build-Jdk: 11.0.9.1
Created-By: Maven Integration for Eclipse

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Generated by Maven Integration for Eclipse
#Thu Nov 12 19:29:30 EET 2020
m2e.projectLocation=/home/sapi/git/sapi02
m2e.projectName=SCRUMSeleniumCucumberTest
#Tue Jan 12 20:03:31 EET 2021
m2e.projectLocation=/home/sapi/Desktop/tesztprojekt/sapi2020test
m2e.projectName=sapi2020test
groupId=CucumberScrumSapientia
artifactId=cucumberScumSapientia
version=0.0.1-SNAPSHOT

This file was deleted.

This file was deleted.