Skip to content

Commit

Permalink
Organize test names (#186)
Browse files Browse the repository at this point in the history
- Rename operations
- Remove Integration from names of UI tests
- Move SBS mock resources into MockData, move MockServer into Tests folder
- Organize mock data for autofill and geocoding tests
- Remove old references in testplan
- Group resources by API type (corresponding to instances of MockResponse)

<img width="218" alt="Screenshot 2024-03-01 at 14 17 07" src="https://github.com/mapbox/mapbox-search-ios/assets/384288/7e0441d6-eca6-42ea-bcd3-8854ae9c64e4">

- Update UI tests folder and classes to have distinct UI name

<img width="316" alt="Screenshot 2024-03-01 at 14 17 14" src="https://github.com/mapbox/mapbox-search-ios/assets/384288/41a2d942-c7ae-4f79-aa12-95dae99d9bee">

- [x] Update `CHANGELOG`

Conflicts:
	MapboxSearch.xcodeproj/project.pbxproj
	Tests/Demo.xctestplan
	Tests/MapboxSearchUITests/Tests/CategorySuggestionsNavigationUITestCase.swift
	Tests/MapboxSearchUITests/Tests/CategorySuggestionsUITestCase.swift
	Tests/MapboxSearchUITests/Tests/FavoritesUITestCase.swift
	Tests/MapboxSearchUITests/Tests/FeedbackUITestCase.swift
	Tests/MapboxSearchUITests/Tests/SearchUITestCase.swift
	Tests/MapboxSearchUITests/Tests/VisibilityUITestCase.swift
	Tests/MockData/sbs/category-hotel-search-along-route-jp.json
  • Loading branch information
aokj4ck committed Apr 5, 2024
1 parent 91e3125 commit d794556
Show file tree
Hide file tree
Showing 29 changed files with 244 additions and 210 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Guide: https://keepachangelog.com/en/1.0.0/

<!-- Add changes for active work here -->

- [Tests] Reorganize tests based on API type

- [Privacy] Add Search history collected data for the purpose of product personalization (used for displaying the search history)

- [License] Update license to reflect 2024 usage
Expand Down
436 changes: 235 additions & 201 deletions MapboxSearch.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

class CategorySuggestionsNavigationIntegrationTestCase: MockSBSServerUITestCase {
class CategorySuggestionsNavigationUITestCase: MockSBSServerUITestCase {
override func setUpWithError() throws {
try super.setUpWithError()
app.launch()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

class CategorySuggestionsIntegrationTestCase: MockSBSServerUITestCase {
class CategorySuggestionsUITestCase: MockSBSServerUITestCase {
override func setUpWithError() throws {
try super.setUpWithError()
app.launch()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

class FavoritesIntegrationTestCase: MockSBSServerUITestCase {
class FavoritesUITestCase: MockSBSServerUITestCase {
func testAddRemoveFavorite() throws {
try server.setResponse(.suggestMinsk)
try server.setResponse(.retrieveMinsk)
Expand Down Expand Up @@ -232,7 +232,7 @@ class FavoritesIntegrationTestCase: MockSBSServerUITestCase {
}
}

extension FavoritesIntegrationTestCase {
extension FavoritesUITestCase {
func removeDefaultFavorite(element: XCUIElement) {
element.buttons["moreButton"].tap()
let removeLocation = app.buttons["Remove location"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import XCTest

// TODO: Analytics

class FeedbackIntegrationTestCase: MockSBSServerUITestCase {
class FeedbackUITestCase: MockSBSServerUITestCase {
override func setUpWithError() throws {
try super.setUpWithError()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

class SearchIntegrationTestCase: MockSBSServerUITestCase {
class SearchUITestCase: MockSBSServerUITestCase {
func testRecentSearchRemove() throws {
try server.setResponse(.suggestSanFrancisco)
try server.setResponse(.retrieveSanFrancisco)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import XCTest

class VisibilityTestCase: MockSBSServerUITestCase {
class VisibilityUITestCase: MockSBSServerUITestCase {
override func setUpWithError() throws {
try super.setUpWithError()
app.launch()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d794556

Please sign in to comment.