3

I'm writing my first Flutter integrations tests, and noticed that when the app starts up, the user is already signed in and lands on the page after sign in. I don't know why this happens, maybe because the app has been running previously on the same device in development mode with a signed in user?

Is there a way to start the tests with no previous state, no sessions, etc? I can't find anything in the documentation for this.

Majoren
  • 983
  • 5
  • 16
  • 36

1 Answers1

0

Use setUp and tearDown to set/clear state before/after each test.

setUp(() async {
  // TODO
});

tearDown(() async {
  // TODO
});
user18309290
  • 5,777
  • 2
  • 4
  • 22