Command | Description |
---|---|
ios cookies get | Show app's cookies |
ios keychain dump | Show app's keychain |
ios nsurlcredentialstorage dump | Show nsurlcredentialstorage data |
ios ui dump | Show current app's screen hierarchy |
ios bundles list_frameworks | Show app's frameworks list |
ios plist cat | Show content of chosen plist file |
sqlite connect | Show content of chosen DB file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sample | |
on: [pull_request] | |
jobs: | |
sample: | |
name: Tests | |
runs-on: [macos-latest] | |
steps: | |
- uses: actions/checkout@v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
impact_map = JSON.parse(File.read('impact_map.json')) | |
response = JSON.parse(`curl -s -H "authorization: Bearer #{ENV['GITHUB_TOKEN']}" -X GET -G #{ENV['PULL_REQUEST']}/files`) | |
impacted_files = response.map { |file| file['filename'] } | |
impact_map.select! do |test, related_source_files| | |
related_source_files.any? { |file| impacted_files.include?(file) } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"SampleSuite/SampleClass/testMethod_1": [ | |
"path/to/a.swift", | |
"path/to/b.swift", | |
"path/to/c.swift" | |
], | |
"SampleSuite/SampleClass/testMethod_2": [ | |
"path/to/c.swift", | |
"path/to/d.swift", | |
"path/to/e.swift" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sample | |
on: [pull_request] | |
jobs: | |
first_project: | |
name: FirstProjectTests | |
runs-on: [macos-latest] | |
steps: | |
- uses: actions/checkout@v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
required_keys = ENV['TRIGGER'].split(',').map { |key| key.strip } | |
ignored_keys = ENV['IGNORE'].nil? ? [] : ENV['IGNORE'].split(',').map { |key| key.strip } | |
response = JSON.parse(`curl -s -H "authorization: Bearer #{ENV['GITHUB_TOKEN']}" -X GET -G #{ENV['PULL_REQUEST']}/files`) | |
impacted_files = response.map { |file| file['filename'] } | |
impacted_files.select! do |path| | |
required_keys.any? do |required_key| | |
should_key_be_considered = ignored_keys.none? { |key| path.include?(key) } | |
should_key_be_considered && path.include?(required_key) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun whenViewWillAppear() { | |
val viewMatcher = ViewMatchers.withId(R.id.sample_view_id) | |
Espresso.onView(viewMatcher) | |
.waitForAppear() | |
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | |
} | |
@Test | |
fun whenViewWillDisappear() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun ViewInteraction.isDisplayed(): Boolean { | |
try { | |
this.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | |
} catch (ignored: NoMatchingViewException) { | |
return false | |
} | |
return true | |
} | |
fun ViewInteraction.doesNotExist(): Boolean { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun sample() { | |
recyclerViewCounter(R.id.recyclerViewId) { | |
val fab = withId(R.id.fab) | |
val firstFabPosition = getFirstMatchingPosition(fab) | |
onView(getView(firstFabPosition)).perform(click()) | |
val lastFabPosition = getLastMatchingPosition(fab) | |
onView(getView(lastFabPosition)).perform(click()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun sample() { | |
val fab = withId(R.id.fab) | |
onView(ViewCounter.first(fab)).perform(click()) | |
onView(ViewCounter.last(fab)).perform(click()) | |
onView(isRoot()).check(matches(ViewCounter.withViewCount(fab, 3)) | |
} |
NewerOlder