diff --git a/backend/package.json b/backend/package.json
index b702876..8b9ba3b 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -10,9 +10,9 @@
"local": "cross-env NODE_ENV=local nodemon index.js",
"lint": "eslint .",
"start:test": "cross-env NODE_ENV=local-test jest --verbose -i",
- "start:test:issue":"cross-env NODE_ENV=local-test jest --verbose tests/issue_api.test.js",
- "start:test:label":"cross-env NODE_ENV=local-test jest --verbose tests/label_api.test.js",
- "start:test:issue-label":"cross-env NODE_ENV=local-test jest --verbose tests/issue-label_cross.test.js"
+ "start:test:issue": "cross-env NODE_ENV=local-test jest --verbose tests/issue_api.test.js",
+ "start:test:label": "cross-env NODE_ENV=local-test jest --verbose tests/label_api.test.js",
+ "start:test:issue-label": "cross-env NODE_ENV=local-test jest --verbose tests/issue-label_cross.test.js"
},
"author": "",
"license": "ISC",
diff --git a/test/.gitignore b/test/.gitignore
index fb77e5b..1154b89 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -1,4 +1,3 @@
target
-src/test/java/gmibank/runners
+src/test/java/issueTracker/Runners
.idea
-libraries
\ No newline at end of file
diff --git a/test/issueTracker.iml b/test/issueTracker.iml
new file mode 100644
index 0000000..78b2cc5
--- /dev/null
+++ b/test/issueTracker.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/test/pom.xml b/test/pom.xml
index 9223bc7..ca21250 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -5,56 +5,35 @@
4.0.0
org.example
- issuetracker
+ issueTracker
1.0-SNAPSHOT
1.8
1.8
+
-
-
- org.postgresql
- postgresql
- 42.2.14
-
-
-
- io.rest-assured
- rest-assured
- 4.3.0
- test
-
-
-
- org.testng
- testng
- 7.1.0
- test
-
-
-
- com.itextpdf
- itextpdf
- 5.4.2
-
+
- com.microsoft.sqlserver
- mssql-jdbc
- 8.2.2.jre8
+ io.github.bonigarcia
+ webdrivermanager
+ 3.8.1
-
+
+
- com.fasterxml.jackson.core
- jackson-databind
- 2.9.8
+ org.seleniumhq.selenium
+ selenium-java
+ 3.141.59
+
io.cucumber
cucumber-java
5.7.0
+
io.cucumber
@@ -62,71 +41,69 @@
5.7.0
test
+
+
org.slf4j
slf4j-simple
1.7.30
test
-
+
- org.seleniumhq.selenium
- selenium-java
- 3.141.59
+ mysql
+ mysql-connector-java
+ 8.0.19
-
- io.github.bonigarcia
- webdrivermanager
- 3.8.1
-
-
-
- org.apache.poi
- poi
- 4.1.2
-
-
-
- org.apache.poi
- poi-ooxml
- 4.1.2
-
-
-
- com.github.javafaker
- javafaker
- 1.0.2
-
-
- com.itextpdf
- itextpdf
- 5.5.10
-
-
- org.apache.pdfbox
- pdfbox
- 2.0.4
+ io.rest-assured
+ rest-assured
+ 4.3.0
+ test
-
+
+
+
org.apache.maven.plugins
- maven-surefire-plugin
+ maven-failsafe-plugin
+ 3.0.0-M1
true
+ false
+
+ **/Runners/*Runner*.java
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.0.0-M1
+
+ classes
+ perthread
+ 2
+ false
+ -Duser.language=en
+ -Xmx1024m
+ -XX:MaxPermSize=256m
+ -Dfile.encoding=UTF-8
+ false
- **/*CukesRunner.java
+ **/Runners/*Runner*.java
+ true
net.masterthought
maven-cucumber-reporting
- 4.4.0
+ 5.0.0
execution
@@ -136,32 +113,18 @@
cucumber-jvm-example
-
${project.build.directory}
-
${project.build.directory}
-
- **/cucumber.json
-
-
-
- sample.properties
- other.properties
-
-
+ **/json-reports/*.json
+ ->
+ sample.properties
+ other.properties
+
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- 8
-
-
diff --git a/test/src/test/java/issueTracker/Pages/IssueListPage.java b/test/src/test/java/issueTracker/Pages/IssueListPage.java
index f438c8e..7a8e59b 100644
--- a/test/src/test/java/issueTracker/Pages/IssueListPage.java
+++ b/test/src/test/java/issueTracker/Pages/IssueListPage.java
@@ -17,6 +17,20 @@ public IssueListPage() {
public WebElement text;
@FindBy(xpath = "//tbody//tr")
public List rows;
+ @FindBy(xpath = "//div[@class='info']")
+ public WebElement message;
+ @FindBy(id = "validationCustom01")
+ public WebElement titleUpdate;
+ @FindBy(xpath = "//button[@type='submit']")
+ public WebElement updateButton;
+ @FindBy(xpath = "//button[@class='btn btn-danger']")
+ public WebElement cancelButton;
+ @FindBy(id = "validationCustom02")
+ public WebElement descriptionUpdate;
+ @FindBy(id = "validationCustom03")
+ public WebElement labelsUpdate;
+ @FindBy(xpath = "//tbody//tr")
+ public List issueList;
public static WebElement findingThead(String columnName) {
int columnNumber = 0;
@@ -33,4 +47,5 @@ public static WebElement findingThead(String columnName) {
WebElement thead = Driver.getDriver().findElement(By.xpath("//thead//th[" + columnNumber + "]"));
return thead;
}
+
}
\ No newline at end of file
diff --git a/test/src/test/java/issueTracker/Runners/Runner.java b/test/src/test/java/issueTracker/Runners/Runner.java
deleted file mode 100644
index fa7a6c1..0000000
--- a/test/src/test/java/issueTracker/Runners/Runner.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package issueTracker.Runners;
-
-import io.cucumber.junit.Cucumber;
-import io.cucumber.junit.CucumberOptions;
-import org.junit.runner.RunWith;
-
-@RunWith(Cucumber.class)
-@CucumberOptions(strict = true,
- plugin = {
- "html:target/default-cucumber-reports",
- "json:target/json-reports/cucumber.json",
- "junit:target/xml-report/cucumber.xml"
- },
- //plugin = "html:target\\default-cucumber-reports",
- features ="src/test/resources/features",
- glue = "issueTracker/StepDefinitions",
- tags = "@api",
- dryRun = false
-)
-public class Runner {
-}
diff --git a/test/src/test/java/issueTracker/StepDefinitions/ApiStepDefs.java b/test/src/test/java/issueTracker/StepDefinitions/ApiStepDefs.java
index 2aaa608..b6b3ebc 100644
--- a/test/src/test/java/issueTracker/StepDefinitions/ApiStepDefs.java
+++ b/test/src/test/java/issueTracker/StepDefinitions/ApiStepDefs.java
@@ -4,8 +4,7 @@
import io.restassured.http.ContentType;
import io.restassured.response.Response;
import issueTracker.Utilities.ConfigReader;
-
-import static io.restassured.RestAssured.*;
+import static io.restassured.RestAssured.given;
public class ApiStepDefs {
@Given("user gets all data from api")
diff --git a/test/src/test/java/issueTracker/StepDefinitions/CreateIssueStepDefs.java b/test/src/test/java/issueTracker/StepDefinitions/CreateIssueStepDefs.java
index 3e0de71..37d8ee4 100644
--- a/test/src/test/java/issueTracker/StepDefinitions/CreateIssueStepDefs.java
+++ b/test/src/test/java/issueTracker/StepDefinitions/CreateIssueStepDefs.java
@@ -5,7 +5,7 @@
import issueTracker.Utilities.ConfigReader;
import issueTracker.Utilities.Driver;
import issueTracker.Utilities.Pages;
-import javafx.beans.value.WeakChangeListener;
+import issueTracker.Utilities.ReusableMethods;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
@@ -16,6 +16,7 @@
public class CreateIssueStepDefs {
Pages pages = new Pages();
+ ReusableMethods reusableMethods =new ReusableMethods();
@Given("user on the homepage")
public void user_on_the_homepage() {
@@ -53,16 +54,19 @@ public void user_clicks_on_create_new_issue_button() {
}
@Then("verify that issue list has {string}")
public void verify_that_issue_list_has(String title) {
+ reusableMethods.wait(2);
+ pages.homePage().issueListButton.click();
+
List rowText= new ArrayList<>();
for (int i=0;i http://www.fhctrip.com/Account/Logon
+// }
+
}
diff --git a/test/src/test/java/issueTracker/Utilities/DatabaseUtility.java b/test/src/test/java/issueTracker/Utilities/DatabaseUtility.java
deleted file mode 100644
index 17368c0..0000000
--- a/test/src/test/java/issueTracker/Utilities/DatabaseUtility.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package issueTracker.Utilities;
-import java.sql.*;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-
-public class DatabaseUtility {
- private static Connection connection;
- private static Statement statement;
- private static ResultSet resultSet;
- public static void createConnection() {
- String url = "jdbc:postgresql://157.230.48.97:5432/gmibank_db";
- String user = "techprodb_user";
- String password = "Techpro_@126";
- try {
- connection = DriverManager.getConnection(url, user, password);
- } catch (SQLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- public static void createConnection(String url, String user, String password) {
- try {
- connection = DriverManager.getConnection(url, user, password);
- } catch (SQLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- public static void closeConnection() {
- try {
- if (resultSet != null) {
- resultSet.close();
- }
- if (statement != null) {
- statement.close();
- }
- if (connection != null) {
- connection.close();
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
- /**
- *
- * @param query
- * @return returns a single cell value. If the results in multiple rows and/or
- * columns of data, only first column of the first row will be returned.
- * The rest of the data will be ignored
- */
- public static Object getCellValue(String query) {
- return getQueryResultList(query).get(0).get(0);
- }
- /**
- *
- * @param query
- * @return returns a list of Strings which represent a row of data. If the query
- * results in multiple rows and/or columns of data, only first row will
- * be returned. The rest of the data will be ignored
- */
- public static List