Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-48290

following_should_download_between_and_bytes() sometimes throw error

XMLWordPrintable

      ./question/format/xml/tests/behat/import_export.feature and
      ./question/format/gift/tests/behat/import_export.feature
      use following_should_download_between_and_bytes(), which opens download popup though out the feature.

      There are 2 potential problems:

      1. As selenium don't know how to deal with this window, we should avoid opening it. As this can lead to unwanted behaviour
      2. This is throwing error in apache error log

        [Wed Nov 19 14:49:22.045768 2014] [:error] [pid 4392] [client 127.0.0.1:53922] Default exception handler: Can not find data record in database table context. Debug: SELECT * FROM {context} WHERE id = ?\n[array (\n  0 => 131000,\n)]\nError code: invalidrecord\n* line 1451 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown\n* line 1427 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()\n* line 5360 of /lib/accesslib.php: call to moodle_database->get_record()\n* line 1433 of /lib/accesslib.php: call to context::instance_by_id()\n* line 3894 of /lib/filelib.php: call to get_context_info_array()\n* line 37 of /pluginfile.php: call to file_pluginfile()\n, referer: http://localhost/imaster/question/export.php
        

      This happens as this is last step which gets executed and while this is happening, BeforeScenario event is fired and data is reset. Adding wait after pressing export or downloading step fix this problem, but we should try validate data (like in grade export), rather then checking if something is downloaded. Also, we should validate if data downloaded is valid data.

            rajeshtaneja Rajesh Taneja
            rajeshtaneja Rajesh Taneja
            Simey Lameze Simey Lameze
            Dan Poltawski Dan Poltawski
            Zachary Durber Zachary Durber
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.