createEvent
  • page loading
  • click on 'add Event'
  • clic on EditEvent on the menu
  • Set the different field (for the date we always use the 16 and 17 of the current month
  • click on update
  • close the menu
  • Assert that the element is created
  • doubleClick on the created event
  • click on the edit event
  • check fields value
  • click on the close button on the menu
setTimeout 50000
open https://127.0.0.1:8443/gwtcalendar/control/logout
open https://127.0.0.1:8443/gwtcalendar/control/setSessionLocale?newLocale=en
type USERNAME admin
type PASSWORD ofbiz
clickAndWait //input[@value='Login']
open https://127.0.0.1:8443/gwtcalendar/control/main
waitForElementPresent //button[@id='btnCreateEvent']
click //button[@id='btnCreateEvent']
click //td[@class='gwt-MenuItem' and contains(.,'Edit Event')]
waitForElementPresent editCalEvent_workEffortName_title
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-101.png
type editCalEvent_workEffortName TestAuto
type editCalEvent_description automatique
select editCalEvent_scopeEnumId label=General, public access
store javascript{auj = new Date();month= auj.getMonth()+1;if(month<10){month='0'+month;}auj.getFullYear()+"-"+(month)+"-"+auj.getDate()} today
type editCalEvent_estimatedStartDate ${today}
select estimatedStartDate_c_hour label=10
type editCalEvent_estimatedCompletionDate ${today}
select estimatedCompletionDate_c_hour label=18
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-102.png
click //button[contains(.,'Update')]
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-103.png
pause 2000
click //td[@class='gwt-MenuItem' and contains(.,'Close')]
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-104.png
pause 2000
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-105.png
open https://127.0.0.1:8443/gwtcalendar/control/main
waitForElementPresent //button[@id='btnCreateEvent']
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-106.png
waitForElementPresent //div[@class='appointment' and contains(.,'TestAuto')]
captureEntirePageScreenshot /var/www/selenium.neogia.org/ofbizAddOn/results/gwtcalendar-107.png
doubleClick //div[@class='appointment' and contains(.,'TestAuto')]
click //td[@class='gwt-MenuItem' and contains(.,'Edit Event')]
waitForElementPresent editCalEvent_workEffortName_title
assertValue //input[@id='editCalEvent_workEffortName'] TestAuto
assertValue editCalEvent_description automatique
assertValue editCalEvent_estimatedStartDate ${today}
assertValue //input[@id='editCalEvent_estimatedCompletionDate'] ${today}
click //td[@class='gwt-MenuItem' and contains(.,'Close')]
assertElementNotPresent //div[@class='errorMessage']