Skip to content

feat(auth, emulator): implement useEmulator with jest + e2e testing #4552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 16, 2020
43 changes: 0 additions & 43 deletions packages/analytics/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ class FirebaseAnalyticsModule extends FirebaseModule {
return this.native.setAnalyticsCollectionEnabled(enabled);
}

setCurrentScreen(screenName, screenClassOverride) {
// eslint-disable-next-line no-console
console.warn(
'firebase.analytics().setCurrentScreen(), is now deprecated. Please use firebase.analytics().logScreenView() instead',
);
return this.logScreenView({
screen_name: screenName,
screen_class: screenClassOverride,
});
}

setSessionTimeoutDuration(milliseconds = 1800000) {
if (!isNumber(milliseconds)) {
throw new Error(
Expand Down Expand Up @@ -319,16 +308,6 @@ class FirebaseAnalyticsModule extends FirebaseModule {
),
);
}
/**
* logEcommercePurchase purchase is now deprecated, use logPurchase instead:
* https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event#public-static-final-string-ecommerce_purchase
*/
logEcommercePurchase() {
// eslint-disable-next-line no-console
console.warn(
'firebase.analytics().logEcommercePurchase(), "ECOMMERCE_PURCHASE" event is now deprecated. Please use firebase.analytics().logPurchase() instead',
);
}

logGenerateLead(object = {}) {
if (!isObject(object)) {
Expand Down Expand Up @@ -423,28 +402,6 @@ class FirebaseAnalyticsModule extends FirebaseModule {
);
}

/**
* Deprecated, use logRefundEvent instead:
* https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event#public-static-final-string-present_offer
*/
logPresentOffer() {
// eslint-disable-next-line no-console
console.warn(
'firebase.analytics().logPresentOffer(), "PRESENT_OFFER" event is now deprecated. Please use firebase.analytics().logViewPromotion() instead',
);
}

/**
* Deprecated, use logRefundEvent instead:
* https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event#public-static-final-string-purchase_refund
*/
logPurchaseRefund() {
// eslint-disable-next-line no-console
console.warn(
'firebase.analytics().logPurchaseRefund(), "PURCHASE_REFUND" event is now deprecated. Please use firebase.analytics().logRefund() instead',
);
}

logSelectContent(object) {
if (!isObject(object)) {
throw new Error(
Expand Down
11 changes: 11 additions & 0 deletions packages/app/e2e/helpers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
exports.getE2eTestProject = function getE2eTestProject() {
return 'react-native-firebase-testing';
};

exports.getE2eEmulatorHost = function getE2eEmulatorHost() {
// Note that in most package implementations involving the emulator, we re-write
// localhost and 127.0.0.1 on Android to 10.0.2.2 (the Android emulator host interface)
// But this specific code is executing in the host context even during E2E test.
// So no re-write is necessary here.
return 'localhost';
};
Loading