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

Checking table values in Behat is still not exactly correct

      MDL-75081 revealed some interesting issues in Workplace tests. It was definitely step in the right direction but it looks like it took an extra steps and became overzealous.

      In the following cases:

           * @Then /^the following should exist in the "(?P<table_string>[^"]*)" table:$/
           * @Then /^the following should not exist in the "(?P<table_string>[^"]*)" table:$/
      

      When there is only one column in the tabledata, behat now ignores the column title. For example, I want to specifically check that the "Name" column does or does not contain a particular value, behat is testing if the whole table does or does not contain this value and completely ignores the column name.

      edit: in fact, these steps always ignore the first column title

      Side note: we found another interesting problem with specifying the same column title twice - only the last one gets checked. Imho we should warn developers that the duplicates were detected

            marina Marina Glancy
            marina Marina Glancy
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 5 hours, 5 minutes
                1d 5h 5m

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