Skip to content

Commit efd1a39

Browse files
committed
fix: mirror Tech Writer review
1 parent 6c450a1 commit efd1a39

File tree

1 file changed

+45
-37
lines changed

1 file changed

+45
-37
lines changed

CONTRIBUTING.md

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,21 @@ below covers how to run the full test suite against an actual Firebase project.
156156

157157
#### Integration Tests with an actual Firebase project
158158

159-
Other integration tests require an actual Firebase project. If you do not already have one
160-
suitable for running the tests against, you can create a new project in the
159+
Integration tests are executed against a real life Firebase project. If you do not already
160+
have one suitable for running the tests against, you can create a new project in the
161161
[Firebase Console](https://console.firebase.google.com) following the setup guide below.
162-
Otherwise you can obtain the following credentials from your current project:
162+
If you already have a Firebase project, you'll need to obtain credentials to communicate and
163+
authorize access to your Firebase project:
163164

164-
1. Service account certificate: This can be downloaded as a JSON file from the
165-
**'Settings > Service Accounts'** tab of the Firebase console when you click the
166-
**'Generate new private key'** button. Copy the file into the repo so it's available
167-
at `test/resources/key.json`.
165+
1. Service account certificate: This allows access to your Firebase project through a service account
166+
which is required for all integration tests. This can be downloaded as a JSON file from the
167+
**Settings > Service Accounts** tab of the Firebase console when you click the
168+
**Generate new private key** button. Copy the file into the repo so it's available at
169+
`test/resources/key.json`.
168170

169171

170-
2. Web API key: This is displayed in the **'Settings > General'** tab of the Firebase console
172+
2. Web API key: This allows for Auth sign-in needed for some Authentication and Tenant Management
173+
integration tests. This is displayed in the **Settings > General** tab of the Firebase console
171174
after enabling Authentication as described in the steps below. Copy it and save to a new text
172175
file at `test/resources/apikey.txt`.
173176

@@ -176,65 +179,70 @@ Set up your Firebase project as follows:
176179

177180

178181
1. Enable Authentication:
179-
1. Go to the Firebase Console, and select **'Authentication'** from the **'Build'** menu.
180-
2. Click on **'Get Started'**.
181-
3. Select **'Sign-in method > Add new provider > Email/Password'** then enable both the
182-
**'Email/Password'** and **'Email link (passwordless sign-in)'** options.
182+
1. Go to the Firebase Console, and select **Authentication** from the **Build** menu.
183+
2. Click on **Get Started**.
184+
3. Select **Sign-in method > Add new provider > Email/Password** then enable both the
185+
**Email/Password** and **Email link (passwordless sign-in)** options.
183186

184187

185188
2. Enable Firestore:
186-
1. Go to the Firebase Console, and select **'Firestore Database'** from the **'Build'** menu.
187-
2. Click on the **'Create database'** button. You can choose to set up Firestore either in
189+
1. Go to the Firebase Console, and select **Firestore Database** from the **Build** menu.
190+
2. Click on the **Create database** button. You can choose to set up Firestore either in
188191
the production mode or in the test mode.
189192

190193

191194
3. Enable Realtime Database:
192-
1. Go to the Firebase Console, and select **'Realtime Database'** from the **'Build'** menu.
193-
2. Click on the **'Create database'** button. You can choose to set up the Realtime database
195+
1. Go to the Firebase Console, and select **Realtime Database** from the **Build** menu.
196+
2. Click on the **Create Database** button. You can choose to set up the Realtime Database
194197
either in the locked mode or in the test mode.
195-
3. In the **'Data'** tab click on the kebab menu (3 dots) and select **'Create Database'**.
196-
4. Enter your Project ID (Found in the **'General'** tab in **'Account Settings'**) as the
197-
**'Realtime Database reference'**. Again, you can choose to set up the Realtime database
198+
199+
> **Note:** Integration tests are not run against the default Realtime Database reference and are
200+
instead run against a database created at `https://{PROJECT_ID}.firebaseio.com`.
201+
This second Realtime Database reference is created in the following steps.
202+
203+
3. In the **Data** tab click on the kebab menu (3 dots) and select **Create Database**.
204+
4. Enter your Project ID (Found in the **General** tab in **Account Settings**) as the
205+
**Realtime Database reference**. Again, you can choose to set up the Realtime Database
198206
either in the locked mode or in the test mode.
199207

200208

201209
4. Enable Storage:
202-
1. Go to the Firebase Console, and select **'Storage'** from the **'Build'** menu.
203-
2. Click on the **'Get started'** button. You can choose to set up the Realtime database
210+
1. Go to the Firebase Console, and select **Storage** from the **Build** menu.
211+
2. Click on the **Get started** button. You can choose to set up Cloud Storage
204212
either in the production mode or in the test mode.
205213

206214

207215
5. Enable the Firebase ML API:
208216
1. Go to the
209-
[Google Developers Console | Firebase ML API](https://console.developers.google.com/apis/api/firebaseml.googleapis.com/overview)
217+
[Google Cloud console | Firebase ML API](https://console.cloud.google.com/apis/api/firebaseml.googleapis.com/overview)
210218
and make sure your project is selected.
211219
2. If the API is not already enabled, click **'Enable'**.
212220

213221

214222
6. Enable the IAM API:
215-
1. Go to the[Google Cloud Platform Console](https://console.cloud.google.com)
216-
and make sureyour Firebase project is selected.
217-
2. Select **'APIs & Services'** from the main menu, and click the
218-
**'ENABLE APIS AND SERVICES'** button.
219-
3. Search for and enable **'Identity and Access Management (IAM) API'** by Google Enterprise API.
223+
1. Go to the [Google Cloud console](https://console.cloud.google.com)
224+
and make sure your Firebase project is selected.
225+
2. Select **APIs & Services** from the main menu, and click the
226+
**ENABLE APIS AND SERVICES** button.
227+
3. Search for and enable **Identity and Access Management (IAM) API** by Google Enterprise API.
220228

221229

222230
7. Enable Tenant Management:
223231
1. Go to
224-
[Google Developers Console | Identity Platform](https://console.cloud.google.com/customer-identity/)
225-
and if it is not already enabled, click **'Enable'**.
226-
2. Then follow
227-
[this guide](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart#enabling_multi-tenancy)
228-
to enable multi-tenancy.
232+
[Google Cloud console | Identity Platform](https://console.cloud.google.com/customer-identity/)
233+
and if it is not already enabled, click **Enable**.
234+
2. Then
235+
[enable multi-tenancy](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart#enabling_multi-tenancy)
236+
for your project.
229237

230238

231-
8. Ensure your service account has the **'Firebase Authentication Admin'** role. This is required
239+
8. Ensure your service account has the **Firebase Authentication Admin** role. This is required
232240
to ensure that exported user records contain the password hashes of the user accounts:
233-
1. Go to [Google Cloud Platform Console / IAM & admin](https://console.cloud.google.com/iam-admin).
234-
2. Find your service account in the list. If not added click the **'pencil'** icon to edit its
241+
1. Go to [Google Cloud console | IAM & admin](https://console.cloud.google.com/iam-admin).
242+
2. Find your service account in the list. If not added click the **pencil** icon to edit its
235243
permissions.
236-
3. Click **'ADD ANOTHER ROLE'** and choose **'Firebase Authentication Admin'**.
237-
4. Click **'SAVE'**.
244+
3. Click **ADD ANOTHER ROLE** and choose **Firebase Authentication Admin**.
245+
4. Click **SAVE**.
238246

239247

240248
Finally, to run the integration test suite:

0 commit comments

Comments
 (0)