Skip to content

Commit

Permalink
Merge pull request #1056 from Catrobat/release-v2.8.1
Browse files Browse the repository at this point in the history
Release v2.8.1
  • Loading branch information
wslany authored Mar 20, 2022
2 parents ca8ba23 + ace4926 commit 3566774
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile.screenshots
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pipeline {
}
}

stage('Take sreenshots') {
stage('Take screenshots') {
steps {
sh "fastlane screengrab"
}
Expand All @@ -90,7 +90,7 @@ pipeline {
}
}

stage('Upload sreenshots to googlePlay') {
stage('Upload screenshots to Google Play') {
when {
allOf {
environment name: 'UPLOAD_SCREENSHOTS', value: 'true'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Paintroid: An image manipulation application for Android.
* Copyright (C) 2010-2021 The Catrobat Team
* Copyright (C) 2010-2022 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand All @@ -20,6 +20,7 @@ package org.catrobat.paintroid.test.espresso.tools

import android.graphics.Color
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.Espresso.pressBack
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.scrollTo
import androidx.test.espresso.assertion.ViewAssertions.matches
Expand Down Expand Up @@ -58,12 +59,39 @@ class WatercolorToolIntegrationTest {
ToolBarViewInteraction.onToolBarView().performSelectTool(ToolType.WATERCOLOR)
}

@Test
fun testSwitchingBackToBrushOnBackPressed() {
DrawingSurfaceInteraction.onDrawingSurfaceView()
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))

assertTrue(
"Paint has maskFilter",
launchActivityRule.activity.toolPaint.paint.maskFilter != null
)

pressBack()

BottomNavigationViewInteraction.onBottomNavigationView()
.checkShowsCurrentTool(ToolType.BRUSH)

DrawingSurfaceInteraction.onDrawingSurfaceView()
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))

assertTrue(
"Paint maskFilter has been reset",
launchActivityRule.activity.toolPaint.paint.maskFilter == null
)
}

@Test
fun testSwitchingBetweenBrushAndWatercolorAndEraserAndLookForMaskFilter() {
DrawingSurfaceInteraction.onDrawingSurfaceView()
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))

assertTrue("Paint has no maskfilter", launchActivityRule.activity.toolPaint.paint.maskFilter != null)
assertTrue(
"Paint has no maskFilter",
launchActivityRule.activity.toolPaint.paint.maskFilter != null
)

ToolBarViewInteraction.onToolBarView()
.performSelectTool(ToolType.ERASER)
Expand All @@ -89,7 +117,10 @@ class WatercolorToolIntegrationTest {
DrawingSurfaceInteraction.onDrawingSurfaceView()
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))

assertTrue("Paint still has maskfilter", launchActivityRule.activity.toolPaint.paint.maskFilter == null)
assertTrue(
"Paint still has maskFilter",
launchActivityRule.activity.toolPaint.paint.maskFilter == null
)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Paintroid: An image manipulation application for Android.
* Copyright (C) 2010-2021 The Catrobat Team
* Copyright (C) 2010-2022 The Catrobat Team
* (<http://developer.catrobat.org/credits>)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -509,8 +509,7 @@ open class MainActivityPresenter(
} else if (model.isFullscreen) {
exitFullscreenClicked()
} else if (!toolController.isDefaultTool) {
setTool(ToolType.BRUSH)
toolController.switchTool(ToolType.BRUSH, true)
switchTool(ToolType.BRUSH, true)
} else {
showSecurityQuestionBeforeExit()
}
Expand Down Expand Up @@ -691,9 +690,10 @@ open class MainActivityPresenter(
}
}

private fun switchTool(type: ToolType) {
private fun switchTool(type: ToolType, backPressed: Boolean = false) {
navigator.setMaskFilterToNull()
setTool(type)
toolController.switchTool(type, false)
toolController.switchTool(type, backPressed)
if (type === ToolType.IMPORTPNG) {
showImportDialog()
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ext {

androidSupportLibraryVersion = '28.0.0'

androidVersionCode = 43
androidVersionName = '2.8.0'
androidVersionCode = 44
androidVersionName = '2.8.1'
}

if(project.hasProperty("snapshot")) {
Expand Down
8 changes: 4 additions & 4 deletions colorpicker/src/main/res/values-pl-rPL/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="color_picker_title">Wybór kolorów</string>
<string name="color_picker_tab_icon">Ikona zakładki Wyboru kolorów</string>
<string name="color_red">Czerwony (Red)</string>
<string name="color_green">Zielony (Green)</string>
<string name="color_blue">Niebieski (Blue)</string>
<string name="color_alpha">Przezroczyste</string>
<string name="color_red">Czerwony</string>
<string name="color_green">Zielony</string>
<string name="color_blue">Niebieski</string>
<string name="color_alpha">Przezroczystość</string>
<string name="color_hex">HEX</string>
<string name="color_picker_apply">Zastosuj</string>
<string name="color_picker_cancel">Anuluj</string>
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Screengrabfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ test_instrumentation_runner 'androidx.test.runner.AndroidJUnitRunner'

ending_locale 'de-rDE'
# supported languages: https://www.ibabbleon.com/Google-Play-Store-Language-Codes.html
locales(['ar','en-US','es-US','es-ES','fr-FR','de-DE','zh-CN','zh-TW','hi-IN','hu-HU','it-IT','ja-JP','ko-KR','nl-NL','pl-PL','pt-BR','ru-RU','sr-SP','tr-TR','da-DK'])
locales(['ar','zh-CN','zh-TW','en-US','en-GB','en-CA','en-AU','es-ES','fr-FR','de-DE','hi-IN','hu-HU','it-IT','ja-JP','ko-KR','nl-NL','pl-PL','pt-BR','ru-RU','tr-TR','id'])

clear_previous_screenshots(true)

0 comments on commit 3566774

Please sign in to comment.