-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UIKit screenshot tests for layout's Spacer
This adds the start of a new setup for hosting Kotlin tests within an iOS project so that we can use a Swift screenshot testing library. For now you have to prefix your test functions with "test" and any before/after-annotated functions need to be named "setUp" and "tearDown" (very JUnit 3). We also do not support anything JVM-specific like rules or parameterization for now.
- Loading branch information
1 parent
cda5a95
commit 3d4411e
Showing
24 changed files
with
667 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
apply plugin: 'org.jetbrains.kotlin.jvm' | ||
import app.cash.redwood.buildsupport.KmpTargets | ||
|
||
dependencies { | ||
api projects.redwoodLayoutApi | ||
api projects.redwoodLayoutModifiers | ||
api projects.redwoodLayoutWidget | ||
api projects.redwoodRuntime | ||
api projects.redwoodWidget | ||
api projects.redwoodYoga | ||
api libs.junit | ||
api libs.testParameterInjector | ||
apply plugin: 'org.jetbrains.kotlin.multiplatform' | ||
|
||
kotlin { | ||
KmpTargets.addAllTargets(project) | ||
|
||
sourceSets { | ||
commonMain { | ||
dependencies { | ||
api projects.redwoodLayoutApi | ||
api projects.redwoodLayoutModifiers | ||
api projects.redwoodLayoutWidget | ||
api projects.redwoodRuntime | ||
api projects.redwoodWidget | ||
api projects.redwoodYoga | ||
api libs.kotlin.test | ||
} | ||
} | ||
jvmMain { | ||
dependencies { | ||
// The kotlin.test library provides JVM variants for multiple testing frameworks. When used | ||
// as a test dependency this selection is transparent. But since we are publishing a library | ||
// we need to select one ourselves at compilation time. | ||
api libs.kotlin.test.junit | ||
api libs.testParameterInjector | ||
} | ||
} | ||
} | ||
} |
This file contains 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
File renamed without changes.
Oops, something went wrong.