Skip to content

Commit

Permalink
test(association-manager): add a bit of time to the CI to find instagram
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelien9Code committed Dec 20, 2024
1 parent 3f7b2f0 commit 322d9a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.ui.test.assertIsNotDisplayed
import androidx.compose.ui.test.assertTextContains
import androidx.compose.ui.test.assertTextEquals
import androidx.compose.ui.test.hasText
import androidx.compose.ui.test.isDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
Expand Down Expand Up @@ -199,10 +200,16 @@ class AccountDetailsTest : TearDown() {
.onNodeWithTag(SocialsOverlayTestTags.SAVE_BUTTON)
.performScrollTo()
.performClick()
Thread.sleep(20000)
composeTestRule
.onNodeWithTag(AccountDetailsTestTags.SOCIALS_CHIP + "Facebook")
.performScrollTo()
.assertIsDisplayed()
composeTestRule.waitUntil(10000) {
composeTestRule
.onNodeWithTag(AccountDetailsTestTags.SOCIALS_CHIP + "Instagram", useUnmergedTree = true)
.isDisplayed()
}
composeTestRule
.onNodeWithTag(AccountDetailsTestTags.SOCIALS_CHIP + "Instagram", true)
.performScrollTo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ constructor(
_selectedAssociation.value = updatedAssociation
}

_associationsByCategory.value = _associations.value.groupBy { it.category }
_associationsByCategory.value = _associations.value.groupBy { it.category }
} else {
Log.e("AssociationViewModel", "Association with ID $associationId not found.")
}
Expand Down Expand Up @@ -134,7 +134,7 @@ constructor(
_selectedAssociation.value = updatedAssociation
}

_associationsByCategory.value = _associations.value.groupBy { it.category }
_associationsByCategory.value = _associations.value.groupBy { it.category }
} else {
Log.e("AssociationViewModel", "Association with ID $associationId not found.")
}
Expand Down Expand Up @@ -169,7 +169,7 @@ constructor(
_selectedAssociation.value = updatedAssociation
}

_associationsByCategory.value = _associations.value.groupBy { it.category }
_associationsByCategory.value = _associations.value.groupBy { it.category }
} else {
Log.e("AssociationViewModel", "Association with ID $associationId not found.")
}
Expand Down Expand Up @@ -392,8 +392,6 @@ constructor(
}
}



/**
* Removes the specified role from the selected association. If the role does not exist, an error
* is triggered. After removing the role, the association is saved and the local state is updated.
Expand Down

0 comments on commit 322d9a9

Please sign in to comment.