• Reusing Components and Methods in Quality Assurance

    Reusable Components

    Removing reusable components is now quite simple. Both types of tests use the same class - WidgetTester. Therefore, there are no problems in the quality assurance with the operation of selectors or generic functions. We take them out separately, for example, and do not know grief.

     

    In summary: we will reuse selectors (Finder class), functions, and gestures between Widget and E2E tests.

     

    class AuthScreen {

     // Screen for entering a pin code during authorization

     static Finder pinScreen = find.byKey(AuthTestKeys.pinScreen);

     

     // Set pin screen

     static Finder pinCreateScreen = find.byKey(AuthTestKeys.pinCreateScreen);

     

     // Pin-keyboard element when entering a pin-code during authorization

     static Finder pinNumberLogin(String number) =>

         find.descendant(of: pinScreen, matching: find.byKey(AuthTestKeys.pinKeyboardBtn(number)));

     

     // Login field on the login screen

     static Finder loginField = find.byKey(AuthTestKeys.loginField);

     

    < . . . >

    }


    Tags Tags : , ,