Skip to content

Strict value type check for checkboxes makes filling fields from tables difficult #104

@mpdude

Description

@mpdude

The strict check added in #102 requires checkboxes to be set with boolean values only.

That makes it difficult to fill forms from Gherkin tables, since there is – to my knowledge – no built-in type conversion, and one cannot simply forward all values to MinkContext::fillFields anymore.

https://github.com/FriendsOfBehat/MinkExtension/blob/a9653d777beeb1dca4931a673c6a54bb2dd6ddf8/src/Behat/MinkExtension/Context/MinkContext.php#L142

Example:

    And I fill in the following:
      | Published                         | 1                  |
      | Name                              | Behat meet-up test |

I am not sure which is the right way to address it... Relax the requirement here? Detect checkbox types in MinkContext and cast the value appropriately? Not use the "fill in the following" step definition for checkboxes anymore?

Technically, this testsuite here did not change anything directly breaking the old code, but it triggered downstream changes like https://gitlab.com/behat-chrome/chrome-mink-driver/-/issues/158 that cause the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions