3 use Test::More 'tests' => 9;
5 use SGN::Test::WWW::WebDriver;
7 my $t = SGN::Test::WWW::WebDriver->new();
9 $t->while_logged_in_as("submitter", sub {
12 # THIS FUNCTIONALITY DOES NOT EXIST IN THE OLD FORM, SIMPLE TEST FOR NEW ONE
13 $t->find_element_ok("navbar_personal_calendar", "id", "find calendar button and click")->click();
17 '(//div[@id = "calendar"]//table//tbody//div[contains(@class, "fc-day-grid-container")]//div[contains(@class, "fc-day-grid")]//div[contains(@class, "fc-row")])[2]//div[contains(@class, "fc-bg")]//table//tbody//td[contains(@class, "fc-day")][3]',
19 "find day in calendar and click")->click();
24 '//select[@id="event_project_select"]', "xpath", "find 'project select' and click")->click();
26 $t->find_element_ok('//select[@id="event_project_select"]/option[contains(text(), "Kasese solgs trial")]',
28 "find 'project Kasese solgs trial' and click")->click();
31 '//select[@id="event_type_select"]', "xpath", "find 'event type select' and click")->click();
33 $t->find_element_ok('//select[@id="event_type_select"]/option[contains(text(), "project_planting_date")]',
35 "find 'event type project_planting_date' and click")->click();
37 $t->find_element_ok('event_description', "id", "find 'event description' and type name")->send_keys('Calendar event description');
39 $t->find_element_ok('event_url', "id", "find 'event url' and type url")->send_keys('example.com');
41 $t->find_element_ok('add_event_submit', "id", "find 'add event submit' and click")->click();
44 $t->driver()->accept_alert();
50 $t->driver()->close();