Skip to content

Commit 59bdf04

Browse files
state name update
1 parent 514816c commit 59bdf04

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/compass-generative-ai/src/store/atlas-optin-reducer.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ describe('atlasOptInReducer', function () {
4141
'initial'
4242
);
4343
void store.dispatch(atlasAiServiceOptedIn());
44+
console.log(store.getState());
4445
await store.dispatch(optIn());
4546
expect(mockAtlasService.optIn).not.to.have.been.called;
4647
expect(store.getState().optIn).to.have.nested.property(
4748
'state',
48-
'success'
49+
'optin-success'
4950
);
5051
});
5152

@@ -68,7 +69,7 @@ describe('atlasOptInReducer', function () {
6869
expect(mockAtlasService.optIn).to.have.been.calledOnce;
6970
expect(store.getState().optIn).to.have.nested.property(
7071
'state',
71-
'success'
72+
'optin-success'
7273
);
7374
});
7475

@@ -156,7 +157,7 @@ describe('atlasOptInReducer', function () {
156157
await store.dispatch(optIn());
157158
await optInPromise;
158159

159-
expect(store.getState().optIn).to.have.property('state', 'success');
160+
expect(store.getState().optIn).to.have.property('state', 'optin-success');
160161
});
161162

162163
it('should reject if opt in flow fails', async function () {

packages/compass-generative-ai/src/store/atlas-optin-reducer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ export const optIn = (): GenAIAtlasOptInThunkAction<Promise<void>> => {
266266

267267
try {
268268
throwIfAborted(signal);
269-
await atlasAiService.optIntoGenAIFeaturesAtlas();
269+
console.log(atlasAiService);
270+
await atlasAiService.optIn.optIntoGenAIFeaturesAtlas();
270271
dispatch(atlasAiServiceOptedIn());
271272
resolve();
272273
} catch (err) {

0 commit comments

Comments
 (0)