Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Roborazzi Test for Markdown Playground #1064
Roborazzi Test for Markdown Playground #1064
Changes from 9 commits
4bc6b9e
8f49433
9d10d3d
45ac073
7217eeb
b75371f
0f9a04a
0a4b6e9
376c598
c3c167d
d54a281
09db2b7
8f9b8ea
60903cf
3099434
3a0b3a7
eabadf3
77a9e74
2869a46
3b9057b
50c1b3e
fff72b9
e1ebfee
f32861a
7ded42a
282ff2d
bda0d2e
2194c68
a9f4566
5699146
7a13dfd
b7b18ff
4bcd716
0e4bb3b
ab6ec98
2e046f4
3974141
6eba561
48d5397
815e184
79d4622
b0a3161
da67e7b
a1895aa
992b80d
5bc98ea
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added compose dependencies to the jvmTest. Before I added these dependencies, I had a
java.lang.NoClassDefFoundError
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this also be the correct compose desktop test dependency to add?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the sample in roborazzi use? Probably easiest to just match that to start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems here they don't have dependencies in
jvmTest
, but they have these in thecommonMain
dependencies:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the library itself, we should look at one of their samples. I was eyeing this: https://github.com/takahirom/roborazzi/blob/main/sample-compose-desktop-jvm/build.gradle.kts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment explaining why this is needed, and let's limit it to test JVM compilations.
Should be soooomething like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I need to register
compileJvmTestKotlin
task? It's not in the list of gradlew tasks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name might be slightly different, you'll want to find the task name for the task that compiles test jvm sources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jvmTestClasses is not a type of
KotlinCompile
as far as I know. Do you see this actually being configured there? I looked and I'm think what you want iscompileTestKotlinJvm
, but if it works without adding this opt-in at all then we can omit it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the task
compileTestKotlinJvm
while running./gradlew tasks --all
, so I committed it here: e1ebfee. Is this the task we are looking for? I think it didn't show up when just running./gradlew tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, in general you are gonna be better off not relying on
./gradlew tasks
vs just running a task you know will run it and adding--dry-run
to the end, which will just print all the tasks it's gonna run. You can also look at a build scan to see task types.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment here for now since testing on the function wrapped in a singleWindowApplication seemed to result in an infinite loop (where the test wouldn't end). I made a composable
AppContent()
function with the same content and added a test tag too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the comment, feels obvious in source why it's there :)