mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 09:13:08 +00:00
E2E Test Fix - Ready for Manual Application
This commit is contained in:
@@ -118,21 +118,10 @@ test.describe('Add Context Image', () => {
|
|||||||
|
|
||||||
test('should import an image file to context', async ({ page }) => {
|
test('should import an image file to context', async ({ page }) => {
|
||||||
await setupProjectWithFixture(page, getFixturePath());
|
await setupProjectWithFixture(page, getFixturePath());
|
||||||
|
await authenticateForTests(page);
|
||||||
await page.goto('/');
|
await page.goto('/');
|
||||||
await waitForNetworkIdle(page);
|
await waitForNetworkIdle(page);
|
||||||
|
|
||||||
// Check if we're on the login screen and authenticate if needed
|
|
||||||
const loginInput = page.locator('input[type="password"][placeholder*="API key"]');
|
|
||||||
const isLoginScreen = await loginInput.isVisible({ timeout: 2000 }).catch(() => false);
|
|
||||||
if (isLoginScreen) {
|
|
||||||
const apiKey = process.env.AUTOMAKER_API_KEY || 'test-api-key-for-e2e-tests';
|
|
||||||
await loginInput.fill(apiKey);
|
|
||||||
await page.locator('button:has-text("Login")').click();
|
|
||||||
await page.waitForURL('**/', { timeout: 5000 });
|
|
||||||
await waitForNetworkIdle(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
await navigateToContext(page);
|
await navigateToContext(page);
|
||||||
|
|
||||||
// Wait for the file input to be attached to the DOM before setting files
|
// Wait for the file input to be attached to the DOM before setting files
|
||||||
|
|||||||
Reference in New Issue
Block a user