I'd like to add the ability for users to use the optional argument of Str::contains() through ->assertSeeIn() and ->assertSee() in order to make case-insensitive assertions.
Why it matters
Currently, ->assertSeeIn() only allows for case sensitive checks. Unfortunately this can cause a problem when comparing an element's innerText. On our site, we have this element:
On Chrome, the innerText of this element is 'EN', but on Safari, it is 'en'. I'd like to only write one time here an assertion so that I can cover both cases instead of having conditional logic for the browser I'll be testing on:
//Chrome, which passes
$browser->assertSeeIn('#langHeader', 'EN')
//Safari, which fails
$browser->assertSeeIn('#langHeader', 'EN')
//Proposed solution, passes on both
$browser->assertSeeIn('#langHeader', 'EN', true)
This won't break any current functionality since we can pass in a default argument which will keep the existing behavior as it is.
I'd like to add the ability for users to use the optional argument of
Str::contains()
through->assertSeeIn()
and->assertSee()
in order to make case-insensitive assertions.Why it matters
Currently,
->assertSeeIn()
only allows for case sensitive checks. Unfortunately this can cause a problem when comparing an element's innerText. On our site, we have this element:On Chrome, the innerText of this element is 'EN', but on Safari, it is 'en'. I'd like to only write one time here an assertion so that I can cover both cases instead of having conditional logic for the browser I'll be testing on:
This won't break any current functionality since we can pass in a default argument which will keep the existing behavior as it is.