diff --git a/packages/cli-e2e/utils/loginSelectors.ts b/packages/cli-e2e/utils/loginSelectors.ts index 7c99c369ad..d36b6ac14d 100644 --- a/packages/cli-e2e/utils/loginSelectors.ts +++ b/packages/cli-e2e/utils/loginSelectors.ts @@ -1,6 +1,6 @@ export class LoginSelectors { public static readonly loginWithOfficeButton = - 'button[formaction^="/auth/office365"]'; + 'button[formaction^="/auth/oauth2/authorization/microsoft"]'; public static readonly passwordView = 'div[data-viewid="2"]'; public static readonly emailView = 'div[data-viewid="1"]'; public static readonly emailInput = 'input[type="email"]'; diff --git a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts index 5b4c9d4a01..c169e43a66 100644 --- a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts +++ b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.spec.ts @@ -276,7 +276,7 @@ describe('ExpandedPreviewer', () => { expect(mockedSpawnProcess).toHaveBeenNthCalledWith( 2, 'git', - ['add', '.'], + ['config', 'user.email', '"cli@coveo.com"'], { cwd: previewPath, stdio: 'ignore', @@ -285,7 +285,25 @@ describe('ExpandedPreviewer', () => { expect(mockedSpawnProcess).toHaveBeenNthCalledWith( 3, 'git', - ['commit', '--message=someorg currently'], + ['config', 'user.name', '"Coveo CLI"'], + { + cwd: previewPath, + stdio: 'ignore', + } + ); + expect(mockedSpawnProcess).toHaveBeenNthCalledWith( + 4, + 'git', + ['add', '.'], + { + cwd: previewPath, + stdio: 'ignore', + } + ); + expect(mockedSpawnProcess).toHaveBeenNthCalledWith( + 5, + 'git', + ['commit', '--message="someorg currently"'], { cwd: previewPath, stdio: 'ignore', diff --git a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts index ca18bcbacf..5f77e36420 100644 --- a/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts +++ b/packages/cli/core/src/lib/snapshot/expandedPreviewer/expandedPreviewer.ts @@ -106,6 +106,14 @@ export class ExpandedPreviewer { private async initialPreviewCommit(dirPath: string) { await spawnProcess('git', ['init'], {cwd: dirPath, stdio: 'ignore'}); + await spawnProcess('git', ['config', 'user.email', 'cli@coveo.com'], { + cwd: dirPath, + stdio: 'ignore', + }); + await spawnProcess('git', ['config', 'user.name', 'Coveo CLI'], { + cwd: dirPath, + stdio: 'ignore', + }); await spawnProcess('git', ['add', '.'], {cwd: dirPath, stdio: 'ignore'}); await spawnProcess('git', ['commit', `--message=${this.orgId} currently`], { cwd: dirPath,