Skip to content

Conversation

@alexs-mparticle
Copy link
Collaborator

@alexs-mparticle alexs-mparticle commented Nov 25, 2024

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • Migrates MP Instance Manager tests to TypeScript

Testing Plan

  • Was this tested locally? If not, explain why.
  • N/A - PR only updates tests. Run automated tests to verify.

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@alexs-mparticle alexs-mparticle marked this pull request as ready for review November 25, 2024 20:06
@alexs-mparticle alexs-mparticle added wait to merge refactor Changes to the structure of the code labels Nov 25, 2024
@alexs-mparticle alexs-mparticle force-pushed the refactor/SQDSDKS-6771-mp-instance-manager-tests branch from 254cdd0 to d092629 Compare November 25, 2024 20:24
Copy link
Member

@rmi22186 rmi22186 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nits, otherwise, looks great!

setDeviceId(deviceId: string): void;
setSessionAttribute(key: string, value: string): void;
getInstance(): MParticleWebSDK; // TODO: Create a new type for MParticleWebSDKInstance
getInstance(instanceName?: string): MParticleWebSDK; // TODO: Create a new type for MParticleWebSDKInstance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch on missing argument here!

add an mp work item for this instead please.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should possibly do this as part of https://go.mparticle.com/work/SQDSDKS-4804

ProductActionType: SDKProductActionType;
generateHash(value: string): string;
isIOS?: boolean;
sessionManager: Pick<ISessionManager, 'getSession'>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also add a work item, or perhaps add to the V3 item about making the public API for this better? perhaps we only need to put getSession on the instance and not require a customer to use mp.sessionManager.getSession(). not a decision, but just something to flag given it's just 1 method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +99 to +107
'Other5',
'Other6',
'Other7',
'Other8',
'Other9',
'Other10',
'MobileNumber',
'PhoneNumber2',
'PhoneNumber3',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you TS

@alexs-mparticle alexs-mparticle force-pushed the refactor/SQDSDKS-6771-mp-instance-manager-tests branch from 0d6a2a7 to 1cf2faf Compare November 27, 2024 19:15
@sonarqubecloud
Copy link

@alexs-mparticle alexs-mparticle merged commit 802b639 into refactor/ts-migration-blackout-2024 Nov 27, 2024
31 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Changes to the structure of the code wait to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants