Skip to content

Playwright Support - #773

Merged
poppastring merged 5 commits into
mainfrom
support-playwright
Feb 1, 2026
Merged

poppastring merged 5 commits into
mainfrom
support-playwright

Conversation

@poppastring

Copy link
Copy Markdown
Owner

PR Classification

Migration of integration tests from Selenium WebDriver to Microsoft Playwright for improved browser automation and test reliability.

PR Summary

This pull request replaces Selenium-based integration tests with Playwright, updates Razor view element IDs for testability, and adds support for Atom feed tests.

  • PlaywrightPageTests.cs and PlaywrightServerFactory.cs: Added new Playwright-based integration tests and server factory, replacing Selenium equivalents.
  • Razor views (_CommentAddPartial.cshtml, CreatePost.cshtml, EditPost.cshtml, _BlogItem.cshtml): Standardized form field IDs, updated form actions, and improved accessibility for test selectors.
  • SubscriptionManagerTest.cs: Updated Atom feed tests to verify actual results instead of expecting NotImplementedException.
  • Removed Selenium dependencies and added Microsoft.Playwright in project and package files.

Replaced Selenium WebDriver with Microsoft.Playwright for browser-based integration tests. Removed Selenium dependencies and test files, added Playwright-based test suite and server factory. Updated Razor view forms to use explicit URLs and include anti-forgery tokens. Cleaned up minor HTML in blog item views. This modernizes and improves reliability of end-to-end testing.
- Use .First for category selection to ensure correct element targeting
- Increase delays after create/edit for better persistence handling
- Navigate directly to edit/delete URLs via href extraction for stability
- Simplify edit step and verify post existence after edit
- After deletion, confirm post link is absent from home page
- Update activity log test to use /admin/log route
- Refactor and remove outdated Playwright test methods
- Update test navigation and assertions for UI changes
- Change comment form field IDs to PascalCase for consistency
- Update submit button ID and label "for" attributes
- Set SiteConfig.Root to test server URL at runtime
- Improve test reliability and alignment with current UI
- Remove WelcomePostCheckPageBrowserTitle test as redundant/unreliable
- Simplify NavigateToArchiveSpecificDate to only check archive URL
- Update comment delete test to handle Bootstrap modal confirmation and pagination
- Use dynamic Server.RootUri in site admin test assertion
- Add aria-label to comment delete link for accessibility
Tests now expect GetAtom and GetAtomCategory to return valid AtomRoot objects instead of throwing NotImplementedException. Assertions verify non-null results and correct title values, reflecting recent method implementations.
@poppastring
poppastring merged commit 09adabe into main Feb 1, 2026
@poppastring
poppastring deleted the support-playwright branch February 1, 2026 02:46
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.

1 participant