1

I'm using flutter to develop apps. Now stuck on the test cases,

I referred flutter driver for testing and it is working fine for simple UIs and flows.

I want to go through the login part, and I have an OTP verification section there, how do I pass this screen because I have to enter the pin that will receive at the verification time.

When I tried to check the native functions like toast (I'm using one library: FlutterToast) it is not catching the UI change. I tried with text catch

await driver.waitFor(find.text('Invalid credentials.'));

referred links:

  1. https://blog.codemagic.io/integration-tests-codemagic/
  2. https://medium.com/ionicfirebaseapp/an-introduction-to-integration-testing-for-flutter-app-b7d2b2af1739
Afinas EM
  • 2,755
  • 1
  • 15
  • 28

2 Answers2

0

Do you solved this? Maybe try use another like toast widget if that widget can receive key.

0
await driver.requestData('Invalid credentials.');

Use this for detecting toast. This worked for me.