diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index 730acc7490d..5e66054a02c 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -109,22 +109,27 @@ test.describe('Templates', () => { }) test('Uses proper locale files for templates', async ({ comfyPage }) => { - // 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 + const dialog = comfyPage.page.getByRole('dialog').filter({ + has: comfyPage.page.getByRole('heading', { name: 'Modèles', exact: true }) + }) + await expect(dialog).toBeVisible() - // Verify French index was requested - expect(request.url()).toContain('templates/index.fr.json') + // Validate that French-localized strings from the templates index are rendered + await expect( + dialog.getByRole('heading', { name: 'Modèles', exact: true }) + ).toBeVisible() + await expect( + dialog.getByRole('button', { name: 'Tous les modèles', exact: true }) + ).toBeVisible() - await expect(comfyPage.templates.content).toBeVisible() + // Ensure the English fallback copy is not shown anywhere + await expect( + comfyPage.page.getByText('All Templates', { exact: true }) + ).toHaveCount(0) }) test('Falls back to English templates when locale file not found', async ({