Deletes UI test code

This commit is contained in:
Stuart Breckenridge
2023-01-08 10:11:42 +08:00
parent b7dbe5c6a5
commit 09b6a0f22d
4 changed files with 0 additions and 185 deletions

View File

@@ -1,39 +0,0 @@
{
"configurations" : [
{
"id" : "3878F164-A79E-44EE-8DC3-3CFC413BCE62",
"name" : "English - US",
"options" : {
"areLocalizationScreenshotsEnabled" : true,
"language" : "en",
"region" : "US"
}
},
{
"id" : "4D5E7C9B-F2B7-4E6B-AF7E-FF172A8EC7BA",
"name" : "English - UK",
"options" : {
"areLocalizationScreenshotsEnabled" : true,
"language" : "en-GB",
"region" : "GB"
}
}
],
"defaultOptions" : {
"testTimeoutsEnabled" : true
},
"testTargets" : [
{
"skippedTests" : [
"NetNewsWireUITests_iOS",
"NetNewsWireUITests_iOSLaunchTests"
],
"target" : {
"containerPath" : "container:NetNewsWire.xcodeproj",
"identifier" : "DFB616C82965739D00A359AB",
"name" : "NetNewsWireUITests-iOS"
}
}
],
"version" : 1
}

View File

@@ -1,71 +0,0 @@
//
// LocalizationTests.swift
// NetNewsWireTests
//
// Created by Stuart Breckenridge on 04/01/2023.
// Copyright © 2023 Ranchero Software. All rights reserved.
//
import XCTest
final class LocalizationTests_iOSTest: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// In UI tests its important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testAppRunThrough() throws {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()
_ = addUIInterruptionMonitor(withDescription: "Handle Notifications Alert") { element in
if element.buttons["Allow"].exists {
element.buttons["Allow"].tap()
return true
}
return false
}
app.toolbars["Toolbar"].buttons["Settings"].tap()
let collectionViewsQuery = app.collectionViews
collectionViewsQuery/*@START_MENU_TOKEN@*/.buttons["Manage Accounts"]/*[[".cells.buttons[\"Manage Accounts\"]",".buttons[\"Manage Accounts\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["Manage Accounts"]/*@START_MENU_TOKEN@*/.buttons["Add"]/*[[".otherElements[\"Add\"].buttons[\"Add\"]",".buttons[\"Add\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["Add Account"]/*@START_MENU_TOKEN@*/.buttons["Cancel"]/*[[".otherElements[\"Cancel\"].buttons[\"Cancel\"]",".buttons[\"Cancel\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["Manage Accounts"].buttons["Settings"].tap()
collectionViewsQuery/*@START_MENU_TOKEN@*/.buttons["Manage Extensions"]/*[[".cells.buttons[\"Manage Extensions\"]",".buttons[\"Manage Extensions\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["Manage Extensions"]/*@START_MENU_TOKEN@*/.buttons["Add"]/*[[".otherElements[\"Add\"].buttons[\"Add\"]",".buttons[\"Add\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["Add Extensions"]/*@START_MENU_TOKEN@*/.buttons["Cancel"]/*[[".otherElements[\"Cancel\"].buttons[\"Cancel\"]",".buttons[\"Cancel\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["Manage Extensions"].buttons["Settings"].tap()
collectionViewsQuery/*@START_MENU_TOKEN@*/.buttons["Import Subscriptions"]/*[[".cells.buttons[\"Import Subscriptions\"]",".buttons[\"Import Subscriptions\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app/*@START_MENU_TOKEN@*/.scrollViews/*[[".otherElements[\"Choose an account to receive the imported feeds and folders\"].scrollViews",".scrollViews"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.otherElements.buttons["Cancel"].tap()
collectionViewsQuery/*@START_MENU_TOKEN@*/.buttons["Export Subscriptions"]/*[[".cells.buttons[\"Export Subscriptions\"]",".buttons[\"Export Subscriptions\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app/*@START_MENU_TOKEN@*/.scrollViews/*[[".otherElements[\"Choose an account with the subscriptions to export\"].scrollViews",".scrollViews"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.otherElements.buttons["Cancel"].tap()
let displayBehaviorsButton = collectionViewsQuery.buttons["button.title.display-and-behaviors"]
displayBehaviorsButton.tap()
app.navigationBars.buttons["Settings"].tap()
collectionViewsQuery/*@START_MENU_TOKEN@*/.buttons["New Article Notifications"]/*[[".cells.buttons[\"New Article Notifications\"]",".buttons[\"New Article Notifications\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["New Article Notifications"].buttons["Settings"].tap()
displayBehaviorsButton.swipeUp()
collectionViewsQuery/*@START_MENU_TOKEN@*/.buttons["About"]/*[[".cells.buttons[\"About\"]",".buttons[\"About\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/.tap()
app.navigationBars["About"].buttons["Settings"].tap()
}
private func addScreenShot(_ name: String, app: XCUIApplication) {
let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = name
attachment.lifetime = .keepAlways
add(attachment)
}
}

View File

@@ -1,42 +0,0 @@
//
// NetNewsWireUITests_iOS.swift
// NetNewsWireUITests-iOS
//
// Created by Stuart Breckenridge on 04/01/2023.
// Copyright © 2023 Ranchero Software. All rights reserved.
//
import XCTest
final class NetNewsWireUITests_iOS: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// In UI tests its important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testExample() throws {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testLaunchPerformance() throws {
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
// This measures how long it takes to launch your application.
measure(metrics: [XCTApplicationLaunchMetric()]) {
XCUIApplication().launch()
}
}
}
}

View File

@@ -1,33 +0,0 @@
//
// NetNewsWireUITests_iOSLaunchTests.swift
// NetNewsWireUITests-iOS
//
// Created by Stuart Breckenridge on 04/01/2023.
// Copyright © 2023 Ranchero Software. All rights reserved.
//
import XCTest
final class NetNewsWireUITests_iOSLaunchTests: XCTestCase {
override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
}
override func setUpWithError() throws {
continueAfterFailure = false
}
func testLaunch() throws {
let app = XCUIApplication()
app.launch()
// Insert steps here to perform after app launch but before taking a screenshot,
// such as logging into a test account or navigating somewhere in the app
let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "Launch Screen"
attachment.lifetime = .keepAlways
add(attachment)
}
}