wip
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import type { Page, BrowserContext } from 'playwright';
|
||||
import { PlaywrightAuthSessionService } from '../../../packages/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
|
||||
import type { PlaywrightBrowserSession } from '../../../packages/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
|
||||
import type { SessionCookieStore } from '../../../packages/infrastructure/adapters/automation/auth/SessionCookieStore';
|
||||
import type { IPlaywrightAuthFlow } from '../../../packages/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
|
||||
import type { ILogger } from '../../../packages/application/ports/ILogger';
|
||||
import { AuthenticationState } from '../../../packages/domain/value-objects/AuthenticationState';
|
||||
import { Result } from '../../../packages/shared/result/Result';
|
||||
import { PlaywrightAuthSessionService } from '../../../../packages/automation-infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
|
||||
import type { PlaywrightBrowserSession } from '../../../../packages/automation-infrastructure/adapters/automation/core/PlaywrightBrowserSession';
|
||||
import type { SessionCookieStore } from '../../../../packages/automation-infrastructure/adapters/automation/auth/SessionCookieStore';
|
||||
import type { IPlaywrightAuthFlow } from '../../../../packages/automation-infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
|
||||
import type { ILogger } from '../../../../packages/automation-application/ports/ILogger';
|
||||
import { AuthenticationState } from '../../../../packages/automation-domain/value-objects/AuthenticationState';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
|
||||
describe('PlaywrightAuthSessionService.initiateLogin browser mode behaviour', () => {
|
||||
const originalEnv = { ...process.env };
|
||||
@@ -98,7 +98,7 @@ describe('PlaywrightAuthSessionService.initiateLogin browser mode behaviour', ()
|
||||
const result = await service.initiateLogin();
|
||||
|
||||
expect(result.isOk()).toBe(true);
|
||||
expect(mockAuthFlow.getLoginUrl).toHaveBeenCalledTimes(2);
|
||||
expect(mockAuthFlow.getLoginUrl).toHaveBeenCalledTimes(1);
|
||||
|
||||
expect(mockPage.goto).toHaveBeenCalledWith(
|
||||
'https://members-ng.iracing.com/login',
|
||||
|
||||
Reference in New Issue
Block a user