Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Comments Composition #20

Merged
merged 14 commits into from
May 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set comments title
finebel committed May 11, 2024
commit c07818c0b053c0d27712c56c654c8ff7ef14535b
4 changes: 2 additions & 2 deletions EssentialApp/EssentialApp/CommentsUIComposer.swift
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ public final class CommentsUIComposer {
)

let feedController = Self.makeFeedViewController(
title: FeedPresenter.title
title: ImageCommentsPresenter.title
)
feedController.onRefresh = presentationAdapter.loadResource

@@ -46,7 +46,7 @@ public final class CommentsUIComposer {
let feedController = storyboard.instantiateInitialViewController { coder in
ListViewController(coder: coder)
}!
feedController.title = FeedPresenter.title
feedController.title = title

return feedController
}
2 changes: 1 addition & 1 deletion EssentialApp/EssentialApp/FeedUIComposer.swift
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ public final class FeedUIComposer {
let feedController = storyboard.instantiateInitialViewController { coder in
ListViewController(coder: coder)
}!
feedController.title = FeedPresenter.title
feedController.title = title

return feedController
}
Original file line number Diff line number Diff line change
@@ -12,12 +12,12 @@ import EssentialFeed
import EssentialFeediOS

final class CommentsUIIntegrationTests: FeedUIIntegrationTests {
override func test_feedView_hasTitle() {
func test_commentsView_hasTitle() {
let (sut, _) = makeSUT()

sut.loadViewIfNeeded()

XCTAssertEqual(sut.title, feedTitle)
XCTAssertEqual(sut.title, commentsTitle)
}

override func test_loadFeedActions_requestFeedFromLoader() {
Original file line number Diff line number Diff line change
@@ -20,4 +20,8 @@ extension FeedUIIntegrationTests {
var feedTitle: String {
FeedPresenter.title
}

var commentsTitle: String {
ImageCommentsPresenter.title
}
}