Skip to content

Commit

Permalink
[#425] Remove XCUITest target
Browse files Browse the repository at this point in the history
  • Loading branch information
blyscuit committed Mar 31, 2023
1 parent 3386ce9 commit b275b1f
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 111 deletions.
3 changes: 1 addition & 2 deletions .github/wiki/Project-Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ A target specifies a product to build, such as an iOS, watchOS, or macOS app.

When creating a project from a template, a default target will be added automatically for the main application.

There are 4 default targets in a project:
There are 3 default targets in a project:

- {ProjectName}
- {ProjectName}Tests
- {ProjectName}KIFUITests
- {ProjectName}UITests

### Schemes

Expand Down
27 changes: 1 addition & 26 deletions .github/wiki/Standard-File-Organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,6 @@ To keep all current and upcoming iOS projects aligned, we standardize an iOS pro
   │   └── Home
   └── Utilities
   └── KIF+Swift.swift
└── {ProjectName}UITests
   ├── Configurations
   │   └── Plists
   ├── Resources
   └── Sources
   ├── AccessibilityIdentifiers
   │   ├── Login
   │   └── Home
   ├── Flows
   │   ├── Login
   │   └── Home
   ├── Screens
   │   ├── Login
   │   └── Home
   ├── Specs
   │   ├── Login
   │   └── Home
   └── Utilities
   ├── Data+Decode.swift
   ├── String+Data.swift
   └── TestError.swift
```

## README.md
Expand All @@ -166,8 +145,4 @@ This folder contains the unit testing and integration testing of the main projec

## {ProjectName}KIFUITests

This folder contains the KIF UI testing of the main project. Use KIF instead of UITests for speed and reliability.

## {ProjectName}UITests

This folder contains the UI testing of the main project.
This folder contains the KIF UI testing of the main project. Use KIF instead of XCUITest for speed and reliability.
1 change: 0 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
included:
- {PROJECT_NAME}
- {PROJECT_NAME}Tests
- {PROJECT_NAME}UITests
- {PROJECT_NAME}KIFUITests

excluded:
Expand Down
4 changes: 0 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ target '{PROJECT_NAME}' do
pod 'KIF', :configurations => ['Debug Staging', 'Debug Production']
pod 'KIF/IdentifierTests', :configurations => ['Debug Staging', 'Debug Production']
end

target '{PROJECT_NAME}UITests' do
testing_pods
end
end

post_install do |installer|
Expand Down
1 change: 0 additions & 1 deletion Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ extension Project {
.mainTarget(name: name, bundleId: bundleId),
.testsTarget(name: name, bundleId: bundleId),
.kifUITestsTarget(name: name, bundleId: bundleId),
.uiTestsTarget(name: name, bundleId: bundleId)
],
schemes: [
.productionScheme(name: name),
Expand Down
4 changes: 2 additions & 2 deletions Tuist/ProjectDescriptionHelpers/Scheme+Initializing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extension Scheme {
shared: true,
buildAction: .buildAction(targets: ["\(name)"]),
testAction: .targets(
["\(name)Tests", "\(name)KIFUITests", "\(name)UITests"],
["\(name)Tests", "\(name)KIFUITests"],
configuration: debugConfigName
),
runAction: .runAction(configuration: debugConfigName),
Expand All @@ -28,7 +28,7 @@ extension Scheme {
shared: true,
buildAction: .buildAction(targets: ["\(name)"]),
testAction: .targets(
["\(name)Tests", "\(name)KIFUITests", "\(name)UITests"],
["\(name)Tests", "\(name)KIFUITests"],
configuration: debugConfigName
),
runAction: .runAction(configuration: debugConfigName),
Expand Down
17 changes: 0 additions & 17 deletions Tuist/ProjectDescriptionHelpers/Target+Initializing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,4 @@ extension Target {
dependencies: [.target(name: name)]
)
}

public static func uiTestsTarget(name: String, bundleId: String) -> Target {
let targetName = "\(name)UITests"
return Target(
name: targetName,
platform: .iOS,
product: .uiTests,
bundleId: bundleId,
infoPlist: "\(targetName)/\(plistsPath)/Info.plist",
sources: ["\(targetName)/**"],
resources: [
"\(targetName)/**/.gitkeep", // To include empty folders
"\(targetName)/Resources/**/*"
],
dependencies: [.target(name: name)]
)
}
}
1 change: 0 additions & 1 deletion fastlane/Constants/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ enum Constant {
// MARK: - Test

static let testTarget: String = "\(projectName)Tests"
static let uiTestTarget: String = "\(projectName)UITests"
static let kifUITestTarget: String = "\(projectName)KIFUITests"
}

Expand Down
3 changes: 1 addition & 2 deletions fastlane/Fastfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ class Fastfile: LaneFile {
environment: .staging,
targets: [
Constant.testTarget,
Constant.kifUITestTarget,
Constant.uiTestTarget
Constant.kifUITestTarget
],
devices: Constant.devices
)
Expand Down
3 changes: 0 additions & 3 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ rename_folder(){
# Rename test folder structure
rename_folder "${CONSTANT_PROJECT_NAME}Tests" "${PROJECT_NAME_NO_SPACES}Tests"

# Rename UI Test folder structure
rename_folder "${CONSTANT_PROJECT_NAME}UITests" "${PROJECT_NAME_NO_SPACES}UITests"

# Rename KIF UI Test folder structure
rename_folder "${CONSTANT_PROJECT_NAME}KIFUITests" "${PROJECT_NAME_NO_SPACES}KIFUITests"

Expand Down
22 changes: 0 additions & 22 deletions {PROJECT_NAME}UITests/Configurations/Plists/Info.plist

This file was deleted.

Empty file.

This file was deleted.

0 comments on commit b275b1f

Please sign in to comment.