Skip to content

Commit

Permalink
Inventory Module is merge to the main
Browse files Browse the repository at this point in the history
  • Loading branch information
BalamiRR committed Aug 29, 2022
1 parent 8e62ef7 commit f444d9d
Show file tree
Hide file tree
Showing 44 changed files with 102 additions and 74 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>upgenix-qa</artifactId>
<artifactId>testinium-qa</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.pages;
package com.testinium.pages;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.pages;
package com.testinium.pages;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.pages;
package com.testinium.pages;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
Expand All @@ -20,11 +20,15 @@ public InventoryP(){
@FindBy(className = "o-kanban-button-new")
public WebElement createBtn;

@FindBy(className = "o_form_button_save")
@FindBy(xpath = "//button[@class='btn btn-primary btn-sm o_form_button_save']")
public WebElement saveBtn;

@FindBy(className = "o_notification_manager")
public WebElement fieldError;

@FindBy(id = "o_field_input_479")
public WebElement productName;

@FindBy(xpath = "//span[.='EY']")
public WebElement productsList;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.pages;
package com.testinium.pages;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.pages;
package com.testinium.pages;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.pages;
package com.testinium.pages;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.upgenix.runners;
package com.testinium.runners;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
Expand All @@ -13,7 +13,7 @@
"me.jvt.cucumber.report.PrettyReports:target/cucumber"
},
features = "src/main/resources/features",
glue = "com/upgenix/step_definitions",
glue = "com/testinium/step_definitions",
dryRun = false,
tags = "@Deneme"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.upgenix.runners;
package com.testinium.runners;


import io.cucumber.junit.Cucumber;
Expand All @@ -7,7 +7,7 @@

@RunWith(Cucumber.class)
@CucumberOptions(
glue = "com/upgenix/step_definitions",
glue = "com/testinium/step_definitions",
features = "@target/rerun.txt"
)
public class FailedTestRunner {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.pages.CalendarP;
import com.upgenix.utilities.ConfigurationReader;
import com.upgenix.utilities.Driver;
import com.testinium.pages.CalendarP;
import com.testinium.utilities.Driver;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import org.junit.Assert;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.pages.EmployeeP;
import com.upgenix.utilities.ConfigurationReader;
import com.upgenix.utilities.Driver;
import com.testinium.pages.EmployeeP;
import com.testinium.utilities.ConfigurationReader;
import com.testinium.utilities.Driver;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import org.junit.Assert;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.utilities.Driver;
import com.testinium.utilities.Driver;
import io.cucumber.java.Scenario;
import org.junit.After;
import org.openqa.selenium.OutputType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.pages.InventoryP;
import com.upgenix.utilities.Driver;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import com.testinium.pages.InventoryP;
import com.testinium.utilities.Driver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand All @@ -13,7 +13,8 @@ public class Inventory {
WebDriverWait wait = new WebDriverWait(Driver.getDriver(), 20);

@When("Logged user clicks on Inventory Module")
public void logged_user_clicks_on_inventory_module() {
public void logged_user_clicks_on_inventory_module() throws InterruptedException {
Thread.sleep(3000);
inventory.inventoryModule.click();
}

Expand All @@ -33,9 +34,9 @@ public void user_clicks_create_button() {
inventory.createBtn.click();
}

@Then("User clicks the save button without entering any info")
public void user_clicks_the_save_button_without_entering_any_info() {
wait.until(ExpectedConditions.visibilityOf(inventory.createBtn));
@When("User clicks the save button")
public void user_clicks_the_save_button() {
wait.until(ExpectedConditions.visibilityOf(inventory.saveBtn));
inventory.saveBtn.click();
}

Expand All @@ -44,6 +45,24 @@ public void user_should_see_the_error() {
inventory.fieldError.isDisplayed();
}

@When("User enters Product Name")
public void user_enters_product_name() {
inventory.productName.sendKeys("IBM");
}

@Then("User should see the title includes the Product Name")
public void user_should_see_the_title_includes_the_product_name() {
inventory.productsList.isDisplayed();
}












Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.pages.LogOutP;
import com.upgenix.utilities.Driver;
import com.testinium.pages.LogOutP;
import com.testinium.utilities.Driver;
import org.junit.Assert;
import org.openqa.selenium.support.ui.WebDriverWait;
import io.cucumber.java.en.Then;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.pages.LoginP;
import com.upgenix.utilities.ConfigurationReader;
import com.upgenix.utilities.Driver;
import com.testinium.pages.LoginP;
import com.testinium.utilities.ConfigurationReader;
import com.testinium.utilities.Driver;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.upgenix.step_definitions;
package com.testinium.step_definitions;

import com.upgenix.pages.SessionP;
import com.upgenix.utilities.ConfigurationReader;
import com.upgenix.utilities.Driver;
import com.testinium.pages.SessionP;
import com.testinium.utilities.ConfigurationReader;
import com.testinium.utilities.Driver;
import io.cucumber.java.en.When;

public class Session {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.upgenix.utilities;
package com.testinium.utilities;

import java.io.FileInputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.upgenix.utilities;
package com.testinium.utilities;

import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.WebDriver;
Expand Down
29 changes: 16 additions & 13 deletions src/main/resources/features/Inventory.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Upgenix app Inventory feature
Feature: Testinium app Inventory feature

User Story:
Background: As a Posmanager, should be able to check and edit the Inventory of the company.
Expand All @@ -12,25 +12,28 @@ Feature: Upgenix app Inventory feature
When Logged user clicks on Inventory Module
And User clicks on Product module
And User see the products
Then User clicks create button
And User clicks create button
Then User should see the dashboard

Scenario:Verify that if Product name field leaves blank, an error message "The following fields are invalid:" is appeared
Scenario: Verify that after creating a Product, the page title includes the Product name.
When Logged user clicks on Inventory Module
And User clicks on Product module
And User see the products
Then User clicks create button
And User clicks the save button without entering any info
And User clicks create button
And User enters Product Name
And User clicks the save button
And User clicks on Product module
Then User should see the title includes the Product Name

Scenario:Verify that if Product name field leaves blank, an error message 'The following fields are invalid:' is appeared
When Logged user clicks on Inventory Module
And User clicks on Product module
And User clicks create button
And User clicks the save button
Then User should see the error

Scenario: Verify that the user should be able to see created Product is listed after clicking the Products module.





#
#Verify that if Product name field leaves blank, an error message "The following fields are invalid:" is appeared.
#
#Verify that after creating a Product, the page title includes the Product name.
#
#Verify that the user should be able to see created Product is listed after clicking the Products module.
#
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed target/classes/com/upgenix/pages/InventoryP.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
29 changes: 16 additions & 13 deletions target/classes/features/Inventory.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Upgenix app Inventory feature
Feature: Testinium app Inventory feature

User Story:
Background: As a Posmanager, should be able to check and edit the Inventory of the company.
Expand All @@ -12,25 +12,28 @@ Feature: Upgenix app Inventory feature
When Logged user clicks on Inventory Module
And User clicks on Product module
And User see the products
Then User clicks create button
And User clicks create button
Then User should see the dashboard

Scenario:Verify that if Product name field leaves blank, an error message "The following fields are invalid:" is appeared
Scenario: Verify that after creating a Product, the page title includes the Product name.
When Logged user clicks on Inventory Module
And User clicks on Product module
And User see the products
Then User clicks create button
And User clicks the save button without entering any info
Then User should see the error


And User clicks create button
And User enters Product Name
And User clicks the save button
And User clicks on Product module
Then User should see the title includes the Product Name

Scenario:Verify that if Product name field leaves blank, an error message 'The following fields are invalid:' is appeared
When Logged user clicks on Inventory Module
And User clicks on Product module
And User clicks create button
And User clicks the save button
Then User should see the error

Scenario: Verify that the user should be able to see created Product is listed after clicking the Products module.


#
#Verify that if Product name field leaves blank, an error message "The following fields are invalid:" is appeared.
#
#Verify that after creating a Product, the page title includes the Product name.
#
#Verify that the user should be able to see created Product is listed after clicking the Products module.
#
Expand Down

0 comments on commit f444d9d

Please sign in to comment.