Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test ViewController embedded in NavigationController on iPhone X #6

Open
sergdort opened this issue Apr 24, 2018 · 1 comment
Open
Labels

Comments

@sergdort
Copy link

Hi, guys!

Description

It seems like testing view controller embedded into navigation controller does not simulate actual environment, or may be I'm doing something wrong

Can be reproduced with example tests

func testExample() {
        let vc = ViewController()
        vc.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.add, target: nil, action: nil)
        vc.title = "Title"
        let nc = UINavigationController(rootViewController: vc)

        verify(nc, for: Device.iPhoneX.portrait)
}

Snapshots

As you can see from the snapshot diff navigation bar is under the notch

diff_testexample_iphone_x_portrait_ios_11 2 3x

@balavor balavor added the bug label Apr 25, 2018
@balavor
Copy link
Collaborator

balavor commented Apr 25, 2018

@sergdort hi. Thanks for your issue. I've tried this code and yeah, for some reason it doesn't cover navigation bar.
We're still looking for ways to make it work better and have plans to write our own core because right now we depend on Facebooks library, that is blocking us from doing more features. In case you have any ideas, feel free to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants