Skip to content

Risk of Assertions doing nothing when .is(true) is missing #320

Open
@tomg246

Description

@tomg246

Problem.
This does an assertion:
uiElement.assertThat().text().is("text");
This reads and feels the same but does nothing:
uiElement.assertThat().text().contains("sisdfn");

The main problem is that i won't notice my mistake which leads to tests that don't do the assertions i expect them to do.

Solution
Best would be an implicit .is(true) when no assertion is done.
Second best seems the addition of a compiler warning or something alike, to increase my chance of noticing my mistake, see e.g.
grafik

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions