From b4670448daf71683c1c18027f9268d01d38d1e6f Mon Sep 17 00:00:00 2001 From: darrelfrancis <20881844+darrelfrancis@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:35:50 +0000 Subject: [PATCH] Docs: Databases not on ".firebaseio.com" Early in the development of Firebase, all databases were accessible at the URL: https://.firebaseio.com However, now there are multiple locations and instances of databases, and that assumption no longer holds. If your database is not at `https://.firebaseio.com`, cypress-firebase will seem to hang, rather than giving an explicit error. For that reason it is very helpful to warn people up front, to put in the URL. --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 253bca7f..cc080185 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,13 @@ If you are interested in what drove the need for this checkout [the why section] // NOTE: Add "supportFile" setting if separate location is used setupNodeEvents(on, config) { // e2e testing node events setup code - return cypressFirebasePlugin(on, config, admin); - // NOTE: If not setting GCLOUD_PROJECT env variable, project can be set like so: - // return cypressFirebasePlugin(on, config, admin, { projectId: 'some-project' }); + return cypressFirebasePlugin(on, config, admin,{ + // Here is where you can pass special options. + // If you have not set the GCLOUD_PROJECT environment variable, give the projectId here, like so: + // projectId: 'some-project', + // if your databaseURL is not just your projectId plus ".firebaseio.com", then you _must_ give it here, like so: + // databaseURL: 'some-project-default-rtdb.europe-west1.firebasedatabase.app', + }); }, }, }); @@ -70,9 +74,13 @@ If you are interested in what drove the need for this checkout [the why section] // NOTE: Make supportFile exists if separate location is provided setupNodeEvents(on, config) { // e2e testing node events setup code - return cypressFirebasePlugin(on, config, admin); - // NOTE: If not setting GCLOUD_PROJECT env variable, project can be set like so: - // return cypressFirebasePlugin(on, config, admin, { projectId: 'some-project' }); + return cypressFirebasePlugin(on, config, admin,{ + // Here is where you can pass special options. + // If you have not set the GCLOUD_PROJECT environment variable, give the projectId here, like so: + // projectId: 'some-project', + // if your databaseURL is not just your projectId plus ".firebaseio.com", then you _must_ give it here, like so: + // databaseURL: 'some-project-default-rtdb.europe-west1.firebasedatabase.app', + }); }, }, });