TT#68016 selenium: add proper value to timeset event.byweekdaynumber

controller_timeset.t:
- a new warining was added so you cant tye in invalid values anymore in
timeset events (repeat by weekday). now test if invalid values get rejected
and if warning pops up.

Change-Id: Ib4ff3761e1086673eb35e9830760dd353755496a
changes/53/35253/3
Nico Schedel 6 years ago
parent f65fcf1dd8
commit 9b5501d263

@ -92,6 +92,7 @@ $d->find_element('//*[@id="save"]')->click();
diag("Check error messages");
ok($d->find_element_by_xpath('//form//div//span[contains(text(), "Invalid datetime, must be in format yy-mm-dd HH:mm:ss")]'));
ok($d->find_element_by_xpath('//form//div//span[contains(text(), "Invalid time, must be in format HH:mm:ss")]'));
ok($d->find_element_by_xpath('//form//div//span[contains(text(), "By week day number should be like (\+|-)?\d*(MO|TU|WE|TH|FR|SA|SO) (e.g. 5FR)")]'));
diag("Fill in values");
$d->fill_element('//*[@id="comment"]', 'xpath', 'Hello, im a special Event =)');
@ -100,8 +101,9 @@ $d->fill_element('//*[@id="starttime_datetimepicker"]', 'xpath', '12:00:00');
$d->find_element('//*[@id="end.switch.label.control"]')->click();
$d->fill_element('//*[@id="enddate_datetimepicker"]', 'xpath', '2019-06-05');
$d->fill_element('//*[@id="endtime_datetimepicker"]', 'xpath', '12:20:00');
$d->select_if_unselected('//*[@id="byday.weekdays.0"]');
$d->unselect_if_selected('//*[@id="byday.weekdays.0"]');
$d->find_element('//*[@id="byday.weekdaynumber"]')->clear();
$d->find_element('//*[@id="byday.label"]')->click();
$d->find_element('//*[@id="save"]')->click();
diag("Search Event");
@ -112,7 +114,7 @@ $d->fill_element('//*[@id="event_table_filter"]/label/input', 'xpath', 'Hello, i
diag("Check details");
ok($d->find_element_by_xpath('//*[@id="event_table"]//tr[1]/td[contains(text(), "Hello, im a special Event =)")]'), "Description is correct");
ok($d->find_element_by_xpath('//*[@id="event_table"]//tr[1]/td[contains(text(), "every day on Monday from 12:00:00 to 12:20:00")]'), "Date/Time is correct");
ok($d->find_element_by_xpath('//*[@id="event_table"]//tr[1]/td[contains(text(), "every day from 12:00:00 to 12:20:00")]'), "Date/Time is correct");
diag("Edit Event");
$d->move_and_click('//*[@id="event_table"]//tr[1]//td//a[contains(text(), "Edit")]', 'xpath', '//*[@id="event_table_filter"]//input');
@ -122,14 +124,15 @@ $d->fill_element('//*[@id="startdate_datetimepicker"]', 'xpath', '2020-06-01');
$d->fill_element('//*[@id="starttime_datetimepicker"]', 'xpath', '12:00:00');
$d->fill_element('//*[@id="enddate_datetimepicker"]', 'xpath', '2020-07-01');
$d->fill_element('//*[@id="endtime_datetimepicker"]', 'xpath', '13:00:00');
$d->unselect_if_selected('//*[@id="byday.weekdays.0"]');
$d->fill_element('//*[@id="byday.weekdaynumber"]', 'xpath', '+1FR');
$d->find_element('//*[@id="byday.label"]')->click();
$d->unselect_if_selected('//*[@id="byday.weekdays.4"]');
$d->fill_element('//*[@id="byday.weekdaynumber"]', 'xpath', '+2FR');
$d->find_element('//*[@id="save"]')->click();
diag("Check details");
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Event entry successfully created', 'Correct Alert was shown');
ok($d->find_element_by_xpath('//*[@id="event_table"]//tr[1]/td[contains(text(), "Very important event")]'), "Description is correct");
ok($d->find_element_by_xpath('//*[@id="event_table"]//tr[1]/td[contains(text(), "every day on the 1st Friday from 12:00:00 to 13:00:00")]'), "Date/Time is correct");
ok($d->find_element_by_xpath('//*[@id="event_table"]//tr[1]/td[contains(text(), "every day on the 2nd Friday from 12:00:00 to 13:00:00")]'), "Date/Time is correct");
diag("Go to 'Peering Groups' page");
$d->find_element('//*[@id="main-nav"]//*[contains(text(),"Settings")]')->click();

Loading…
Cancel
Save