Skip to content

Commit

Permalink
Merge pull request #14 from bunyamin2844/bunyamin
Browse files Browse the repository at this point in the history
Bunyamin
  • Loading branch information
bunyamin2844 authored Mar 28, 2022
2 parents 0df7ea5 + 5808749 commit 8cd7c28
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 183 deletions.
2 changes: 1 addition & 1 deletion configuration.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
browser=chrome
medunna_login_url=https://medunna.com/
medunna_login_url=https://medunna.com/login
medunna_registration_url=https://medunna.com/account/register
registrant_filename=src/test/resources/testdata/Medunna.txt
appointment_records=src/test/resources/testdata/AppointmentData.txt
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/Hooks/Hooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void createNewDBConnection(){
ConfigurationReader.getProperty("db_password"));
}

@Before( value = "@ApiRegistrant")
@Before( value = "@Demo")
public void setup(){

spec = new RequestSpecBuilder().setBaseUri(ConfigurationReader.getProperty("base_url")).build();
Expand Down
32 changes: 0 additions & 32 deletions src/test/java/pages/Deneme.java

This file was deleted.

85 changes: 0 additions & 85 deletions src/test/java/stepdefinitions/apistep/RegistrantApiSteps.java

This file was deleted.

23 changes: 23 additions & 0 deletions src/test/java/stepdefinitions/uisteps/Admin_US_20.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import org.junit.Assert;
import pages.DoctorEditAppointmentPage;
import pages.AdminSignIn;
Expand Down Expand Up @@ -65,15 +66,37 @@ public void adminVerifiesThatUserDeleted() {
}
@Given("admin clicks the view button")
public void admin_clicks_the_view_button() {
Driver.waitAndClick(adminSignIn.viewButton);

}

@Given("admin verifies all user's info")
public void admin_verifies_all_user_s_info() {


}


@And("admin gives user ROLE")
public void adminGivesUserROLE() {
Driver.waitAndClick(adminSignIn.roleUser);
}

@And("admin selects user and clicks edit button")
public void adminSelectsUserAndClicksEditButton() {
Driver.waitAndClick(adminSignIn.editButton);

}

@Then("admin cliks save button")
public void adminCliksSaveButton() {
Driver.waitAndClick(adminSignIn.saveButton);
}

@And("admin goes to user management page")
public void adminGoesToUserManagementPage() {
Driver.waitAndClick(adminSignIn.adminMenu);
Driver.waitAndClick(adminSignIn.userManegement);
}
}

15 changes: 0 additions & 15 deletions src/test/java/stepdefinitions/uisteps/Dummy.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class UIAppointmentSteps {
@Given("user goes the login pagee")
public void user_goes_the_login_pagee() {

Driver.getDriver().get(ConfigurationReader.getProperty("medunna_login_url"));
Driver.getDriver().get(ConfigurationReader.getProperty("base_url"));
}


Expand Down
2 changes: 1 addition & 1 deletion src/test/java/utilities/DateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class DateUtils {

public static String getDate(){
LocalDateTime dateObj = LocalDateTime.now();
DateTimeFormatter formatDate = DateTimeFormatter.ofPattern("dd-MM-yyyy");
DateTimeFormatter formatDate = DateTimeFormatter.ofPattern("MM-dd-yyyy");

return dateObj.format(formatDate);
}
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/features/DBFeatures/RegistrantDB.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Feature: DB Registrants tests
Then user validates DB Registrant data
Examples: test data
|query|columnName|
|Select * from jhi_user|ssn|
|Select * from jhi_user|ssn|

2 changes: 1 addition & 1 deletion src/test/resources/features/UIFeatures/Demo.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Examples: test data
|384-37-3827|Team82|UKTEAM|ukteam|uk@gmail.com|uk123.|


@Demo

Scenario Outline: test appointments
Given user clicks on make an appointment
And user provides the appoinment name "<firstname>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Feature: Doctor edit appointment
| headache | medicine | sinus | paracetemol | patient |


@Demo

Scenario Outline: US11_TC03 Doctor should not be able to edit appointment without typing in Anamnesis field
And edit the appointment information: "<Anamnesis>", "<Treatment>", "<Diagnosis>", "<Prescription>", "<Description>"
And click save button
Expand Down Expand Up @@ -61,7 +61,7 @@ Feature: Doctor edit appointment
| Anamnesis | Treatment | Diagnosis | Prescription | Description |
| headache | medicine | | paracetemol | patient |

@test

Scenario Outline: US11_TC06 Doctor should be able to edit appointment without editing prescription and description fields
And edit the appointment information: "<Anamnesis>", "<Treatment>", "<Diagnosis>", "<Prescription>", "<Description>"
And click save button
Expand All @@ -72,11 +72,7 @@ Feature: Doctor edit appointment
| headache | medicine | sinus | | |


@test
Scenario: US11_07 User verifies that can only be set as PENDING, COMPLETED or CANCELLED
#Diger adimlar background'dan
# Deneme
Then verify that status can only be set as "PENDING", "COMPLETED" or "CANCELLED"
Then close driver




17 changes: 2 additions & 15 deletions src/test/resources/features/UIFeatures/Room.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,11 @@ Feature: login feature
And admin give a price "<price>"
And admin give a description "<description>"
And admin create date "<date>"
Then close driver

Examples:
|roomNumber|roomType|price|description|date|
|24 |PREMIUM_DELUXE |1.500|hastamiz ozel bakilmali|05/12/2022T03:35 PM|

Scenario Outline: for update and delete
And admin on the room edit page
And admin give a rooms numbers "<roomNumber>"
And admin give a rooms types "<roomType>"
And admin give statuses clicks
And admin give a prices "<price>"
And admin give a descriptions "<description>"
And admin creates dates "<date>"
When admin saves alls
And admin delete room
And admin delete again
Then admin take success message

Examples:
|roomNumber|roomType|price|description|date|
|25 |SUITE |1.500|hastamiz ozel bakilmali|05/12/2022T03:35 PM|

1 change: 1 addition & 0 deletions src/test/resources/features/UIFeatures/TestItem.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
And user enters the day and time "<day and time>"
Then user clicks on save button
Then user validates that creation a test item is succesful
Then close driver



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Feature: appointments test



@Demo

@Appointment
Scenario Outline: test appointments
Given user goes the login pagee
And user clicks on make an appointment
Expand Down
21 changes: 0 additions & 21 deletions src/test/resources/features/apiFeatures/RegistranApi.feature

This file was deleted.

14 changes: 14 additions & 0 deletions src/test/resources/testdata/AppointmentData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ Appointment{firstname='Shane', lastname='Weimann', ssn='236-17-9449', email='kel
Appointment{firstname='Brock', lastname='Blick', ssn='449-54-2635', email='[email protected]', phoneNumber='344-226-2204', date='06-07-2022'}
Appointment{firstname='Delma', lastname='Walter', ssn='379-28-0615', email='[email protected]', phoneNumber='(927) 421-0612', date='06-07-2022'}
Appointment{firstname='Stephnie', lastname='Conn', ssn='313-80-4448', email='[email protected]', phoneNumber='(991) 817-0897', date='06-07-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}
Appointment{firstname='Bunyamin', lastname='bektas', ssn='203-40-2837', email='[email protected]', phoneNumber='253-283-2837', date='03-30-2022'}

0 comments on commit 8cd7c28

Please sign in to comment.