EG2 build error: Handling System Alerts with XCTestCase+GREYSystemAlertHandler.h methods
christianmierez opened this issue · 1 comments
christianmierez commented
How is EG2 currently handling system alerts? I am getting some build errors on the test target when trying to use the methods from XCTestCase+GREYSystemAlertHandler.h
:
XCTAssertTrue(grey_wait(forAlertVisibility: true, withTimeout: 2))
XCTAssertTrue(grey_acceptSystemDialogWithError(nil))
XCTAssertTrue(grey_wait(forAlertVisibility: false, withTimeout: 1))
Errors:
Cannot find 'grey_wait' in scope
Cannot find 'grey_acceptSystemDialogWithError' in scope
Cannot find 'grey_wait' in scope
Context: I'm doing black-box testing. I followed the cocoapods installation:
target App do
pod 'EarlGreyApp', :git => 'https://github.com/google/EarlGrey.git', :branch => 'earlgrey2'
end
target 'E2ETests' do
pod 'EarlGreyTest', :git => 'https://github.com/google/EarlGrey.git', :branch => 'earlgrey2'
end
BridgingHeader import: #import <EarlGreyTest/EarlGrey.h>
Lastly, I was not able to complete the App Component step as the AppFramework.framework
didn't show up in the list. Is this expected?
Can I be added to the slack channel? Email: christianmierez@gmail.com
Xcode 12.5
christianmierez commented
This was solved by moving those methods over an XCTestCase class.