Skip to content

Commit

Permalink
🍱 Refresh Screenshots
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Colman Lopes <[email protected]>
  • Loading branch information
LeoColman committed Jan 12, 2025
1 parent dae727a commit 1a7bab9
Show file tree
Hide file tree
Showing 124 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions app/refresh_screenshots.main.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env kotlin

@file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.1")
@file:DependsOn("io.ktor:ktor-server-core-jvm:3.0.3")
@file:DependsOn("io.ktor:ktor-server-netty-jvm:3.0.3")
@file:DependsOn("io.ktor:ktor-server-content-negotiation-jvm:3.0.3")
@file:DependsOn("io.ktor:ktor-serialization-kotlinx-json-jvm:3.0.3")
@file:DependsOn("io.ktor:ktor-server-host-common-jvm:3.0.3")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0")
@file:DependsOn("io.ktor:ktor-server-core-jvm:2.3.12")
@file:DependsOn("io.ktor:ktor-server-netty-jvm:2.3.12")
@file:DependsOn("io.ktor:ktor-server-content-negotiation-jvm:2.3.12")
@file:DependsOn("io.ktor:ktor-serialization-kotlinx-json-jvm:2.3.12")
@file:DependsOn("io.ktor:ktor-server-host-common-jvm:2.3.12")

import io.ktor.http.*
import io.ktor.http.content.*
Expand Down Expand Up @@ -38,7 +38,7 @@ fun disableAnimations() {

// Function to start the server
fun startServer(): NettyApplicationEngine {
return embeddedServer(Netty, port = 8080) {
return embeddedServer(Netty, port = 8081) {
install(ContentNegotiation) {
json()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import com.github.kittinunf.fuel.Fuel
import com.github.kittinunf.fuel.core.FileDataPart
import java.io.ByteArrayOutputStream
import java.io.File
import java.lang.Thread.sleep
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit
import java.util.Locale
Expand Down Expand Up @@ -157,7 +158,7 @@ class ScreenshotTakerTest : FunSpec({
onNodeWithTag("Days 60").performClick()
waitForIdle()
onNodeWithTag("StatisticsMainColumn").performTouchInput {
swipeUp(endY = bottom * 0.5f)
swipeUp(endY = bottom * 0.25f)
}
waitForIdle()

Expand Down Expand Up @@ -231,6 +232,7 @@ private fun MainActivity.setLocale(locale: Locale) {
}

private fun AndroidComposeUiTest<*>.takeScreenshot(file: String, lang: String, country: String) {
sleep(3000)
val bitmap = onRoot().captureToImage().asAndroidBitmap()
uploadScreenshot(bitmap, file, lang, country)
}
Expand All @@ -243,7 +245,7 @@ private fun uploadScreenshot(bitmap: Bitmap, fileName: String, lang: String, cou
val tempFile = File.createTempFile(fileName, null).also { it.writeBytes(byteArray) }

val computerIpAddress = "10.0.2.2"
Fuel.upload("http://$computerIpAddress:8080/upload?country=$country&lang=$lang")
Fuel.upload("http://$computerIpAddress:8081/upload?country=$country&lang=$lang")
.add(FileDataPart(tempFile, name = "file", filename = fileName))
.response()
}
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/de-DE/images/phoneScreenshots/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/fr-FR/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/pt-BR/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/tr-TR/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/1.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/2.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/3.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/4.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/5.png
Binary file modified fastlane/metadata/android/uk/images/phoneScreenshots/6.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit 1a7bab9

Please sign in to comment.