I am working with the following HTML structure:
<h4 id="myModalLabel"></h4>
In my CSS, I have set the content dynamically using the following code:
#myModalLabel::after {
content: "gebeurtenis";
}
For a live example, you can check out this jsFiddle link.
The issue arises when Behat is unable to identify this text in scenarios like below:
Scenario: Viewing gebeurtenis
Given I am on "hrm/calendar"
Then I should see "gebeurtenis"
Behat returns the following result:
Then I should see "gebeurtenis" # HRMContext::assertPageContainsText()
The text "gebeurtenis" was not found anywhere in the text of the current page. (Behat\Mink\Exception\ResponseTextException)
To address this issue and ensure test success, what steps can be taken?