From 1a98f44aa6ada0b93952d970455ec6d85c039e8f Mon Sep 17 00:00:00 2001 From: Federico Maccaroni Date: Mon, 13 Jan 2025 18:20:52 -0300 Subject: [PATCH 1/2] PM-15360 Fail CXP export if disable personal vault export policy is enabled. --- .../ExportCXF/ExportCXFProcessor.swift | 12 ++++++ .../ExportCXF/ExportCXFProcessorTests.swift | 37 +++++++++++++++++++ .../ExportCXF/ExportCXFCoordinator.swift | 1 + 3 files changed, 50 insertions(+) diff --git a/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessor.swift b/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessor.swift index 620baf2c6..d7d470247 100644 --- a/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessor.swift +++ b/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessor.swift @@ -11,6 +11,7 @@ class ExportCXFProcessor: StateProcessor 0 else { state.status = .failure(message: Localizations.noItems) @@ -141,6 +148,11 @@ class ExportCXFProcessor: StateProcessor Date: Wed, 15 Jan 2025 13:04:03 -0300 Subject: [PATCH 2/2] PM-15360 Addressed PR feedback simplifying test. --- .../ExportCXF/ExportCXF/ExportCXFProcessorTests.swift | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessorTests.swift b/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessorTests.swift index e4d01bbe1..8c6aa6bdb 100644 --- a/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessorTests.swift +++ b/BitwardenShared/UI/Tools/ExportCXF/ExportCXF/ExportCXFProcessorTests.swift @@ -157,15 +157,8 @@ class ExportCXFProcessorTests: BitwardenTestCase { // swiftlint:disable:this typ @MainActor func test_perform_cancelMainButtonNotShown() async throws { subject.state.showMainButton = false - let task = Task { - await subject.perform(.cancel) - } - defer { task.cancel() } - try await waitForAsync { [weak self] in - guard let self else { return true } - return !coordinator.routes.isEmpty - } + await subject.perform(.cancel) XCTAssertEqual(.dismiss, coordinator.routes.last) }