Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b829468 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

Merge branch '1449-Fix_failed_tests' into 'main'

1449-Fix_failed_tests

See merge request !148
parents 3c0c9d2b c62fbfaf
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -13,10 +13,15 @@ cache:
  paths:
  - .gradle/

test:
  stage: build
  script:
    - ./gradlew test

build:
  stage: build
  script:
  - ./gradlew :app:k9mail:build -x test
  - ./gradlew :app:k9mail:build
  artifacts:
    paths:
    - app/k9mail/build/outputs/apk/
+6 −2
Original line number Diff line number Diff line
@@ -1435,7 +1435,7 @@ public class MessagingController {
                    showSendingNotificationIfNecessary(account);

                    try {
                        sendPendingMessagesSynchronous(account);
                        sendPendingMessagesSynchronous(account, true);
                    } finally {
                        clearSendingNotificationIfNecessary(account);
                    }
@@ -1472,6 +1472,10 @@ public class MessagingController {
     */
    @VisibleForTesting
    protected void sendPendingMessagesSynchronous(final Account account) {
        sendPendingMessagesSynchronous(account, false);
    }

    private void sendPendingMessagesSynchronous(final Account account, boolean okToMakeSound) {
        Exception lastFailure = null;
        try {
            if (isAuthenticationProblem(account, false)) {
@@ -1552,7 +1556,7 @@ public class MessagingController {
                        Timber.i("Sending message with UID %s", message.getUid());
                        backend.sendMessage(message);

                        if (K9.isSentSoundEnabled()) {
                        if (okToMakeSound && K9.isSentSoundEnabled()) {
                            MessageSentAudio.play(context);
                        }

+0 −9
Original line number Diff line number Diff line
@@ -28,15 +28,6 @@ class DisplayHtmlTest {
        assertHtmlContainsElement(html, "head > style")
    }

    @Test
    fun wrapMessageContent_whenDarkMessageViewTheme_addsDarkThemeCSS() {
        val darkModeDisplayHtml = DisplayHtml(HtmlSettings(useDarkMode = true, useFixedWidthFont = false))

        val html = darkModeDisplayHtml.wrapMessageContent("Some text")

        assertHtmlContainsElement(html, "head > style", 2)
    }

    @Test
    fun wrapMessageContent_putsMessageContentInBody() {
        val content = "Some text"
+0 −1
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@ import android.view.ContextThemeWrapper
import androidx.lifecycle.LifecycleOwner
import androidx.work.WorkerParameters
import com.fsck.k9.job.MailSyncWorker
import com.fsck.k9.ui.R
import com.fsck.k9.ui.changelog.ChangeLogMode
import com.fsck.k9.ui.changelog.ChangelogViewModel
import com.fsck.k9.ui.endtoend.AutocryptKeyTransferActivity
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ dependencies {
    implementation(libs.androidx.biometric)
    implementation(libs.timber)
    implementation(libs.kotlinx.coroutines.core)
    implementation(libs.elib)
}

android {
Loading