diff --git a/Forji/Forji/Views/MergedNotificationsOverviewView.swift b/Forji/Forji/Views/MergedNotificationsOverviewView.swift index 64476c2..398a4b3 100644 --- a/Forji/Forji/Views/MergedNotificationsOverviewView.swift +++ b/Forji/Forji/Views/MergedNotificationsOverviewView.swift @@ -66,14 +66,6 @@ struct MergedNotificationsOverviewView: View { .tint(.blue) } } - .swipeActions(edge: .trailing, allowsFullSwipe: true) { - Button { - Task { await dismissNotification(tagged) } - } label: { - Label("Dismiss", systemImage: "xmark") - } - .tint(.gray) - } } if pagination.hasMore { @@ -192,10 +184,6 @@ struct MergedNotificationsOverviewView: View { await setNotificationRead(tagged) } - private func dismissNotification(_ tagged: TaggedItem) async { - await setNotificationRead(tagged) - } - /// Marks a notification read when the user opens it, mirroring Mail and News. /// The row is updated in place rather than removed so navigation into the /// detail view is not interrupted while the list is mutating. diff --git a/Forji/Forji/Views/NotificationsOverviewView.swift b/Forji/Forji/Views/NotificationsOverviewView.swift index ae4c3f6..7a4e9ec 100644 --- a/Forji/Forji/Views/NotificationsOverviewView.swift +++ b/Forji/Forji/Views/NotificationsOverviewView.swift @@ -68,14 +68,6 @@ struct NotificationsOverviewView: View { .tint(.blue) } } - .swipeActions(edge: .trailing, allowsFullSwipe: true) { - Button { - Task { await dismissNotification(notification) } - } label: { - Label("Dismiss", systemImage: "xmark") - } - .tint(.gray) - } } if pagination.hasMore { @@ -181,10 +173,6 @@ struct NotificationsOverviewView: View { await setNotificationRead(notification) } - private func dismissNotification(_ notification: NotificationThread) async { - await setNotificationRead(notification) - } - /// Marks a notification read when the user opens it, mirroring Mail and News. /// The row is updated in place rather than removed so navigation into the /// detail view is not interrupted while the list is mutating. diff --git a/Forji/ForjiUITests/MergedInstanceUITests.swift b/Forji/ForjiUITests/MergedInstanceUITests.swift index e255883..daba8ab 100644 --- a/Forji/ForjiUITests/MergedInstanceUITests.swift +++ b/Forji/ForjiUITests/MergedInstanceUITests.swift @@ -125,7 +125,7 @@ final class MergedInstanceUITests: ForgejoUITestBase { } @MainActor - func testMergedNotificationSwipeDismiss() throws { + func testMergedNotificationSwipeMarkRead() throws { try setupTwoInstances() enterMergedMode() @@ -137,19 +137,11 @@ final class MergedInstanceUITests: ForgejoUITestBase { let firstCell = notificationsList.cells.firstMatch XCTAssertTrue(firstCell.waitForExistence(timeout: 10), "Should have at least one notification") - // Swipe right to mark as read + // Swipe right to mark as read (the only notification swipe action) firstCell.swipeRight() let markReadButton = app.buttons["Mark Read"] XCTAssertTrue(markReadButton.waitForExistence(timeout: 3), "Mark Read swipe action should appear") markReadButton.tap() - - // Swipe left to dismiss - let nextCell = notificationsList.cells.firstMatch - XCTAssertTrue(nextCell.waitForExistence(timeout: 5), "Should have another notification to dismiss") - nextCell.swipeLeft() - let dismissButton = app.buttons["Dismiss"] - XCTAssertTrue(dismissButton.waitForExistence(timeout: 3), "Dismiss swipe action should appear") - dismissButton.tap() } // MARK: - Server URL Helpers diff --git a/Forji/ForjiUITests/NotificationsUITests.swift b/Forji/ForjiUITests/NotificationsUITests.swift index 185f4c0..ff738c4 100644 --- a/Forji/ForjiUITests/NotificationsUITests.swift +++ b/Forji/ForjiUITests/NotificationsUITests.swift @@ -2,7 +2,7 @@ import XCTest final class NotificationsUITests: ForgejoUITestBase { - // MARK: - Notifications (unread, filter, swipe mark-read, swipe dismiss) + // MARK: - Notifications (unread, filter, swipe mark-read) @MainActor func testNotifications() throws { @@ -38,16 +38,6 @@ final class NotificationsUITests: ForgejoUITestBase { if markReadButton.waitForExistence(timeout: 3) { markReadButton.tap() } - - // Swipe left to dismiss - let nextCell = notificationsList.cells.firstMatch - if nextCell.waitForExistence(timeout: 5) { - nextCell.swipeLeft() - let dismissButton = app.buttons["Dismiss"] - if dismissButton.waitForExistence(timeout: 3) { - dismissButton.tap() - } - } } // MARK: - Open-to-clear (#32)