-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4892 from vector-im/feature/bma/analytics_opt_in
Revert "Disable automatic opt-in screen display."
- v1.6.30
- v1.6.28
- v1.6.26
- v1.6.24
- v1.6.22
- v1.6.20
- v1.6.18
- v1.6.16
- v1.6.14
- v1.6.12
- v1.6.10
- v1.6.8
- v1.6.6
- v1.6.5
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.32
- v1.5.30
- v1.5.28
- v1.5.26
- v1.5.25
- v1.5.24
- v1.5.22
- v1.5.20
- v1.5.18
- v1.5.16
- v1.5.14
- v1.5.13
- v1.5.12
- v1.5.11
- v1.5.10
- v1.5.8
- v1.5.7
- v1.5.6
- v1.5.4
- v1.5.2
- v1.5.1
- v1.5.0
- v1.4.36
- v1.4.34
- v1.4.32
- v1.4.31
- v1.4.30
- v1.4.28
- v1.4.27
- v1.4.27-RC2
- v1.4.26
- v1.4.25
- v1.4.24
- v1.4.22
- v1.4.20
- v1.4.19
- v1.4.18
- v1.4.16
- v1.4.14
- v1.4.13
- v1.4.12
- v1.4.11
- v1.4.10
- v1.4.8
- v1.4.7
- v1.4.6
- v1.4.4
- v1.4.2
- v1.4.0
- v1.3.18
- v1.3.17
- v1.3.16
- v1.3.15
- v1.3.14
- v1.3.13
Showing
6 changed files
with
60 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Display Analytics opt-in screen at first start-up of the app |
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
48 changes: 48 additions & 0 deletions
48
vector/src/androidTest/java/im/vector/app/ui/robot/AnalyticsRobot.kt
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) 2022 New Vector Ltd | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package im.vector.app.ui.robot | ||
|
||
import androidx.test.espresso.matcher.ViewMatchers.withId | ||
import com.adevinta.android.barista.assertion.BaristaVisibilityAssertions.assertDisplayed | ||
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn | ||
import im.vector.app.R | ||
import im.vector.app.espresso.tools.waitUntilActivityVisible | ||
import im.vector.app.espresso.tools.waitUntilViewVisible | ||
import im.vector.app.features.analytics.ui.consent.AnalyticsOptInActivity | ||
|
||
class AnalyticsRobot { | ||
|
||
fun optIn() { | ||
answerOptIn(true) | ||
} | ||
|
||
fun optOut() { | ||
answerOptIn(false) | ||
} | ||
|
||
private fun answerOptIn(optIn: Boolean) { | ||
waitUntilActivityVisible<AnalyticsOptInActivity> { | ||
waitUntilViewVisible(withId(R.id.title)) | ||
} | ||
assertDisplayed(R.id.title, R.string.analytics_opt_in_title) | ||
if (optIn) { | ||
clickOn(R.id.submit) | ||
} else { | ||
clickOn(R.id.later) | ||
} | ||
} | ||
} |
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
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
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