Files
ComfyUI_frontend/browser_tests/fixtures/components/UpdatePassword.ts
AustinMroz 988a546721 Add missing dialog tests (#11133)
Leveraging the fancy coverage functionality of #10930, this PR aims to
add coverage to missing dialogue models.

This has proven quite constructive as many of the dialogues have since
been shown to be bugged.
- The APINodes sign in dialog that displays when attempting to run a
workflow containing Partner nodes while not logged in was intended to
display a list of nodes required to execute the workflow. The import for
this component was forgotten in the original commit (#3532) and the
backing component was later knipped
- Error dialogs resulting are intended to display the file responsible
for the error, but the prop was accidentally left out during the
refactoring of #3265
- ~~The node library migration (#8548) failed to include the 'Edit
Blueprint' button, and had incorrect sizing and color on the 'Delete
Blueprint' button.~~
- On request, the library button changes were spun out to a separate PR

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11133-Add-missing-dialog-tests-33e6d73d3650812cb142d610461adcd4)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
2026-04-14 14:31:31 -07:00

24 lines
783 B
TypeScript

import type { Locator, Page } from '@playwright/test'
import { BaseDialog } from '@e2e/fixtures/components/BaseDialog'
import { TestIds } from '@e2e/fixtures/selectors'
export class UpdatePassword extends BaseDialog {
readonly confirm: Locator
readonly password: Locator
readonly confirmPassword: Locator
constructor(page: Page) {
super(page, TestIds.dialogs.updatePassword)
this.confirm = this.root.getByRole('button', { name: 'Update Password' })
this.password = this.root.getByLabel('Password', { exact: true })
this.confirmPassword = this.root.getByLabel('Confirm Password')
}
async open() {
await this.page.evaluate(() => {
void window.app!.extensionManager.dialog.showUpdatePasswordDialog()
})
await this.waitForVisible()
}
}