Skip to content
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

fixed allscreens sanity test for enabled app layout flag #7020

Merged
merged 4 commits into from
Sep 7, 2022

Conversation

fedrunov
Copy link
Contributor

@fedrunov fedrunov commented Sep 5, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

updates all screens ui test for new app layout

Motivation and context

closes #7019

@fedrunov fedrunov requested a review from bmarty September 5, 2022 22:03
@fedrunov fedrunov marked this pull request as ready for review September 5, 2022 22:03
@@ -9,6 +9,7 @@
android:id="@+id/groupListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="195dp"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when animation are disabled (for ui tests) for some reason dialog is not properly measure in 50% chances. This min height is the sum of height of 3 items in list and this is minimal amount of items to be shown for non-empty staye (all chat, 1 space, create space)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange. Thanks for explaining.

@@ -101,11 +101,11 @@ class UiAllScreensSanityTest {

val spaceName = UUID.randomUUID().toString()
elementRobot.space {
createSpace {
createSpace(true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Could add named parameter to make it clearer

@fedrunov fedrunov added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Sep 6, 2022
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, some minor remarks and suggestions.

@@ -84,33 +84,56 @@ class ElementRobot {
}

fun settings(shouldGoBack: Boolean = true, block: SettingsRobot.() -> Unit) {
openDrawer()
clickOn(R.id.homeDrawerHeaderSettingsView)
if (features.isNewAppLayoutEnabled()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for supporting both mode.


class NewRoomRobot(
var createdRoom: Boolean = false
) {

var features: VectorFeatures = DefaultVectorFeatures()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()

import im.vector.app.features.roomdirectory.RoomDirectoryActivity

class RoomListRobot {

var features: VectorFeatures = DefaultVectorFeatures()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()

waitUntilDialogVisible(withId(R.id.inviteByMxidButton))
waitUntilActivityVisible<RoomDetailActivity> {
waitUntilDialogVisible(withId(R.id.inviteByMxidButton))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to double check, is it OK that the change is not under features.isNewAppLayoutEnabled() condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, no matter of flag enabled/disabled that was failing for me locally without this change

fun createSpace(block: SpaceCreateRobot.() -> Unit) {
openDrawer()
clickOn(R.string.create_space)
var features: VectorFeatures = DefaultVectorFeatures()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var features: VectorFeatures = DefaultVectorFeatures()
private val features: VectorFeatures = DefaultVectorFeatures()

@@ -9,6 +9,7 @@
android:id="@+id/groupListView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="195dp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange. Thanks for explaining.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bmarty
Copy link
Member

bmarty commented Sep 7, 2022

Fail test will be handled later, we need to merge this PR.

@bmarty bmarty disabled auto-merge September 7, 2022 11:57
@bmarty bmarty merged commit bdfbbbb into develop Sep 7, 2022
@bmarty bmarty deleted the feature/nfe/app_layout_all_screens_test branch September 7, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppLayout: UiAllScreensSanityTest
3 participants