google / google/EarlGrey

EarlGrey 2.0 | Expose GREY_REMOTE_CLASS_IN_APP to the swift tests

Open
#767 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
5.7k
Forks
737
Avg merge
1d 20h
Merged PRs (30d)
5

Description

My use case: I'd like to know the main view currently shown to the user (ie. viewcontroller). This is useful, as the app I'm working with has an OOBE flow that only shows up the first time. I want to know if the app is in this first run experience.

After consulting with @tirodkar , his recommendation is to expose the GREY_REMOTE_CLASS_IN_APP (method?) to the Swift tests.

Here's an analogous line of ObjC he provided:
[[[[GREY_REMOTE_CLASS_IN_APP(UIApplication) sharedApplication] keyWindow] rootViewController] class]

Contributor guide

Open the contributing guide

Research direction

Start by locating GREY_REMOTE_CLASS_IN_APP and the Swift test integration. Compare the available Swift-facing access with the analogous Objective-C expression using UIApplication, keyWindow, and rootViewController. Done means Swift tests can use the exposed functionality to identify the currently shown view controller.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c, swift
Domain
mobile-dev, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.