Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0b41099
test: updated setup for identity tests
jaissica12 Oct 20, 2025
600d90a
test: added .only to test files for targeted testing
jaissica12 Oct 22, 2025
46d2c3b
test: updated identity test for failing test
jaissica12 Oct 23, 2025
c0fb30e
test: updated identity test to handle identity calls
jaissica12 Oct 23, 2025
6e80ee6
test: document Firefox timing issues in identity tests
jaissica12 Oct 23, 2025
a4c5c44
test: updated karma timeout config
jaissica12 Oct 23, 2025
f691539
test: updated identity tests to resolve flaky tests
jaissica12 Oct 24, 2025
b245b05
test: updated identity test when mpid is zero
jaissica12 Oct 24, 2025
1eb173b
test: updated identity tests when mpid is invalid
jaissica12 Oct 24, 2025
4e4de0b
test: updated karma config for timeout issues
jaissica12 Oct 24, 2025
b2ab345
test: increase timeout for flaky identity tests for Firefox
jaissica12 Oct 24, 2025
71302f9
test: reduce browserNoActivityTimeout to 20000 for Firefox browser
jaissica12 Oct 24, 2025
301d5f9
test: increase browserNoActivityTimeout to 60000 for Firefox browser
jaissica12 Oct 24, 2025
f537ab7
test: increase mocha timeout to 10 seconds
jaissica12 Oct 24, 2025
00fad32
test: updated timeout for identity test
jaissica12 Oct 24, 2025
c738b43
test: reverted timeout changes from individual tests
jaissica12 Oct 24, 2025
01a78d8
test: updated waitForCondition for identity login
jaissica12 Oct 24, 2025
62aef29
test: cleanup identity tests
jaissica12 Oct 27, 2025
45b9892
test: use logger spy for robust identity test SDKE-420
jaissica12 Oct 27, 2025
2b49b0a
Merge branch 'test/SDKE-303-evaluate-each-integration-test-setup' int…
jaissica12 Oct 27, 2025
cf63920
test: updated failing identities attributes test
jaissica12 Oct 27, 2025
ea95636
test: use logger spy for identity response in identity attributes tests
jaissica12 Oct 27, 2025
e0032c7
test: fix logger spy scope in identity attributes test
jaissica12 Oct 27, 2025
565cec7
test: update logger spy in identity tests
jaissica12 Oct 28, 2025
32e35f3
test: updated identity callback test to handle timeout error
jaissica12 Oct 28, 2025
1dec717
test: rollback karma config timeout to 5 sec
jaissica12 Oct 28, 2025
1dc590e
test: update failing identity tests to with logger spy
jaissica12 Oct 28, 2025
fa332dd
test: update identity test waitForCondition for modify function
jaissica12 Oct 28, 2025
2c02bcd
test: rollback karma config and remove SDKE-420 ticket comment
jaissica12 Oct 28, 2025
9c90192
test: removed extra spaces and waitForCondition calls from identity t…
jaissica12 Oct 28, 2025
705e462
test: added ticket SDKE-420 comment for flakey test
jaissica12 Oct 28, 2025
7eb53bc
test: clean up identity tests and add SDKE-420 comment to flaky tests
jaissica12 Oct 28, 2025
088aa6c
test: updated test message content
jaissica12 Oct 28, 2025
6dea100
fix test for queue events when MPID is 0
rmi22186 Oct 28, 2025
acfaa82
test: updated identity localStorage flaky test
jaissica12 Oct 28, 2025
e4ee4e5
fix additional tests by adding waitForCondition and resetForTests at …
rmi22186 Oct 30, 2025
11bf973
remove jira ticket
rmi22186 Oct 30, 2025
9952a4d
fix consent change test by adding waitForCondition and resetForTests
jaissica12 Oct 30, 2025
c6fdceb
revert karma config changes
jaissica12 Oct 30, 2025
3ad0a46
added browserConsoleLogOptions to karma config
jaissica12 Oct 30, 2025
13c3454
remove comment and jira ticket for consent rules test
jaissica12 Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions test/src/tests-identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ describe.only('identity', function() {
};

hasBeforeEachCallbackReturned = () => beforeEachCallbackCalled;

});

afterEach(function () {
Expand Down Expand Up @@ -803,6 +802,8 @@ describe.only('identity', function() {
});

it('localStorage - should switch user cookies to new mpid details from cookies when a new mpid is provided', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
window.mParticle.config.useCookieStorage = false;

setLocalStorage();
Expand Down Expand Up @@ -867,8 +868,9 @@ describe.only('identity', function() {
});
});

// https://go.mparticle.com/work/SDKE-420
it('should switch user cookies to new mpid details from cookies when a new mpid is provided', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
mParticle.config.useCookieStorage = true;

setLocalStorage();
Expand Down Expand Up @@ -2066,8 +2068,9 @@ describe.only('identity', function() {
expect(Object.keys(combinedUIsByType).length).to.equal(4);
});

// https://go.mparticle.com/work/SDKE-420
it("should find the related MPID's cookies when given a UI with fewer IDs when passed to login, logout, and identify, and then log events with updated cookies", async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
loggerSpy = setupLoggerSpy();
fetchMock.restore();
const user1: IdentityApiData = {
Expand Down Expand Up @@ -2196,8 +2199,9 @@ describe.only('identity', function() {
});
});

// https://go.mparticle.com/work/SDKE-420
it('should add new MPIDs to cookie structure when initializing new identity requests, returning an existing mpid when reinitializing with a previous identity', async () => {
it('should add new MPIDs to cookie structure when initializing new with a previous identity', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
loggerSpy = setupLoggerSpy();
const user1 = {
userIdentities: {
Expand Down Expand Up @@ -2971,8 +2975,9 @@ describe.only('identity', function() {
.should.have.property('attr', 'value');
});

// https://go.mparticle.com/work/SDKE-420
Copy link
Member

Choose a reason for hiding this comment

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

for future reference - this should be go/j/SDKE-420

the mparticle go link would look for this ticket in the mparticle jira, which doesn't work since we are in rokt jira

it('identifyCallback response should have a getUser function on the result object', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
let result;
loggerSpy = setupLoggerSpy();
fetchMockSuccess(urls.identify, {
Expand Down Expand Up @@ -3121,6 +3126,8 @@ describe.only('identity', function() {
});

it('should have a getUser function on modify result object', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
loggerSpy = setupLoggerSpy();
let result
let modifyResult;
Expand Down Expand Up @@ -3166,8 +3173,9 @@ describe.only('identity', function() {
});
});

// https://go.mparticle.com/work/SDKE-420
it('should call identify when there is an active session but no current user', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
loggerSpy = setupLoggerSpy();
// this broken cookie state occurs when an initial identify request is made, fails, and the
// client had no programmatic handling of a failed identify request
Expand Down Expand Up @@ -4470,6 +4478,8 @@ describe.only('identity', function() {

// https://go.mparticle.com/work/SDKE-420
it('should set currentUser once the email is positively identified', async () => {
await waitForCondition(hasIdentityCallInflightReturned);
mParticle._resetForTests(MPConfig);
loggerSpy = setupLoggerSpy();
fetchMockSuccess(urls.identify, {
mpid: testRoktMPID,
Expand Down
Loading