Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1536

Provide @StartActivity annotation put on test method to automatically start it or use @Location from Graphene to do so

    XMLWordPrintable

Details

    Description

      Instead of starting activity every time in test method manually, it would be nice to have this possibility:

      @Test
      @InSequence(4)
      @OperateOnDeployment("todo-mobile-app")
      public void loginUserInMobile(@ArquillianResource AndroidDevice device) {
              device.getActivityManagerProvider()
                  .getActivityManager()
                  .startActivity("org.jboss.aerogear.todo.activities.LoginActivity");
      
              loginMobileFragment.login("john", "123");
      }
      
      =========================
      
      @Test
      @InSequence(4)
      @OperateOnDeployment("todo-mobile-app")
      @StartActivity("org.jboss.aerogear.todo.activities.LoginActivity")
      public void loginUserInMobile() {
          loginMobileFragment.login("john", "123");
      }
      

      However, with the possibility to have Graphene page fragments, it would be teoretically possible to have propper page objects as well which mean that we could abstract activity into @Page and specify its @Location("activityName")

      The problem is, how this translates to Graphene since Droidium starts activities in this manner:

      driver.get("and-activity://" + activityName);

      There is the need to take that "and-activity" string into consideration with @Location annotation.

      Attachments

        Activity

          People

            smikloso Stefan Miklosovic (Inactive)
            smikloso Stefan Miklosovic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: