Skip to content

chore(web-components): use component tag name constants in playwright tests#36183

Open
radium-v wants to merge 4 commits into
microsoft:masterfrom
radium-v:wc-spec-tagnames
Open

chore(web-components): use component tag name constants in playwright tests#36183
radium-v wants to merge 4 commits into
microsoft:masterfrom
radium-v:wc-spec-tagnames

Conversation

@radium-v
Copy link
Copy Markdown
Contributor

Previous Behavior

Playwright spec files hardcoded component tag names as string literals (e.g., 'fluent-accordion', 'fluent-accordion-item'). Additionally, the fastPage fixture automatically called setTemplate() during setup, which meant tests could silently depend on that implicit initialization without expressing their own template requirements.

New Behavior

  • All spec files now import tagName (and related tag name constants) from each component's .options.js module and use those constants for test.use(), document.createElement(), element.locator(), and HTML template strings.
  • The automatic fastPage.setTemplate() call has been removed from the test fixture, so every test must explicitly call setTemplate() with the template it needs, making each test's DOM setup self-describing.

@radium-v radium-v requested a review from a team as a code owner May 10, 2026 22:51
@github-actions
Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

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