forked from invertase/react-native-firebase
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: firebase-ios-sdk 7.2.0 / firebase-android-sdk 26.1.1 (invertase…
…#4648) * feat(app, android): android bill of materials 26.1.1 + android dependencies * chore(test): regenerate Podfile.lock result of `yarn tests:ios:pod:install` * feat(app, ios): bump firebase-ios-sdk to 7.2.0 * fix(admob, ci): workaround admob test device detection issues * test(firestore, ci): +data fixture separation / +more tests More test fixture differentiation is necessary for the test-reuse case, because even though the emulator data is wiped, the app has it's own firebase persistence and we are not cleaning that up, so future runs get more and more data unless either the test app is uninstalled/reinstalled or you just use deterministically separate fixtures like this commit * test(messaging): fix test reuse case w/auto-init reset * test(e2e): update podfile, de-integrate pre-compiled firestore pre-compiled firestore sometimes gives me leveldb symbol collisions on linking in my local environment. It may be possible to integrate it in most cases but in some cases it fails, so de-integrating it for now * test(database, e2e): disable some flaky database tests * test(admob, e2e): disable rewarded ad loads on ios they were failing in local testing for some reason * test(firestore, e2e): add timeout to query snapshot callback test * test(auth, e2e): let sign-ins rest before testing callbacks on slower android devices this is necessary to avoid false-negative test results
- Loading branch information
Showing
4 changed files
with
34 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
const COLLECTION = 'firestore'; | ||
const { wipe } = require('../helpers'); | ||
describe('firestore().collection().where()', () => { | ||
before(() => wipe()); | ||
beforeEach(async () => await wipe()); | ||
it('throws if fieldPath is invalid', () => { | ||
try { | ||
firebase | ||
|
@@ -339,9 +339,8 @@ describe('firestore().collection().where()', () => { | |
}); | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit('returns with in filter', async () => { | ||
const colRef = firebase.firestore().collection(`${COLLECTION}/filter/in`); | ||
it('returns with in filter', async () => { | ||
const colRef = firebase.firestore().collection(`${COLLECTION}/filter/in${Date.now() + ''}`); | ||
|
||
await Promise.all([ | ||
colRef.add({ status: 'Ordered' }), | ||
|
@@ -359,9 +358,10 @@ describe('firestore().collection().where()', () => { | |
}); | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit('returns with array-contains-any filter', async () => { | ||
const colRef = firebase.firestore().collection(`${COLLECTION}/filter/array-contains-any`); | ||
it('returns with array-contains-any filter', async () => { | ||
const colRef = firebase | ||
.firestore() | ||
.collection(`${COLLECTION}/filter/array-contains-any${Date.now() + ''}`); | ||
|
||
await Promise.all([ | ||
colRef.add({ category: ['Appliances', 'Housewares', 'Cooking'] }), | ||
|
@@ -375,9 +375,10 @@ describe('firestore().collection().where()', () => { | |
snapshot.size.should.eql(3); // 2nd record should only be returned once | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit('returns with a FieldPath', async () => { | ||
const colRef = firebase.firestore().collection(`${COLLECTION}/filter/where-fieldpath`); | ||
it('returns with a FieldPath', async () => { | ||
const colRef = firebase | ||
.firestore() | ||
.collection(`${COLLECTION}/filter/where-fieldpath${Date.now() + ''}`); | ||
const fieldPath = new firebase.firestore.FieldPath('map', '[email protected]'); | ||
|
||
await colRef.add({ | ||
|
@@ -412,9 +413,8 @@ describe('firestore().collection().where()', () => { | |
} | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit('should correctly query integer values with in operator', async () => { | ||
const ref = firebase.firestore().collection(COLLECTION); | ||
it('should correctly query integer values with in operator', async () => { | ||
const ref = firebase.firestore().collection(`${COLLECTION}/filter/int-in${Date.now() + ''}`); | ||
|
||
await ref.add({ status: 1 }); | ||
|
||
|
@@ -427,9 +427,10 @@ describe('firestore().collection().where()', () => { | |
items.length.should.equal(1); | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit('should correctly query integer values with array-contains operator', async () => { | ||
const ref = firebase.firestore().collection(COLLECTION); | ||
it('should correctly query integer values with array-contains operator', async () => { | ||
const ref = firebase | ||
.firestore() | ||
.collection(`${COLLECTION}/filter/int-array-contains${Date.now() + ''}`); | ||
|
||
await ref.add({ status: [1, 2, 3] }); | ||
|
||
|
@@ -442,9 +443,8 @@ describe('firestore().collection().where()', () => { | |
items.length.should.equal(1); | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit("should correctly retrieve data when using 'not-in' operator", async () => { | ||
const ref = firebase.firestore().collection(COLLECTION); | ||
it("should correctly retrieve data when using 'not-in' operator", async () => { | ||
const ref = firebase.firestore().collection(`${COLLECTION}/filter/not-in${Date.now() + ''}`); | ||
|
||
await Promise.all([ref.add({ notIn: 'here' }), ref.add({ notIn: 'now' })]); | ||
|
||
|
@@ -519,9 +519,10 @@ describe('firestore().collection().where()', () => { | |
} | ||
}); | ||
|
||
// FIXME flaky with semi-persistent data until emulator is working | ||
xit("should correctly retrieve data when using '!=' operator", async () => { | ||
const ref = firebase.firestore().collection(COLLECTION); | ||
it("should correctly retrieve data when using '!=' operator", async () => { | ||
const ref = firebase | ||
.firestore() | ||
.collection(`${COLLECTION}/filter/bang-equals${Date.now() + ''}`); | ||
|
||
await Promise.all([ref.add({ notEqual: 'here' }), ref.add({ notEqual: 'now' })]); | ||
|
||
|
@@ -578,7 +579,9 @@ describe('firestore().collection().where()', () => { | |
}); | ||
|
||
it('should handle where clause after sort by', async () => { | ||
const ref = firebase.firestore().collection(`${COLLECTION}/filter/sort-by-where`); | ||
const ref = firebase | ||
.firestore() | ||
.collection(`${COLLECTION}/filter/sort-by-where${Date.now() + ''}`); | ||
|
||
await ref.add({ status: 1 }); | ||
await ref.add({ status: 2 }); | ||
|
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