Closed Bug 2041804 Opened 3 months ago Closed 3 months ago

Update download deletion tests for new "Ask when deleting" default dialog

Categories

(Firefox for Android :: UI Tests, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: aaronmt, Assigned: aaronmt)

References

Details

Attachments

(1 file)

Update deleteDownloadedFileTest and deleteMultipleDownloadedFilesTest to handle the new DeleteConfirmationDialog that now appears before the Undo snackbar, following the change in bug 2041355 that made "Ask when I delete files" the default download deletion behaviour.

New helper e.g,


    fun confirmDeleteDownloadDialogIfDisplayed() {
        val nodes = this@DownloadRobot.composeTestRule
            .onAllNodesWithTag(DownloadsScreenTestTag.DELETE_DIALOG_CONFIRM_BUTTON)
            .fetchSemanticsNodes()
        if (nodes.isNotEmpty()) {
            Log.i(TAG, "confirmDeleteDownloadDialogIfDisplayed: Dialog present, clicking \"Confirm\"")
            this@DownloadRobot.composeTestRule
                .onNodeWithTag(DownloadsScreenTestTag.DELETE_DIALOG_CONFIRM_BUTTON)
                .performClick()
        } else {
            Log.i(TAG, "confirmDeleteDownloadDialogIfDisplayed: No dialog present, skipping")
        }
    }
Assignee: nobody → aaron.train
Attachment #9589049 - Attachment description: WIP: Bug 2041804 - Update download deletion UI tests for new "Ask when deleting" dialog → Bug 2041804 - Update download deletion UI tests for new "Ask when deleting" dialog
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: