Skip to content

Commit

Permalink
Merge pull request #1958 from Skyscanner/donburi/DON-491-update-searc…
Browse files Browse the repository at this point in the history
…h-modal-for-automation

[DON-491] Update search modal to fix the test automation
  • Loading branch information
LewisI224 committed May 8, 2024
2 parents 2364edc + 71f5a34 commit d53ff06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public struct BPKAppSearchModal: View {
.padding(.top, .base)
.padding(.bottom, BPKSpacing.none)
.background(.surfaceDefaultColor)
.accessibilityAddTraits(.isModal)
}

func makeNavigationBar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public struct BPKSearchInputSummary: View {
.focused($focused)
.accessibilityAddTraits(.isSearchField)
.accessibilityLabel(placeholder)
.accessibilityIdentifier("search_field")
accessory
}
.frame(maxWidth: .infinity, minHeight: 48.0)
Expand Down
3 changes: 3 additions & 0 deletions Backpack-SwiftUI/SearchInputSummary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ BPKSearchInputSummary(inputPrefix: .icon, text: $text)
```swift
BPKSearchInputSummary(inputPrefix: .customText("From"), text: $text)
```

### UI Testing
To use the component in UI or smoke tests it's possible to access this element using the accessibility identifier: `search_field`

0 comments on commit d53ff06

Please sign in to comment.