Skip to content

Commit

Permalink
test(app, e2e): add redbox detection, probe firestore shutdown
Browse files Browse the repository at this point in the history
This correctly identifies that #5225 can happen, where previously
it passed CI with no problem. Tested by applying / removing the fix
for 5225 and now CI will fail if a redbox ever happens again
  • Loading branch information
mikehardy committed Apr 28, 2021
1 parent 1663504 commit 21a4c03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/firestore/e2e/issues.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,10 @@ describe('firestore()', function () {
}
});
});

it('issue 5225 - app reloads successfully', async function () {
// Reload causes the TaskExecutor to shut down, make sure it does not error
await device.reloadReactNative();
});
});
});
7 changes: 7 additions & 0 deletions tests/e2e/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ beforeEach(async function beforeEach() {
}
});

// Make sure we the app is still visible (that is, no redbox) after each test
afterEach(async function afterEach() {
await waitFor(element(by.id('welcome')).atIndex(0)) // the testID for the Root View in app.js
.toBeVisible()
.withTimeout(10000); // If app reloads, it takes some time to re-display
});

after(async function () {
console.log(' ✨ Tests Complete ✨ ');
await device.terminateApp();
Expand Down

0 comments on commit 21a4c03

Please sign in to comment.