From e84916106c78415cca4d03c859595eee6ff66777 Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Sun, 21 Jun 2026 00:11:30 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20Persistence=20Presentation=20CI=20?= =?UTF-8?q?job=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07c1cde2..7889766d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -224,8 +224,10 @@ jobs: include: - name: Domain-Data schemes: "DevLogDomain DevLogData" - - name: Persistence-Presentation - schemes: "DevLogPersistence DevLogPresentation" + - name: Persistence + schemes: "DevLogPersistence" + - name: Presentation + schemes: "DevLogPresentation" - name: Widget schemes: "DevLogWidget DevLogWidgetCore" steps: From 35c88c7225ee207bda7169c7e9803e1f8504f48b Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Sun, 21 Jun 2026 00:17:20 +0900 Subject: [PATCH 2/3] =?UTF-8?q?test:=20AccountFeature=20=EB=A1=9C=EB=94=A9?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=8F=B4=EB=A7=81=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tests/Settings/AccountFeatureTests.swift | 69 +++++++++++-------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift b/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift index 1ecf0e46..a8696fdb 100644 --- a/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift +++ b/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift @@ -5,6 +5,8 @@ // Created by opfic on 6/11/26. // +// swiftlint:disable file_length + import Testing import ComposableArchitecture import Foundation @@ -87,38 +89,53 @@ struct AccountFeatureTests { ) let linkSpy = LinkAuthProviderUseCaseSpy() linkSpy.shouldSuspend = true - let driver = AccountTestDriver( - fetchUseCase: fetchSpy, - linkUseCase: linkSpy, - configureDependencies: { - $0.continuousClock = clock - } - ) - - driver.linkWithProvider(.github) - - await waitUntil { - linkSpy.providers == [.github] + let target = LoadingFeature.Target.default + let store = TestStore(initialState: AccountFeature.State()) { + AccountFeature() + } withDependencies: { + $0.fetchAuthProvidersUseCase = fetchSpy + $0.linkAuthProviderUseCase = linkSpy + $0.unlinkAuthProviderUseCase = UnlinkAuthProviderUseCaseSpy() + $0.continuousClock = clock } + store.exhaustivity = .off(showSkippedAssertions: false) - #expect(!driver.isLoading) + await store.send(.linkWithProvider(.github)) { + $0.activeLoadingProvider = .github + } + await store.receive(\.loading.begin) { + $0.loading.delayedCountByTarget[target] = 1 + $0.loading.scheduledDelayedTargets = [target] + } + #expect(linkSpy.providers == [.github]) + #expect(!store.state.isLoading) await clock.advance(by: .milliseconds(300)) - - await waitUntil { - driver.isLoading + await store.receive(\.loading.delayedLoadingDidBecomeVisible, target) { + $0.loading.scheduledDelayedTargets = [] + $0.loading.visibleDelayedTargets = [target] + $0.loading.visibleTargets = [target] + $0.loading.isLoading = true } - #expect(driver.isLoading) - #expect(driver.activeLoadingProvider == .github) + #expect(store.state.isLoading) + #expect(store.state.activeLoadingProvider == .github) linkSpy.resume() - - await waitUntil { - !driver.isLoading && fetchSpy.executeCallCount == 1 + await store.receive(\.setProviders) { + $0.currentProvider = .google + $0.connectedProviders = [.github] + $0.disconnectedProviders = [.apple] + } + await store.receive(\.loading.end) { + $0.loading.delayedCountByTarget[target] = 0 + $0.loading.visibleDelayedTargets = [] + $0.loading.visibleTargets = [] + $0.loading.isLoading = false + $0.activeLoadingProvider = nil } - #expect(!driver.isLoading) + #expect(!store.state.isLoading) } @Test("인증 제공자 조회에 실패하면 공통 에러 알림을 표시한다") @@ -253,10 +270,6 @@ private struct AccountTestDriver { feature.state.isLoading } - var activeLoadingProvider: AuthProvider? { - feature.state.activeLoadingProvider - } - var alert: AlertState? { feature.state.alert } @@ -264,8 +277,7 @@ private struct AccountTestDriver { init( fetchUseCase: FetchAuthProvidersUseCase = FetchAuthProvidersUseCaseSpy(), linkUseCase: LinkAuthProviderUseCase = LinkAuthProviderUseCaseSpy(), - unlinkUseCase: UnlinkAuthProviderUseCase = UnlinkAuthProviderUseCaseSpy(), - configureDependencies: ((inout DependencyValues) -> Void)? = nil + unlinkUseCase: UnlinkAuthProviderUseCase = UnlinkAuthProviderUseCaseSpy() ) { feature = Store(initialState: AccountFeature.State()) { AccountFeature() @@ -274,7 +286,6 @@ private struct AccountTestDriver { $0.linkAuthProviderUseCase = linkUseCase $0.unlinkAuthProviderUseCase = unlinkUseCase $0.continuousClock = ContinuousClock() - configureDependencies?(&$0) } } From 45710eed161467dde9fc9337d7c9c2a31be136ec Mon Sep 17 00:00:00 2001 From: opficdev <162981733+opficdev@users.noreply.github.com> Date: Sun, 21 Jun 2026 00:24:16 +0900 Subject: [PATCH 3/3] =?UTF-8?q?test:=20AccountFeature=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=97=84=EA=B2=A9=20=EA=B2=80=EC=A6=9D=20=EC=9C=A0?= =?UTF-8?q?=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DevLogPresentation/Tests/Settings/AccountFeatureTests.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift b/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift index a8696fdb..9f2a37f3 100644 --- a/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift +++ b/Application/DevLogPresentation/Tests/Settings/AccountFeatureTests.swift @@ -98,8 +98,6 @@ struct AccountFeatureTests { $0.unlinkAuthProviderUseCase = UnlinkAuthProviderUseCaseSpy() $0.continuousClock = clock } - store.exhaustivity = .off(showSkippedAssertions: false) - await store.send(.linkWithProvider(.github)) { $0.activeLoadingProvider = .github }