Questions tagged [fbsnapshottestcase]

Automated test case framework that compares a UIView or CALayer to a screenshot, and fails the test if the two images don't match. Used on iOS.

9 questions
3
votes
1 answer

Tests pass in Xcode but fail on Circle CI

Question: For this pull request, the tests do not pass on CircleCI but the tests pass locally. Why? The CircleCI test output shows failures for all FBSnapshotTestCase tests. For example: ✗ testAdjustsFontSizeToFitWidth, ((comparisonSuccess__) is…
Aaron Brager
  • 65,323
  • 19
  • 161
  • 287
2
votes
1 answer

How would I write a test to make sure the UIbutton "Show all Providers" turns up when there's more than 12 or more items in the table view?

So I'm completely new to testing and I just needed some help figuring out for example how I would write a test for each of the three cases in the enum of the View Model (none, dontSeeProvider, showAllProviders). enum ProvidersButtonType { case…
2
votes
1 answer

UICollectionView performBatchUpdates completion not called while off screen

I'm using snapshot testing for my view controller. This is how the view controller is initialized in tests: window.addSubview(viewController.view) // simulate the view is visible (probably unnecessary) viewController.view.frame = self.snapshotFrame…
VojtaStavik
  • 2,312
  • 1
  • 18
  • 30
1
vote
1 answer

Xcode: Which device is simulator running? Comparing views across devices with FBSnapshotTestCase and Nimble-Snapshot

I am currently using FBSnapshotTestCase and Nimble-Snapshot to take snapshots of ViewControllers in my project. I know in the Realm UI and Snapshot Testing Video Luis mentioned that we can test views across devices (iPhone5 vs iPhone 6+ etc). I want…
0
votes
1 answer

FBSnapshotTestCase does not create the FB_REFERENCE_IMAGE_DIR and IMAGE_DIFF_DIR folders

this is my test : class ZabiTests: FBSnapshotTestCase { var vc:UIViewController? override func setUpWithError() throws { super.setUp() vc = ViewController() recordMode = true } override func tearDownWithError() throws { // Put…
Alon Mel
  • 73
  • 7
0
votes
1 answer

FBSnapshotTestcase vs xcuiscreenshot

I am trying to understand the use case FBSnapshotTestcase solves. We already have native apple lib named xcuiscreenshot. Whenever any UITest fails, it automatically takes screenshot of the view for reference. FBSnapshotTestcase compares with the…
0
votes
2 answers

XCUITest Element Snapshot Fails Blinking Cursor

We are using FBSnapshottestcase to take snapshots as part of our XCUITest cases. We have a ScrollView that has an UITextField. We type text into the text field and take a snapshot to verify the element behaves appropriately with text entered (a…
reutsey
  • 1,743
  • 1
  • 17
  • 36
0
votes
1 answer

FBSnapshotTestCase image not found while running Xcode test

Can't figure out why report FBSnapshotTestCase image not found while running Xcode test. I tried to link FBSnapshotTestCase in Target ChartTests, but still seeing the same error. I am not familiar with this, can anyone help? Thank in advance. To…
Wingzero
  • 9,644
  • 10
  • 39
  • 80
0
votes
1 answer

How to check if I am running on iPhone6s Plus simulator

I have snapshot tests which are per device. I want to check in my tests that I am running on a particular simulator that has a snapshot for it. So for example I want to test that current simulator is iPhone6sPlus9.2 since the snapshot wasn't…
Avba
  • 14,822
  • 20
  • 92
  • 192