Conversation
There was a problem hiding this comment.
2 issues found across 30 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/testing/package.json">
<violation number="1" location="packages/testing/package.json:55">
P2: `@types/selenium-webdriver` is redundant — `selenium-webdriver` v4+ bundles its own TypeScript types. This can cause type conflicts if the `@types` package version drifts from the actual `selenium-webdriver` version.</violation>
</file>
<file name="packages/testing/src/playwright.ts">
<violation number="1" location="packages/testing/src/playwright.ts:22">
P2: Compound CSS selectors (comma-separated) break under `:visible` — only the last segment gets the pseudo-class. E.g. `visible('button, a')` produces `button, a:visible`, matching all buttons regardless of visibility instead of only visible buttons/anchors.</violation>
</file>
You're on the cubic free plan with 18 free PR reviews remaining this month. Upgrade for unlimited reviews.
Re-trigger cubic
| } | ||
| }, | ||
| "devDependencies": { | ||
| "@types/selenium-webdriver": "^4.1.28", |
There was a problem hiding this comment.
P2: @types/selenium-webdriver is redundant — selenium-webdriver v4+ bundles its own TypeScript types. This can cause type conflicts if the @types package version drifts from the actual selenium-webdriver version.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/testing/package.json, line 55:
<comment>`@types/selenium-webdriver` is redundant — `selenium-webdriver` v4+ bundles its own TypeScript types. This can cause type conflicts if the `@types` package version drifts from the actual `selenium-webdriver` version.</comment>
<file context>
@@ -0,0 +1,62 @@
+ }
+ },
+ "devDependencies": {
+ "@types/selenium-webdriver": "^4.1.28",
+ "playwright-core": "^1.49.0",
+ "selenium-webdriver": "^4.27.0",
</file context>
| const { baseURL, defaultTimeoutMs } = options; | ||
| // `:visible` resolves the first *visible* match — important when a test id | ||
| // exists in both the desktop and mobile chrome. | ||
| const visible = (selector: string) => page.locator(`${selector}:visible`).first(); |
There was a problem hiding this comment.
P2: Compound CSS selectors (comma-separated) break under :visible — only the last segment gets the pseudo-class. E.g. visible('button, a') produces button, a:visible, matching all buttons regardless of visibility instead of only visible buttons/anchors.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/testing/src/playwright.ts, line 22:
<comment>Compound CSS selectors (comma-separated) break under `:visible` — only the last segment gets the pseudo-class. E.g. `visible('button, a')` produces `button, a:visible`, matching all buttons regardless of visibility instead of only visible buttons/anchors.</comment>
<file context>
@@ -0,0 +1,56 @@
+ const { baseURL, defaultTimeoutMs } = options;
+ // `:visible` resolves the first *visible* match — important when a test id
+ // exists in both the desktop and mobile chrome.
+ const visible = (selector: string) => page.locator(`${selector}:visible`).first();
+ const timeout = (opts?: WaitOptions) => opts?.timeoutMs ?? defaultTimeoutMs;
+
</file context>
Suggested change
| const visible = (selector: string) => page.locator(`${selector}:visible`).first(); | |
| const visible = (selector: string) => page.locator(`:is(${selector}):visible`).first(); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 by cubic
Adds
@wvb-playground/testing, a small, cross‑platformWebviewDriverfor E2E tests with Playwright/Selenium/Appium drivers, and ships a runnable test suite for@wvb-playground/webview-hacker-news. This enables one set of cases to run across Electron, Tauri, Android, and iOS.New Features
@wvb-playground/testingpackage exportingWebviewDriverpluscreatePlaywrightDriver,createSeleniumDriver, andcreateAppiumDriverwithbaseURLand timeout support.@wvb-playground/webview-hacker-newsnow exports./testing(dist-testing) with selectors, tiny assert helpers, and platform-agnostic cases that cover feed, sorting, post detail, voting, comments, profiles, filters, theme, back, and deep links.data-testids across the Hacker News UI to match selectors (feed, posts, votes, comments, profile, theme, nav).tsdownconfigs,dist-testing/output, and workspaces includepackages/*.Dependencies
@wvb-playground/testingdeclares optional peers:playwright-core,selenium-webdriver,webdriverio.@wvb-playground/webview-hacker-newsaddsvitestas an optional peer and depends on@wvb-playground/testing(workspace).Written for commit 838cc84. Summary will update on new commits.