Skip to content

Commit 3388566

Browse files
authored
Merge branch 'main' into matt/fe-1103-harden-assets-cursor-pagination-in-flight-tracking
2 parents bc741e7 + 90c523b commit 3388566

55 files changed

Lines changed: 1947 additions & 692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release-draft-create.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ jobs:
9292
make_latest: >-
9393
${{ github.event.pull_request.base.ref == 'main' &&
9494
needs.build.outputs.is_prerelease == 'false' }}
95-
draft: >-
96-
${{ github.event.pull_request.base.ref != 'main' ||
97-
needs.build.outputs.is_prerelease == 'true' }}
95+
draft: ${{ needs.build.outputs.is_prerelease == 'true' }}
9896
prerelease: >-
9997
${{ needs.build.outputs.is_prerelease == 'true' }}
10098
generate_release_notes: true

.storybook/preview.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { Preview, StoryContext, StoryFn } from '@storybook/vue3-vite'
55
import { createPinia } from 'pinia'
66
import 'primeicons/primeicons.css'
77
import PrimeVue from 'primevue/config'
8-
import ConfirmationService from 'primevue/confirmationservice'
98
import ToastService from 'primevue/toastservice'
109
import Tooltip from 'primevue/tooltip'
1110

@@ -42,7 +41,6 @@ setup((app) => {
4241
}
4342
}
4443
})
45-
app.use(ConfirmationService)
4644
app.use(ToastService)
4745
})
4846

browser_tests/fixtures/components/BaseDialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class BaseDialog {
88
public readonly page: Page,
99
testId?: string
1010
) {
11-
this.root = testId ? page.getByTestId(testId) : page.locator('.p-dialog')
11+
this.root = testId ? page.getByTestId(testId) : page.getByRole('dialog')
1212
this.closeButton = this.root.getByRole('button', { name: 'Close' })
1313
}
1414

browser_tests/fixtures/helpers/BuilderSaveAsHelper.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ export class BuilderSaveAsHelper {
3636
this.closeButton = this.successDialog
3737
.getByRole('button', { name: 'Close', exact: true })
3838
.filter({ hasText: 'Close' })
39-
this.dismissButton = this.successDialog.locator(
40-
'button.p-dialog-close-button'
41-
)
39+
// The icon-only X carries an aria-label, while the footer Close button
40+
// is named by its text — getByLabel only matches the former.
41+
this.dismissButton = this.successDialog.getByLabel('Close', {
42+
exact: true
43+
})
4244
this.exitBuilderButton = this.successDialog.getByRole('button', {
4345
name: 'Exit builder'
4446
})

browser_tests/fixtures/helpers/TemplateHelper.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,24 @@ export class TemplateHelper {
6969
}
7070

7171
async mockIndex(): Promise<void> {
72+
const customTemplatesHandler = async (route: Route) => {
73+
const customTemplates: Record<string, string[]> = {}
74+
await route.fulfill({
75+
status: 200,
76+
body: JSON.stringify(customTemplates),
77+
headers: {
78+
'Content-Type': 'application/json',
79+
'Cache-Control': 'no-store'
80+
}
81+
})
82+
}
83+
const customTemplatesPattern = '**/api/workflow_templates'
84+
this.routeHandlers.push({
85+
pattern: customTemplatesPattern,
86+
handler: customTemplatesHandler
87+
})
88+
await this.page.route(customTemplatesPattern, customTemplatesHandler)
89+
7290
const indexHandler = async (route: Route) => {
7391
const payload = this.index ?? mockTemplateIndex(this.templates)
7492
await route.fulfill({

browser_tests/fixtures/helpers/WorkflowHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { readFileSync } from 'fs'
22

33
import { test } from '@playwright/test'
44

5-
import type { AppMode } from '@/composables/useAppMode'
5+
import type { AppMode } from '@/utils/appMode'
66
import type {
77
ComfyApiWorkflow,
88
ComfyWorkflowJSON

browser_tests/fixtures/selectors.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export const TestIds = {
3838
settings: 'settings-dialog',
3939
settingsContainer: 'settings-container',
4040
settingsTabAbout: 'settings-tab-about',
41-
confirm: 'confirm-dialog',
4241
errorOverlay: 'error-overlay',
4342
errorOverlaySeeErrors: 'error-overlay-see-errors',
4443
errorOverlayDismiss: 'error-overlay-dismiss',

browser_tests/tests/dialogs/shareWorkflowDialog.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ async function mockShareableAssets(
9999
}
100100

101101
/**
102-
* Dismiss stale PrimeVue dialog masks left by cloud-mode's onboarding flow
103-
* or auth-triggered modals by pressing Escape until they clear.
102+
* Dismiss stale dialogs left by cloud-mode's onboarding flow or
103+
* auth-triggered modals by pressing Escape until they clear.
104104
*/
105105
async function dismissOverlays(page: Page): Promise<void> {
106-
const mask = page.locator('.p-dialog-mask')
106+
const dialogs = page.getByRole('dialog')
107107
for (let attempt = 0; attempt < 3; attempt++) {
108-
if ((await mask.count()) === 0) break
108+
if ((await dialogs.count()) === 0) break
109109
await page.keyboard.press('Escape')
110-
await mask
110+
await dialogs
111111
.first()
112112
.waitFor({ state: 'hidden', timeout: 2000 })
113113
.catch(() => {})

browser_tests/tests/maskEditor.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ test.describe('Mask Editor', { tag: '@vue-nodes' }, () => {
3232
await expect(dialog.getByText('Save')).toBeVisible()
3333
await expect(dialog.getByText('Cancel')).toBeVisible()
3434

35+
await dialog.getByTestId('pointer-zone').hover()
36+
await dialog.getByText('Brush Settings').hover()
37+
await expect(dialog.getByTestId('brush-cursor')).toHaveCSS('opacity', '0')
38+
3539
await comfyPage.expectScreenshot(dialog, 'mask-editor-dialog-open.png')
3640
}
3741
)
-444 Bytes
Loading

0 commit comments

Comments
 (0)