Skip to content

Commit

Permalink
Fix polls background view not using correct color from palette (#667)
Browse files Browse the repository at this point in the history
* Record dark mode tests in create poll view

* Fix Poll Creation View background color

* Fix Poll Results background
  • Loading branch information
nuno-vieira committed Nov 26, 2024
1 parent a90073d commit 5b54303
Show file tree
Hide file tree
Showing 33 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct PollResultsView: View {
Spacer()
}
}
.background(Color(colors.background8).ignoresSafeArea())
.background(Color(colors.background).ignoresSafeArea())
.toolbar {
ToolbarItem(placement: .principal) {
Text(L10n.Message.Polls.Toolbar.resultsTitle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct CreatePollView: View {
Spacer()
.modifier(ListRowModifier())
}
.background(Color(colors.background8).ignoresSafeArea())
.background(Color(colors.background).ignoresSafeArea())
.listStyle(.plain)
.id(listId)
.toolbar {
Expand Down Expand Up @@ -237,7 +237,7 @@ struct ListRowModifier: ViewModifier {
if #available(iOS 15.0, *) {
content
.listRowSeparator(.hidden)
.listRowBackground(Color(colors.background8))
.listRowBackground(Color(colors.background))
} else {
content
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ final class CreatePollView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_createPollView_allOptionsDisabledSnapshot() {
// Given
let hidden = PollsEntryConfig(configurable: false, defaultValue: false)
Expand All @@ -38,7 +38,7 @@ final class CreatePollView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_createPollView_allOptionsEnabledSnapshot() {
Expand All @@ -58,7 +58,7 @@ final class CreatePollView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_createPollView_mixedOptionsSnapshot() {
Expand All @@ -81,6 +81,6 @@ final class CreatePollView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.frame(width: defaultScreenSize.width, height: 240)

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_pollAttachmentView_snapshotUniqueVotes() {
Expand Down Expand Up @@ -59,7 +59,7 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.frame(width: defaultScreenSize.width, height: 150)

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_pollAttachmentView_closedPoll() {
Expand Down Expand Up @@ -88,7 +88,7 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.frame(width: defaultScreenSize.width, height: 150)

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_pollAttachmentView_resultsSnapshot() {
Expand All @@ -101,7 +101,7 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_pollAttachmentView_allOptions() {
Expand All @@ -114,7 +114,7 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_pollAttachmentView_allVotes() {
Expand All @@ -126,7 +126,7 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}

func test_pollAttachmentView_allComments() {
Expand All @@ -145,6 +145,6 @@ final class PollAttachmentView_Tests: StreamChatTestCase {
.applyDefaultSize()

// Then
assertSnapshot(matching: view, as: .image)
AssertSnapshot(view, variants: .onlyUserInterfaceStyles)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.

0 comments on commit 5b54303

Please sign in to comment.