Skip to content

Commit 3566774

Browse files
authored
Merge pull request #1056 from Catrobat/release-v2.8.1
Release v2.8.1
2 parents ca8ba23 + ace4926 commit 3566774

File tree

6 files changed

+48
-17
lines changed

6 files changed

+48
-17
lines changed

Jenkinsfile.screenshots

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pipeline {
6464
}
6565
}
6666

67-
stage('Take sreenshots') {
67+
stage('Take screenshots') {
6868
steps {
6969
sh "fastlane screengrab"
7070
}
@@ -90,7 +90,7 @@ pipeline {
9090
}
9191
}
9292

93-
stage('Upload sreenshots to googlePlay') {
93+
stage('Upload screenshots to Google Play') {
9494
when {
9595
allOf {
9696
environment name: 'UPLOAD_SCREENSHOTS', value: 'true'

Paintroid/src/androidTest/java/org/catrobat/paintroid/test/espresso/tools/WatercolorToolIntegrationTest.kt

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Paintroid: An image manipulation application for Android.
3-
* Copyright (C) 2010-2021 The Catrobat Team
3+
* Copyright (C) 2010-2022 The Catrobat Team
44
* (<http://developer.catrobat.org/credits>)
55
*
66
* This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,7 @@ package org.catrobat.paintroid.test.espresso.tools
2020

2121
import android.graphics.Color
2222
import androidx.test.espresso.Espresso.onView
23+
import androidx.test.espresso.Espresso.pressBack
2324
import androidx.test.espresso.action.ViewActions.click
2425
import androidx.test.espresso.action.ViewActions.scrollTo
2526
import androidx.test.espresso.assertion.ViewAssertions.matches
@@ -58,12 +59,39 @@ class WatercolorToolIntegrationTest {
5859
ToolBarViewInteraction.onToolBarView().performSelectTool(ToolType.WATERCOLOR)
5960
}
6061

62+
@Test
63+
fun testSwitchingBackToBrushOnBackPressed() {
64+
DrawingSurfaceInteraction.onDrawingSurfaceView()
65+
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))
66+
67+
assertTrue(
68+
"Paint has maskFilter",
69+
launchActivityRule.activity.toolPaint.paint.maskFilter != null
70+
)
71+
72+
pressBack()
73+
74+
BottomNavigationViewInteraction.onBottomNavigationView()
75+
.checkShowsCurrentTool(ToolType.BRUSH)
76+
77+
DrawingSurfaceInteraction.onDrawingSurfaceView()
78+
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))
79+
80+
assertTrue(
81+
"Paint maskFilter has been reset",
82+
launchActivityRule.activity.toolPaint.paint.maskFilter == null
83+
)
84+
}
85+
6186
@Test
6287
fun testSwitchingBetweenBrushAndWatercolorAndEraserAndLookForMaskFilter() {
6388
DrawingSurfaceInteraction.onDrawingSurfaceView()
6489
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))
6590

66-
assertTrue("Paint has no maskfilter", launchActivityRule.activity.toolPaint.paint.maskFilter != null)
91+
assertTrue(
92+
"Paint has no maskFilter",
93+
launchActivityRule.activity.toolPaint.paint.maskFilter != null
94+
)
6795

6896
ToolBarViewInteraction.onToolBarView()
6997
.performSelectTool(ToolType.ERASER)
@@ -89,7 +117,10 @@ class WatercolorToolIntegrationTest {
89117
DrawingSurfaceInteraction.onDrawingSurfaceView()
90118
.perform(UiInteractions.touchAt(DrawingSurfaceLocationProvider.MIDDLE))
91119

92-
assertTrue("Paint still has maskfilter", launchActivityRule.activity.toolPaint.paint.maskFilter == null)
120+
assertTrue(
121+
"Paint still has maskFilter",
122+
launchActivityRule.activity.toolPaint.paint.maskFilter == null
123+
)
93124
}
94125

95126
@Test

Paintroid/src/main/java/org/catrobat/paintroid/presenter/MainActivityPresenter.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Paintroid: An image manipulation application for Android.
3-
* Copyright (C) 2010-2021 The Catrobat Team
3+
* Copyright (C) 2010-2022 The Catrobat Team
44
* (<http://developer.catrobat.org/credits>)
55
*
66
* This program is free software: you can redistribute it and/or modify
@@ -509,8 +509,7 @@ open class MainActivityPresenter(
509509
} else if (model.isFullscreen) {
510510
exitFullscreenClicked()
511511
} else if (!toolController.isDefaultTool) {
512-
setTool(ToolType.BRUSH)
513-
toolController.switchTool(ToolType.BRUSH, true)
512+
switchTool(ToolType.BRUSH, true)
514513
} else {
515514
showSecurityQuestionBeforeExit()
516515
}
@@ -691,9 +690,10 @@ open class MainActivityPresenter(
691690
}
692691
}
693692

694-
private fun switchTool(type: ToolType) {
693+
private fun switchTool(type: ToolType, backPressed: Boolean = false) {
694+
navigator.setMaskFilterToNull()
695695
setTool(type)
696-
toolController.switchTool(type, false)
696+
toolController.switchTool(type, backPressed)
697697
if (type === ToolType.IMPORTPNG) {
698698
showImportDialog()
699699
}

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ ext {
4848

4949
androidSupportLibraryVersion = '28.0.0'
5050

51-
androidVersionCode = 43
52-
androidVersionName = '2.8.0'
51+
androidVersionCode = 44
52+
androidVersionName = '2.8.1'
5353
}
5454

5555
if(project.hasProperty("snapshot")) {

colorpicker/src/main/res/values-pl-rPL/strings.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
<resources xmlns:tools="http://schemas.android.com/tools">
2121
<string name="color_picker_title">Wybór kolorów</string>
2222
<string name="color_picker_tab_icon">Ikona zakładki Wyboru kolorów</string>
23-
<string name="color_red">Czerwony (Red)</string>
24-
<string name="color_green">Zielony (Green)</string>
25-
<string name="color_blue">Niebieski (Blue)</string>
26-
<string name="color_alpha">Przezroczyste</string>
23+
<string name="color_red">Czerwony</string>
24+
<string name="color_green">Zielony</string>
25+
<string name="color_blue">Niebieski</string>
26+
<string name="color_alpha">Przezroczystość</string>
2727
<string name="color_hex">HEX</string>
2828
<string name="color_picker_apply">Zastosuj</string>
2929
<string name="color_picker_cancel">Anuluj</string>

fastlane/Screengrabfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ test_instrumentation_runner 'androidx.test.runner.AndroidJUnitRunner'
1111

1212
ending_locale 'de-rDE'
1313
# supported languages: https://www.ibabbleon.com/Google-Play-Store-Language-Codes.html
14-
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'])
14+
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'])
1515

1616
clear_previous_screenshots(true)

0 commit comments

Comments
 (0)