Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions browser_tests/helpers/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ export class ComfyTemplates {
}

async loadTemplate(id: string) {
await this.content
.getByTestId(`template-workflow-${id}`)
.getByRole('img')
.click()
const templateCard = this.content.getByTestId(`template-workflow-${id}`)
await templateCard.scrollIntoViewIfNeeded()
await templateCard.getByRole('img').click()
}

async getAllTemplates(): Promise<TemplateInfo[]> {
Expand Down
6 changes: 3 additions & 3 deletions browser_tests/tests/templates.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ test.describe('Templates', () => {
})

test('Uses proper locale files for templates', async ({ comfyPage }) => {
// Set locale to French before opening templates
await comfyPage.setSetting('Comfy.Locale', 'fr')

// Load the templates dialog and wait for the French index file request
const requestPromise = comfyPage.page.waitForRequest(
'**/templates/index.fr.json'
)

// Set locale to French before opening templates
await comfyPage.setSetting('Comfy.Locale', 'fr')

await comfyPage.executeCommand('Comfy.BrowseTemplates')

const request = await requestPromise
Expand Down