forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/tienifr/App into fix/30687
- Loading branch information
Showing
6 changed files
with
114 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -452,6 +452,56 @@ describe('Migrations', () => { | |
}, | ||
}); | ||
})); | ||
|
||
it('Should remove any instances of ownerEmail found in a report', () => | ||
Onyx.multiSet({ | ||
[`${ONYXKEYS.COLLECTION.REPORT}1`]: { | ||
reportID: 1, | ||
ownerEmail: '[email protected]', | ||
ownerAccountID: 5, | ||
}, | ||
}) | ||
.then(PersonalDetailsByAccountID) | ||
.then(() => { | ||
expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing ownerEmail from report 1'); | ||
const connectionID = Onyx.connect({ | ||
key: ONYXKEYS.COLLECTION.REPORT, | ||
waitForCollectionCallback: true, | ||
callback: (allReports) => { | ||
Onyx.disconnect(connectionID); | ||
const expectedReport = { | ||
reportID: 1, | ||
ownerAccountID: 5, | ||
}; | ||
expect(allReports[`${ONYXKEYS.COLLECTION.REPORT}1`]).toMatchObject(expectedReport); | ||
}, | ||
}); | ||
})); | ||
|
||
it('Should remove any instances of managerEmail found in a report', () => | ||
Onyx.multiSet({ | ||
[`${ONYXKEYS.COLLECTION.REPORT}1`]: { | ||
reportID: 1, | ||
managerEmail: '[email protected]', | ||
managerID: 5, | ||
}, | ||
}) | ||
.then(PersonalDetailsByAccountID) | ||
.then(() => { | ||
expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing managerEmail from report 1'); | ||
const connectionID = Onyx.connect({ | ||
key: ONYXKEYS.COLLECTION.REPORT, | ||
waitForCollectionCallback: true, | ||
callback: (allReports) => { | ||
Onyx.disconnect(connectionID); | ||
const expectedReport = { | ||
reportID: 1, | ||
managerID: 5, | ||
}; | ||
expect(allReports[`${ONYXKEYS.COLLECTION.REPORT}1`]).toMatchObject(expectedReport); | ||
}, | ||
}); | ||
})); | ||
}); | ||
|
||
describe('CheckForPreviousReportActionID', () => { | ||
|