Skip to content

Clarify why Cucumber tests pass for JS component steps#8961

Closed
Copilot wants to merge 1 commit into
experimental/feature/remove-flowbitefrom
copilot/sub-pr-8953
Closed

Clarify why Cucumber tests pass for JS component steps#8961
Copilot wants to merge 1 commit into
experimental/feature/remove-flowbitefrom
copilot/sub-pr-8953

Conversation

Copilot AI commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

A review comment incorrectly claimed that Then I should see the element "..." and Then I should not see the element "..." steps were undefined and would raise Cucumber::Undefined errors.

These steps are matched by an existing unified regex in features/step_definitions/web_steps.rb:86 using optional capture groups:

Then(/^I should( not)? see( the element)? "([^"]*)"$/) do |negate, is_css, text|
  should = negate ? :not_to : :to
  have = is_css ? have_css(text) : have_content(text)
  expect(page).send should, have
end
  • When the element is captured → have_css(selector) (visibility-aware)
  • When absent → have_content(text)

No missing step definitions; no code changes required. component_steps.rb correctly only adds the When action steps.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix review feedback on removing Flowbite feature Clarify why Cucumber tests pass for JS component steps Mar 6, 2026
@tagliala

tagliala commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

😐

@tagliala tagliala closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants