Skip to content

resetting indexedDB between test-runs #2240

@phoet

Description

@phoet

Are you requesting a feature or reporting a bug?

as of the latest firebase release (4.12.0) they keep track of the login-state in the indexdDB.

because of this all my testcafe tests fail as they expect a login before checking the app.

What is the current behavior?

indexDB keeps state

What is the expected behavior?

indexDB is cleared

How would you reproduce the current behavior (if this is a bug)?

app.auth().onAuthStateChanged((user) => {
  console.log(user);
}

Provide the test code and the tested page URL (if applicable)

the workaround i'm doing right now looks like this.

fixture(`Index page`)
  .page('http://localhost:8080/')
  .afterEach(async t => {
    await t.eval(() => indexedDB.deleteDatabase('firebaseLocalStorageDb'));
  })

mainly leaving this here becaus i could not find anything about this change on the web.

Metadata

Metadata

Assignees

No one assigned

    Labels

    STATE: Auto-lockedAn issue has been automatically locked by the Lock bot.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions