Skip to content

Commit bda96d6

Browse files
committed
Fix tests
1 parent 32d1721 commit bda96d6

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

configs/testing-library-compass/src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ export class MockDataService
182182
build: {
183183
isEnterprise: false,
184184
version: '0.0.0',
185-
isEndOfLife: false,
186185
},
187186
host: {},
188187
genuineMongoDB: {

packages/compass-connections/src/stores/connections-store-redux.spec.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,16 @@ describe('CompassConnections store', function () {
122122
expect(storedConnectionAfterConnect).to.exist;
123123

124124
await waitFor(() => {
125-
expect(track.getCall(1).firstArg).to.eq('New Connection');
125+
const {
126+
args: [eventName, eventData],
127+
} = track.getCall(1);
128+
expect(eventName).to.eq('Screen');
129+
// Version is 0.0.0, which is clearly end of life
130+
expect(eventData.name).to.eq('end_of_life_mongodb_modal');
131+
});
132+
133+
await waitFor(() => {
134+
expect(track.getCall(2).firstArg).to.eq('New Connection');
126135
});
127136
});
128137

@@ -396,7 +405,16 @@ describe('CompassConnections store', function () {
396405
await connectionsStore.actions.saveAndConnect(updatedConnection);
397406

398407
await waitFor(() => {
399-
expect(track.getCall(1).firstArg).to.eq('New Connection');
408+
const {
409+
args: [eventName, eventData],
410+
} = track.getCall(1);
411+
expect(eventName).to.eq('Screen');
412+
// Version is 0.0.0, which is clearly end of life
413+
expect(eventData.name).to.eq('end_of_life_mongodb_modal');
414+
});
415+
416+
await waitFor(() => {
417+
expect(track.getCall(2).firstArg).to.eq('New Connection');
400418
});
401419

402420
expect(

0 commit comments

Comments
 (0)