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

Checking table values in Behat is still not exactly correct

XMLWordPrintable

      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

        1. tableinbehat.png
          42 kB
          Marina Glancy
        2. tableinbehat-1.png
          42 kB
          Marina Glancy

            marina Marina Glancy
            marina Marina Glancy
            Simey Lameze Simey Lameze
            Huong Nguyen Huong Nguyen
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours, 39 minutes
                2d 5h 39m

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