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

Show retry when submit for review fails #10289

Merged
merged 1 commit into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ class PostListItemUiStateHelper @Inject constructor(private val appPrefsWrapper:
buttonTypes.add(BUTTON_EDIT)
if (canShowPublishButton) {
buttonTypes.add(
if (!siteHasCapabilitiesToPublish) {
BUTTON_SUBMIT
} else if (canRetryUpload) {
if (canRetryUpload) {
BUTTON_RETRY
} else if (!siteHasCapabilitiesToPublish) {
BUTTON_SUBMIT
} else if (postStatus == SCHEDULED && isLocallyChanged) {
BUTTON_SYNC
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ class PostListItemUiStateHelperTest {
)

assertThat(state.actions[0].buttonType).isEqualTo(PostListButtonType.BUTTON_EDIT)
// TODO We probably want to show RETRY button in this scenario
assertThat(state.actions[1].buttonType).isEqualTo(PostListButtonType.BUTTON_SUBMIT)
assertThat(state.actions[1].buttonType).isEqualTo(PostListButtonType.BUTTON_RETRY)
assertThat(state.actions[2].buttonType).isEqualTo(PostListButtonType.BUTTON_TRASH)
assertThat(state.actions).hasSize(3)
}
Expand All @@ -182,8 +181,7 @@ class PostListItemUiStateHelperTest {
)

assertThat(state.actions[0].buttonType).isEqualTo(PostListButtonType.BUTTON_EDIT)
// TODO We probably want to show RETRY button in this scenario
assertThat(state.actions[1].buttonType).isEqualTo(PostListButtonType.BUTTON_SUBMIT)
assertThat(state.actions[1].buttonType).isEqualTo(PostListButtonType.BUTTON_RETRY)
assertThat(state.actions[2].buttonType).isEqualTo(PostListButtonType.BUTTON_DELETE)
assertThat(state.actions).hasSize(3)
}
Expand Down