You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(test): move the Java-only tests to tests/javaonly and drop duplicates - #2082
move the Java-only Test* classes and the helpers only they use from com.microsoft.playwright to com.microsoft.playwright.tests.javaonly, next to the upstream ports in tests/page and tests/library
make the members of the shared Server, Utils and HttpsConfiguratorImpl helpers public
drop the com.microsoft.playwright.Test* check in StackTraceCollector, which the tests. one covers
remove about 1480 Java-only tests (78 classes) that a line-by-line upstream port now covers; the 273 left have no port, a @Fixme port, or test Java-only API
Yury Semikhatsky (yury-s)
changed the title
chore(test): move the Java-only tests to tests/javaonly
chore(test): move the Java-only tests to tests/javaonly and drop duplicates
Dec 2, 2026
Regression coverage for [Bug]: An exception thrown by an event listener while a binding call is being resolved is replaced by TargetClosedError #2009 is lost. The old TestBrowserContextExposeFunction.exposeBindingShouldWork ended with a block tagged // https://github.com/microsoft/playwright-java/issues/2009: a console listener throws while a binding call is in flight, and the exception must surface from page.evaluate. The port tests/library/TestBrowsercontextExposeFunction.exposeBindingShouldWork has no such assertions, and nothing else in the branch does. It is the only Java issue tag that disappears. Suggest keeping that block as a test in tests/javaonly/.
AGENTS.md names a deleted class as a model. The "Good models" line still cites TestBrowserContextExposeFunction, shouldNotDispatchBindingOnAClosedPage. That class is gone; the method now lives only in the port tests/library/TestPopup, which is not a Java-only regression test with an issue tag. It should point at a test that survives in tests/javaonly/.
Two deleted tests have a port that is @Fixme, which contradicts the rule in the description that those stay:
TestPageStrict.shouldFailPageTextContentInStrictMode (textContent with setStrict(true)): its port SM-001 in tests/page/TestPageStrict is @Fixme("java: ... double quotes"). SM-012 covers only context-level strict.
TestLocatorConvenience.shouldHaveANicePreview: its port LO-057 is @Fixme. The old test asserted the Java toString() form for chained locators and the JSHandle@#text=... preview. The surviving toStringShouldReturnFormattedLocator covers only a single locator("div").
Otherwise looks good: the moves, the visibility changes and the StackTraceCollector change check out, the kept tests and the ports are unchanged, and the other deleted tests I matched to a port. I did not compare the bodies of the ~1,260 same-named pairs one by one, so an untagged Java-specific assertion could still hide there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test*classes and the helpers only they use fromcom.microsoft.playwrighttocom.microsoft.playwright.tests.javaonly, next to the upstream ports intests/pageandtests/libraryServer,UtilsandHttpsConfiguratorImplhelpers publiccom.microsoft.playwright.Test*check inStackTraceCollector, which thetests.one covers@Fixmeport, or test Java-only API