MDL-59382 core_calendar: change behat step
authorSimey Lameze <simey@moodle.com>
Thu, 27 Jul 2017 06:22:57 +0000 (14:22 +0800)
committerRyan Wyllie <ryan@moodle.com>
Wed, 2 Aug 2017 04:47:43 +0000 (04:47 +0000)
calendar/tests/behat/behat_calendar.php

index 2d4ecab..c77b547 100644 (file)
@@ -63,6 +63,9 @@ class behat_calendar extends behat_base {
         $eventname = $data->getRow(1);
         $eventname = $eventname[1];
 
+        // Click to create new event.
+        $this->execute("behat_general::i_wait_seconds", 1);
+
         // Click to create new event.
         $this->execute("behat_general::i_click_on", array(get_string('newevent', 'calendar'), "button"));
 
@@ -70,11 +73,7 @@ class behat_calendar extends behat_base {
         $this->execute("behat_forms::i_set_the_following_fields_to_these_values", $data);
 
         // Save event.
-        $this->execute("behat_forms::press_button", get_string('savechanges'));
-
-        // Check if event is created. Being last step, don't need to wait or check for exceptions.
-        $this->execute("behat_general::assert_page_contains_text", $eventname);
-
+        $this->execute("behat_forms::press_button", get_string('save'));
     }
 
     /**