Fix messaging direct import (#16354)

Mainly clarifying naming (scheduleMessageImport was actually tagging as
PENDING)
+ tagging as SCHEDULED in case of direct import (we skip PENDING state)
This commit is contained in:
Charles Bochet
2025-12-05 10:48:09 +01:00
committed by GitHub
parent 10b5e156e5
commit 56e66315cd
23 changed files with 69 additions and 60 deletions
@@ -111,7 +111,7 @@ describe('GoogleAPIsService', () => {
{
provide: CalendarChannelSyncStatusService,
useValue: {
resetAndScheduleCalendarEventListFetch: jest.fn(),
resetAndMarkAsCalendarEventListFetchPending: jest.fn(),
},
},
{
@@ -127,7 +127,7 @@ describe('GoogleAPIsService', () => {
{
provide: MessageChannelSyncStatusService,
useValue: {
resetAndScheduleMessageListFetch: jest.fn(),
resetAndMarkAsMessagesListFetchPending: jest.fn(),
},
},
{
@@ -234,11 +234,11 @@ describe('GoogleAPIsService', () => {
});
expect(
calendarChannelSyncStatusService.resetAndScheduleCalendarEventListFetch,
calendarChannelSyncStatusService.resetAndMarkAsCalendarEventListFetchPending,
).toHaveBeenCalledWith([existingConnectedAccount.id], 'workspace-id');
expect(
messagingChannelSyncStatusService.resetAndScheduleMessageListFetch,
messagingChannelSyncStatusService.resetAndMarkAsMessagesListFetchPending,
).toHaveBeenCalledWith([existingConnectedAccount.id], 'workspace-id');
expect(
@@ -190,12 +190,12 @@ export class GoogleAPIsService {
newOrExistingConnectedAccountId,
);
await this.messagingChannelSyncStatusService.resetAndScheduleMessageListFetch(
await this.messagingChannelSyncStatusService.resetAndMarkAsMessagesListFetchPending(
[newOrExistingConnectedAccountId],
workspaceId,
);
await this.calendarChannelSyncStatusService.resetAndScheduleCalendarEventListFetch(
await this.calendarChannelSyncStatusService.resetAndMarkAsCalendarEventListFetchPending(
[newOrExistingConnectedAccountId],
workspaceId,
);
@@ -110,13 +110,13 @@ describe('MicrosoftAPIsService', () => {
{
provide: CalendarChannelSyncStatusService,
useValue: {
resetAndScheduleCalendarEventListFetch: jest.fn(),
resetAndMarkAsCalendarEventListFetchPending: jest.fn(),
},
},
{
provide: MessageChannelSyncStatusService,
useValue: {
resetAndScheduleMessageListFetch: jest.fn(),
resetAndMarkAsMessagesListFetchPending: jest.fn(),
},
},
{
@@ -230,11 +230,11 @@ describe('MicrosoftAPIsService', () => {
});
expect(
calendarChannelSyncStatusService.resetAndScheduleCalendarEventListFetch,
calendarChannelSyncStatusService.resetAndMarkAsCalendarEventListFetchPending,
).toHaveBeenCalledWith([existingConnectedAccount.id], 'workspace-id');
expect(
messagingChannelSyncStatusService.resetAndScheduleMessageListFetch,
messagingChannelSyncStatusService.resetAndMarkAsMessagesListFetchPending,
).toHaveBeenCalledWith([existingConnectedAccount.id], 'workspace-id');
expect(
@@ -173,17 +173,17 @@ export class MicrosoftAPIsService {
newOrExistingConnectedAccountId,
);
await this.messagingChannelSyncStatusService.resetAndScheduleMessageListFetch(
await this.messagingChannelSyncStatusService.resetAndMarkAsMessagesListFetchPending(
[newOrExistingConnectedAccountId],
workspaceId,
);
await this.calendarChannelSyncStatusService.resetAndScheduleCalendarEventListFetch(
await this.calendarChannelSyncStatusService.resetAndMarkAsCalendarEventListFetchPending(
[newOrExistingConnectedAccountId],
workspaceId,
);
await this.calendarChannelSyncStatusService.resetAndScheduleCalendarEventListFetch(
await this.calendarChannelSyncStatusService.resetAndMarkAsCalendarEventListFetchPending(
[newOrExistingConnectedAccountId],
workspaceId,
);