nieuwe API test voor het maken van een afspraak
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
*** Settings ***
|
*** Settings ***
|
||||||
Library Browser
|
Library Browser
|
||||||
|
Resource ${CRED}
|
||||||
|
|
||||||
*** Variables ***
|
*** Variables ***
|
||||||
${CRED} C:\\Users\\thoma\\Documents\\Paypoint\\variables.robot
|
${CRED} C:\\Users\\thoma\\Documents\\Paypoint\\variables.robot
|
||||||
|
|||||||
15
Resources/Tab_Agenda.resource
Normal file
15
Resources/Tab_Agenda.resource
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Library Browser
|
||||||
|
Library FakerLibrary locale=nl_NL
|
||||||
|
|
||||||
|
*** Keywords ***
|
||||||
|
Open Agenda Tab
|
||||||
|
[Documentation] Opent het Tabblad Agenda
|
||||||
|
Click id=agenda
|
||||||
|
|
||||||
|
Afspraak Maken
|
||||||
|
[Documentation] Maakt een nieuwe afspraak aan
|
||||||
|
[Arguments] ${titel}
|
||||||
|
Click id=afspraakMaken
|
||||||
|
Type Text id=titel ${titel}
|
||||||
|
|
||||||
0
Tests/Afspraak_Maken.robot
Normal file
0
Tests/Afspraak_Maken.robot
Normal file
36
Tests/Afspraak_Maken_API.robot
Normal file
36
Tests/Afspraak_Maken_API.robot
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Library RequestsLibrary
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${KLANT_VOORNAAM} Thomas
|
||||||
|
${KLANT_ACHTERNAAM} Tuinman
|
||||||
|
${KLANT_EMAIL} thomas.tuinman@gmail.com
|
||||||
|
${BEDRIJF_NAAM} Hairstyling By Daan
|
||||||
|
${AFSPRAAK_DATUM} 2025-04-24T10:30:00
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
Afspraak Maken
|
||||||
|
${credentials}= Create Dictionary username=test01 password=AppleHP123!
|
||||||
|
${token_response} POST https://api-paypoint-test.melvanveen.nl/api/auth/login json=${credentials}
|
||||||
|
Log To Console ${token_response.json()}[token]
|
||||||
|
${token_header} Create Dictionary Authorization=Bearer ${token_response.json()}[token]
|
||||||
|
|
||||||
|
${klant} Create Dictionary firstName=${KLANT_VOORNAAM} lastName=${KLANT_ACHTERNAAM} email=${KLANT_EMAIL}
|
||||||
|
${bedrijf} Create Dictionary
|
||||||
|
... name=${BEDRIJF_NAAM}
|
||||||
|
... email=danielle@hairstylingbydaan.nl
|
||||||
|
... address=Groenestraat 29
|
||||||
|
... postal_code=6681 DW
|
||||||
|
... city=Bemmel
|
||||||
|
${afspraak} Create Dictionary
|
||||||
|
... title=Knippen
|
||||||
|
... startDate=${AFSPRAAK_DATUM}
|
||||||
|
... startHour=10
|
||||||
|
... startMinute=30
|
||||||
|
... endHour=11
|
||||||
|
... endMinute=00
|
||||||
|
... durationInMinutes=30
|
||||||
|
... customer=${klant}
|
||||||
|
... company=${bedrijf}
|
||||||
|
${response}= POST https://api-paypoint-test.melvanveen.nl/api/appointments headers=${token_header} json=${afspraak}
|
||||||
|
Status Should Be 200 ${response}
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
Library Browser
|
Library Browser
|
||||||
Resource ../Resources/Open_Browser.resource
|
Resource ../Resources/Open_Browser.resource
|
||||||
Resource ../Resources/Tab_Klant.resource
|
Resource ../Resources/Tab_Klant.resource
|
||||||
Resource ${CRED}
|
|
||||||
Test Setup Open Browser And Set Context
|
Test Setup Open Browser And Set Context
|
||||||
|
|
||||||
*** Test Cases ***
|
*** Test Cases ***
|
||||||
|
|||||||
Reference in New Issue
Block a user