-
Notifications
You must be signed in to change notification settings - Fork 374
Add playwright tests for links and slots in vue nodes mode #5668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🎭 Playwright Test Results⏰ Completed at: 09/19/2025, 08:14:13 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
let me try fixing this |
the failing test is the new screenshot needed, feel free to check it out |
by the way, I asked design if they had something for links, we can change it at a later time, they haven't made anything just yet, so that's why the links look odd ending abruptly |
browser_tests/fixtures/ComfyPage.ts
Outdated
|
||
type WorkspaceStore = ReturnType<typeof useWorkspaceStore> | ||
|
||
type Bounds = readonly [number, number, number, number] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we import the type from src?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been removed
browser_tests/fixtures/ComfyPage.ts
Outdated
async fitToView( | ||
options: { | ||
selectionOnly?: boolean | ||
zoom?: number | ||
padding?: number | ||
} = {} | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is a lot of logic to put in a fixture.
Normally I like fixtures to be as close to describing what a user would do as possible.
The general rule of browser tests is: unless you expect a user to open the console and type in a series of commands, the test shouldn't do that either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it to a helper
async function getCenter(locator: Locator): Promise<{ x: number; y: number }> { | ||
const box = await locator.boundingBox() | ||
if (!box) throw new Error('Slot bounding box not available') | ||
return { | ||
x: box.x + box.width / 2, | ||
y: box.y + box.height / 2 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use dragTo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, appreciate adding e2e tests a ton, will give more confidence going forward.
Tests added
┆Issue is synchronized with this Notion page by Unito