Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hakan #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ Feature:

Scenario: Adding Discounts

Given User accesses the "Setup > Parameters" page
When the User clicks on the "Discounts" tab
Given User click on the Setup und Parameters tabs
When the User clicks on the Discounts tab
And the User fills in the necessary information to add a new discount
Then the discount should be added

Scenario: Editing Discounts

Given User accesses the "Setup > Parameters" page
When the User clicks on the "Discounts" tab
Given User click on the Setup und Parameters tabs
When the User clicks on the Discounts tab
And the User updates the necessary information for an existing discount
Then the changes should be saved

Scenario: Deleting Discounts

Given User accesses the "Setup > Parameters" page
When the User clicks on the "Discounts" tab
Given User click on the Setup und Parameters tabs
When the User clicks on the Discounts tab
And the User initiates the process to delete an existing discount
Then the discount should be deleted, and the User completes the verification step
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ Feature:Parameters Nationalities
When Enter username and password and click login button
Then User should login successfully

Scenario:
Adding Nationalities
Scenario: Adding Nationalities

Given User accesses the "Setup > Parameters" page.
Given User click on the Setup und Parameters tabs
When the User is on the page to add nationalities.
And the User enters the required information to add a new nationality.
Then the nationality should be added.

Scenario: Editing Nationalities

Given User accesses the "Setup > Parameters" page.
Given User click on the Setup und Parameters tabs
When the User is on the page to edit nationalities
And the User updates the valid information for an existing nationality
Then the changes should be saved

Scenario: Deleting Nationalities

Given User accesses the "Setup > Parameters" page.
Given User click on the Setup und Parameters tabs
When the User is on the page to delete nationalities
And the User initiates the process to delete an existing nationality
Then the nationality should be deleted, and the User completes the verification step
55 changes: 54 additions & 1 deletion src/test/java/Pages/POM_11.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,57 @@
package Pages;

public class POM_11 {
import Utilities.Events;
import Utilities.WBA;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

import java.awt.*;

public class POM_11 extends Events {

public POM_11() {
PageFactory.initElements(WBA.getDriver(), this);
}

@FindBy(css = "span[class='mat-mdc-tooltip-trigger logo-text']")
public WebElement textTechnoStudy;
@FindBy(xpath = "//ms-add-button[contains(@tooltip,'ADD')]//button")
public WebElement addButton;
@FindBy(xpath = "//ms-text-field[@formcontrolname='name']/input")
public WebElement nameInput;
@FindBy(xpath = "//ms-save-button/button")
public WebElement saveButton;
@FindBy(xpath = "//div[contains(text(),'successfully')]")
public WebElement successMessage;
@FindBy(xpath = "//mat-form-field//input[@data-placeholder='Name']")
public WebElement searchInput;
@FindBy(xpath = "//ms-search-button//button")
public WebElement searchButton;
@FindBy(xpath = "(//ms-delete-button//button)[1]")
public WebElement deleteImageButton;
@FindBy(xpath = "//button[@type='submit']")
public WebElement deleteDialogButton;
@FindBy(xpath = "(//ms-edit-button)[1]")
public WebElement editButton;
@FindBy(xpath = "(//span[text()='Setup'])[1]")
public WebElement setup;
@FindBy(xpath = "//span[text()='Human Resources']")
public WebElement humanResources;
@FindBy(xpath = "(//span[text()='Setup'])[3]")
public WebElement setupHumanResources;
@FindBy(xpath = "//span[text()='Position Categories']")
public WebElement positionCategories;

public WebElement userClickOnTheSetupUndParametersTabs() {
}

public WebElement theUserClicksOnTheDiscountsTab() {
}

public WebElement theChangesShouldBeSaved() {
}

public WebElement theUserInitiatesTheProcessToDeleteAnExistingDiscount() {
}
}
52 changes: 51 additions & 1 deletion src/test/java/Pages/POM_12.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
package Pages;

public class POM_12 {
import Utilities.Events;
import Utilities.WBA;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

public class POM_12 extends Events {

public POM_12() {
PageFactory.initElements(WBA.getDriver(), this);
}


@FindBy(css = "span[class='mat-mdc-tooltip-trigger logo-text']")
public WebElement textTechnoStudy;
@FindBy(xpath = "//ms-add-button[contains(@tooltip,'ADD')]//button")
public WebElement addButton;
@FindBy(xpath = "//ms-text-field[@formcontrolname='name']/input")
public WebElement nameInput;
@FindBy(xpath = "//ms-save-button/button")
public WebElement saveButton;
@FindBy(xpath = "//div[contains(text(),'successfully')]")
public WebElement successMessage;
@FindBy(xpath = "//mat-form-field//input[@data-placeholder='Name']")
public WebElement searchInput;
@FindBy(xpath = "//ms-search-button//button")
public WebElement searchButton;
@FindBy(xpath = "(//ms-delete-button//button)[1]")
public WebElement deleteImageButton;
@FindBy(xpath = "//button[@type='submit']")
public WebElement deleteDialogButton;
@FindBy(xpath = "(//ms-edit-button)[1]")
public WebElement editButton;
@FindBy(xpath = "(//span[text()='Setup'])[1]")
public WebElement setup;
@FindBy(xpath = "//span[text()='Human Resources']")
public WebElement humanResources;
@FindBy(xpath = "(//span[text()='Setup'])[3]")
public WebElement setupHumanResources;
@FindBy(xpath = "//span[text()='Position Categories']")
public WebElement positionCategories;

public WebElement theUserIsOnThePageToAddNationalities() {
}

public WebElement theUserIsOnThePageToEditNationalities() {
}

public WebElement theUserInitiatesTheProcessToDeleteAnExistingNationalit() {
}

}
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@
package StepDefinitons;

import Pages.POM_00;
import Pages.POM_11;
import io.cucumber.java.en.*;

public class _11_ParametrelerAyariAltindaIndirimleriDuzenlemeSteps {

@Given("User accesses the {string} page")
public void user_accesses_the_page(String string) {


POM_11 lc=new POM_11();
@Given("User click on the Setup und Parameters tabs")
public void userClickOnTheSetupUndParametersTabs() {
lc.myClick(lc.userClickOnTheSetupUndParametersTabs());
}
@When("the User clicks on the {string} tab")
public void the_user_clicks_on_the_tab(String string) {


@When("the User clicks on the Discounts tab")
public void theUserClicksOnTheDiscountsTab() {
lc.myClick(lc.theUserClicksOnTheDiscountsTab());
}
@When("the User fills in the necessary information to add a new discount")
public void the_user_fills_in_the_necessary_information_to_add_a_new_discount() {


@And("the User fills in the necessary information to add a new discount")
public void theUserFillsInTheNecessaryInformationToAddANewDiscount() {
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
}
@Then("the discount should be added")
public void the_discount_should_be_added() {

@Then("the discount should be added")
public void theDiscountShouldBeAdded() {
lc.mySendKeys(lc."early registration discount %25");

}

@And("the User updates the necessary information for an existing discount")
public void theUserUpdatesTheNecessaryInformationForAnExistingDiscount() {
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
}

@Then("the changes should be saved")
public void theChangesShouldBeSaved() {
lc.myClick(lc.theChangesShouldBeSaved());

}

@And("the User initiates the process to delete an existing discount")
public void theUserInitiatesTheProcessToDeleteAnExistingDiscount() {
lc.myClick(lc.theUserInitiatesTheProcessToDeleteAnExistingDiscount());
}

@Then("the discount should be deleted, and the User completes the verification step")
public void theDiscountShouldBeDeletedAndTheUserCompletesTheVerificationStep() {
lc.verifyContainsText(lc.successMessage, "success");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,44 +1,58 @@
package StepDefinitons;

import Pages.POM_11;
import Pages.POM_12;
import io.cucumber.java.en.*;

public class _12_ParametrelerAyariAltindaMilliyetleriDuzenlemeSteps {

POM_12 lc=new POM_12();

@Given("User accesses the {string} page.")
public void user_accesses_the_page(String string) {

}
@When("the User is on the page to add nationalities.")
public void the_user_is_on_the_page_to_add_nationalities() {

public void theUserIsOnThePageToAddNationalities() {
lc.myClick(lc.theUserIsOnThePageToAddNationalities());
}
@When("the User enters the required information to add a new nationality.")
public void the_user_enters_the_required_information_to_add_a_new_nationality() {

@And("the User enters the required information to add a new nationality.")
public void theUserEntersTheRequiredInformationToAddANewNationality() {
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");

}


@Then("the nationality should be added.")
public void the_nationality_should_be_added() {

lc.myClick(lc.);
}

@When("the User is on the page to edit nationalities")
public void theUserIsOnThePageToEditNationalities() {
lc.myClick(lc.theUserIsOnThePageToEditNationalities());
}

@And("the User updates the valid information for an existing nationality")
public void theUserUpdatesTheValidInformationForAnExistingNationality() {
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");
lc.mySendKeys(lc."");

}

@When("the User is on the page to delete nationalities")
public void theUserIsOnThePageToDeleteNationalities() {
lc.myClick(lc.);
}

@And("the User initiates the process to delete an existing nationality")
public void theUserInitiatesTheProcessToDeleteAnExistingNationality() {
lc.myClick(lc.theUserInitiatesTheProcessToDeleteAnExistingNationalit());
}

@Then("the nationality should be deleted, and the User completes the verification step")
public void theNationalityShouldBeDeletedAndTheUserCompletesTheVerificationStep() {
lc.verifyContainsText(lc.successMessage,"success");
}
}