Description
The feedback test uses a selector that matches more than one feedback widget on normal guide pages, making the interaction ambiguous and the assertion unreliable.
Evidence
src/tests/cypress/integration/api-guides.cy.js calls cy.get('[data-cy="feedback-section"]').scrollIntoView().
src/components/article-render/index.tsx renders one FeedbackSection below the article content and another inside TableOfContents when hideTOC is false.
@vtexdocs/components applies data-cy="feedback-section" to the root element of each widget.
Recommended Change
Give the primary feedback widget a unique selector, or scope the test to a single container (article footer vs TOC panel) before interacting with it.
Acceptance Criteria
- The test passes on
/docs/guides/brands and at least one other guide page.
- The selector resolves to exactly one element before
scrollIntoView() and the feedback flow still verifies the expected success text.
Files
src/tests/cypress/integration/api-guides.cy.js
src/components/article-render/index.tsx and/or a dependency update to @vtexdocs/components
Context
Extracted from the PR #1226 CI checks investigation. See plans/PR-1226-ci-checks-investigation.md (Issue 4) for the full analysis.
Description
The feedback test uses a selector that matches more than one feedback widget on normal guide pages, making the interaction ambiguous and the assertion unreliable.
Evidence
src/tests/cypress/integration/api-guides.cy.jscallscy.get('[data-cy="feedback-section"]').scrollIntoView().src/components/article-render/index.tsxrenders oneFeedbackSectionbelow the article content and another insideTableOfContentswhenhideTOCis false.@vtexdocs/componentsappliesdata-cy="feedback-section"to the root element of each widget.Recommended Change
Give the primary feedback widget a unique selector, or scope the test to a single container (article footer vs TOC panel) before interacting with it.
Acceptance Criteria
/docs/guides/brandsand at least one other guide page.scrollIntoView()and the feedback flow still verifies the expected success text.Files
src/tests/cypress/integration/api-guides.cy.jssrc/components/article-render/index.tsxand/or a dependency update to@vtexdocs/componentsContext
Extracted from the PR #1226 CI checks investigation. See
plans/PR-1226-ci-checks-investigation.md(Issue 4) for the full analysis.