From 59784398b13e5bbbbee5c46f4f429c5881ddbdc0 Mon Sep 17 00:00:00 2001 From: saeedbashir Date: Thu, 27 Jul 2023 09:22:57 +0500 Subject: [PATCH] Remove E2E tests in favour of automation tests --- Source/OEXAppDelegate.m | 4 - Test/EndToEnd/Code/AppInteractor.swift | 18 - Test/EndToEnd/Code/AppLaunchInteractor.swift | 18 - Test/EndToEnd/Code/EndToEndConfig.swift | 24 -- .../Code/EnrolledCoursesInteractor.swift | 35 -- Test/EndToEnd/Code/FeatureTestCase.swift | 65 ---- .../EndToEnd/Code/FindCoursesInteractor.swift | 43 --- Test/EndToEnd/Code/FindCoursesTestCase.swift | 22 -- Test/EndToEnd/Code/LoginFeatureTestCase.swift | 22 -- .../EndToEnd/Code/LoginScreenInteractor.swift | 42 --- Test/EndToEnd/Code/NSUUID+Username.swift | 77 ----- .../Code/NavigationDrawerInteractor.swift | 33 -- .../Code/RegisterFeatureTestCase.swift | 29 -- .../Code/RegistrationScreenInteractor.swift | 51 --- .../Code/SplashScreenInteractor.swift | 45 --- Test/EndToEnd/Code/Stream+Sync.swift | 21 -- Test/EndToEnd/Code/TestCredentials.swift | 73 ----- Test/EndToEnd/Code/XCUIElement+Helpers.swift | 39 --- edX.xcodeproj/project.pbxproj | 310 +----------------- .../xcschemes/EndToEndTests.xcscheme | 101 ------ 20 files changed, 1 insertion(+), 1071 deletions(-) delete mode 100644 Test/EndToEnd/Code/AppInteractor.swift delete mode 100644 Test/EndToEnd/Code/AppLaunchInteractor.swift delete mode 100644 Test/EndToEnd/Code/EndToEndConfig.swift delete mode 100644 Test/EndToEnd/Code/EnrolledCoursesInteractor.swift delete mode 100644 Test/EndToEnd/Code/FeatureTestCase.swift delete mode 100644 Test/EndToEnd/Code/FindCoursesInteractor.swift delete mode 100644 Test/EndToEnd/Code/FindCoursesTestCase.swift delete mode 100644 Test/EndToEnd/Code/LoginFeatureTestCase.swift delete mode 100644 Test/EndToEnd/Code/LoginScreenInteractor.swift delete mode 100644 Test/EndToEnd/Code/NSUUID+Username.swift delete mode 100644 Test/EndToEnd/Code/NavigationDrawerInteractor.swift delete mode 100644 Test/EndToEnd/Code/RegisterFeatureTestCase.swift delete mode 100644 Test/EndToEnd/Code/RegistrationScreenInteractor.swift delete mode 100644 Test/EndToEnd/Code/SplashScreenInteractor.swift delete mode 100644 Test/EndToEnd/Code/Stream+Sync.swift delete mode 100644 Test/EndToEnd/Code/TestCredentials.swift delete mode 100644 Test/EndToEnd/Code/XCUIElement+Helpers.swift delete mode 100644 edX.xcodeproj/xcshareddata/xcschemes/EndToEndTests.xcscheme diff --git a/Source/OEXAppDelegate.m b/Source/OEXAppDelegate.m index ffa1cf9eb7..e1c0953dad 100644 --- a/Source/OEXAppDelegate.m +++ b/Source/OEXAppDelegate.m @@ -64,10 +64,6 @@ - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(N }); return YES; } - if([[NSProcessInfo processInfo].arguments containsObject:@"-END_TO_END_TEST"]) { - [[[OEXSession alloc] init] closeAndClearSession]; - [OEXFileUtility nukeUserData]; - } #endif // logout user automatically if server changed diff --git a/Test/EndToEnd/Code/AppInteractor.swift b/Test/EndToEnd/Code/AppInteractor.swift deleted file mode 100644 index 91e64b0ce1..0000000000 --- a/Test/EndToEnd/Code/AppInteractor.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// AppInteractor.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import XCTest - -class AppInteractor { - func launchApp() -> AppLaunchInteractor { - let application = XCUIApplication() - application.launchArguments = ["-AppleLocale", "en_US", "-END_TO_END_TEST"] - application.launch() - return AppLaunchInteractor() - } -} \ No newline at end of file diff --git a/Test/EndToEnd/Code/AppLaunchInteractor.swift b/Test/EndToEnd/Code/AppLaunchInteractor.swift deleted file mode 100644 index 410f46afe3..0000000000 --- a/Test/EndToEnd/Code/AppLaunchInteractor.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// AppLaunchInteractor.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -open class AppLaunchInteractor { - - // Anonymous users should land here - func observeSplashScreen() -> SplashScreenInteractor { - return SplashScreenInteractor().observeSplashScreen() - } -} diff --git a/Test/EndToEnd/Code/EndToEndConfig.swift b/Test/EndToEnd/Code/EndToEndConfig.swift deleted file mode 100644 index 8ce18777ae..0000000000 --- a/Test/EndToEnd/Code/EndToEndConfig.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// EndToEndConfig.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import edXCore - -class EndToEndConfig { - let emailTemplate: String - - init(info: [String:AnyObject]) { - emailTemplate = (info["EMAIL_TEMPLATE"] as? String) ?? "test-{unique_id}@example.com" - } -} - -extension OEXConfig { - var endToEndConfig : EndToEndConfig { - return EndToEndConfig(info: (self.object(forKey: "END_TO_END_TESTS") as? [String:AnyObject]) ?? [:]) - } -} diff --git a/Test/EndToEnd/Code/EnrolledCoursesInteractor.swift b/Test/EndToEnd/Code/EnrolledCoursesInteractor.swift deleted file mode 100644 index 61566d9807..0000000000 --- a/Test/EndToEnd/Code/EnrolledCoursesInteractor.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// EnrolledCoursesInteractor.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -class EnrolledCoursesInteractor : FeatureInteractor { - var container : XCUIElement { - return otherElements["enrolled-courses-screen"] - } - - var navigationBarButton : XCUIElement { - return buttons["navigation-bar-button"] - } - - func observeEnrolledCoursesScreen() { - waitForElement(container) - } - - func openNavigationDrawer() -> NavigationDrawerInteractor { - - navigationBarButton.tap() - - let interactor = NavigationDrawerInteractor() - interactor.waitForDisplay() - - - return interactor - } -} \ No newline at end of file diff --git a/Test/EndToEnd/Code/FeatureTestCase.swift b/Test/EndToEnd/Code/FeatureTestCase.swift deleted file mode 100644 index 56dd76e483..0000000000 --- a/Test/EndToEnd/Code/FeatureTestCase.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// FeatureTestCase.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - - -/// Base class for -class FeatureTestCase : XCTestCase { - static var activeTest : XCTestCase! - - override func setUp() { - super.setUp() - FeatureTestCase.activeTest = self - } - - override func tearDown() { - super.setUp() - FeatureTestCase.activeTest = nil - XCUIApplication().terminate() - } -} - -/// Extension making it easy to wait for an element outside the methods of an XCTestCase -/// Requires the current test to be a subclass of FeatureTestCase -protocol FeatureInteractor {} -extension FeatureInteractor { - func waitForElement(_ element: XCUIElement, predicate: NSPredicate = NSPredicate(format: "exists == true"), file: String = #file, line: UInt = #line) { - - FeatureTestCase.activeTest.expectation(for: predicate, evaluatedWith: element, handler: nil) - FeatureTestCase.activeTest.OEXWaitForExpectations { (error) -> Void in - if error != nil { - FeatureTestCase.activeTest.record(XCTIssue(type: .assertionFailure, compactDescription: "Timeout waiting for element: \(element)", sourceCodeContext: XCTSourceCodeContext(location: XCTSourceCodeLocation(filePath: file, lineNumber: Int(line))))) - } - } - } - - func waitForElementNonNullValue(_ element: XCUIElement, file: String = #file, line: UInt = #line) { - waitForElement(element, predicate: NSPredicate(format: "value != nil"), file: file, line: line) - } - - // helpers - var buttons: XCUIElementQuery { return XCUIApplication().buttons } - var otherElements: XCUIElementQuery { return XCUIApplication().otherElements } - var textFields: XCUIElementQuery { return XCUIApplication().textFields } - var secureTextFields: XCUIElementQuery { return XCUIApplication().secureTextFields } - - func find(identifier: String, type: XCUIElement.ElementType = .any) -> XCUIElement { - return XCUIApplication().descendants(matching: type)[identifier] - } - - func pickerWheel(identifier: String, index: Int = 0) -> XCUIElement { - // You can't actually manipulate the "picker" itself. You have to manipulate the individual wheel. - // However, the wheel doesn't have a direct name, so you have to access it by index, even if there's only one wheel. - return find(identifier: identifier, type: .picker).descendants(matching: .pickerWheel).element(boundBy: index) - } -} - -extension XCUIElement : FeatureInteractor {} - diff --git a/Test/EndToEnd/Code/FindCoursesInteractor.swift b/Test/EndToEnd/Code/FindCoursesInteractor.swift deleted file mode 100644 index 2e0e205ada..0000000000 --- a/Test/EndToEnd/Code/FindCoursesInteractor.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// FindCoursesInteractor.swift -// edX -// -// Created by Saeed Bashir on 4/12/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest -@testable import edX - -class FindCoursesInteractor: FeatureInteractor { - - var container: XCUIElement { - return find(identifier: "course-catalog-screen") - } - - func waitForDisplay() { - waitForElement(container) - } - - var coursesTableView: XCUIElement { - return find(identifier: "courses-table-view") - } - - var coursesWebView: XCUIElement { - return find(identifier: "find-courses-webview") - } - - func verifyFindCoursesLoaded () { - - let config = OEXConfig(bundle: Bundle(for: FindCoursesInteractor.self)) - - switch config.discovery.type { - case .native, .none: - waitForElement(coursesTableView.cells.element(boundBy: 0)) - - case .webview: - waitForElementNonNullValue(coursesWebView) - } - } -} diff --git a/Test/EndToEnd/Code/FindCoursesTestCase.swift b/Test/EndToEnd/Code/FindCoursesTestCase.swift deleted file mode 100644 index 3b66b3029d..0000000000 --- a/Test/EndToEnd/Code/FindCoursesTestCase.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// FindCoursesTestCase.swift -// edX -// -// Created by Saeed Bashir on 4/12/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation - -class FindCoursesTestCase: FeatureTestCase { - func testFindCourses() { - AppInteractor() - .launchApp() - .observeSplashScreen() - .navigateToLoginScreen() - .login(TestCredentials()) - .openNavigationDrawer() - .showFindCoursesScreen() - .verifyFindCoursesLoaded() - } -} \ No newline at end of file diff --git a/Test/EndToEnd/Code/LoginFeatureTestCase.swift b/Test/EndToEnd/Code/LoginFeatureTestCase.swift deleted file mode 100644 index 93625ee41a..0000000000 --- a/Test/EndToEnd/Code/LoginFeatureTestCase.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// LoginFeatureTestCase.swift -// edX -// -// Created by Akiva Leffert on 3/5/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -class LoginFeatureTestCase : FeatureTestCase { - - func testLoginWithUsernamePassword() { - AppInteractor() - .launchApp() - .observeSplashScreen() - .navigateToLoginScreen() - .login(TestCredentials()) - .observeEnrolledCoursesScreen() - } -} \ No newline at end of file diff --git a/Test/EndToEnd/Code/LoginScreenInteractor.swift b/Test/EndToEnd/Code/LoginScreenInteractor.swift deleted file mode 100644 index 1a0078a048..0000000000 --- a/Test/EndToEnd/Code/LoginScreenInteractor.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// LoginScreenInteractor.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest -import edXCore - - -class LoginScreenInteractor : FeatureInteractor { - var container : XCUIElement { - return otherElements["login-screen"] - } - - var usernameField: XCUIElement { - return textFields["user-field"] - } - - var passwordField: XCUIElement { - return secureTextFields["password-field"] - } - - var signInButton: XCUIElement { - return buttons["sign-in-button"] - } - - func waitForDisplay() { - waitForElement(container) - } - - func login(_ credentials: TestCredentials) -> EnrolledCoursesInteractor { - usernameField.clearAndEnterText(credentials.username) - passwordField.clearAndEnterText(credentials.password) - signInButton.tap() - return EnrolledCoursesInteractor() - } - -} diff --git a/Test/EndToEnd/Code/NSUUID+Username.swift b/Test/EndToEnd/Code/NSUUID+Username.swift deleted file mode 100644 index 2e24623325..0000000000 --- a/Test/EndToEnd/Code/NSUUID+Username.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// NSUUID+Username.swift -// edX -// -// Created by Akiva Leffert on 3/14/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation - -extension UUID { - - // We want to generate random usernames for tests, so ideally we would just generate a UUID. - // But regular UUIDs are too long to be an edX username. - // UUIDs are ascii-encoded hex. That is 4 bits (one hex digit) per character. - // As such we convert the string to base64 which is a denser encoding (6 bits per character). - // This is kind of hacky, but it does the job and seems pretty safe - var asUsername: String { - - /// Converts an ascii hex digit to its numerical representation. - /// For example, hexValue("F") = 15, hexValue("7") = 7. - /// *Crashes* if given a character outside [0-9A-F]. - /// As such, it should be used carefully and is not suitable for use outside of test code. - func hexValue(_ scalar : UnicodeScalar) -> UInt32 { - enum Sentinal : String { - case A = "A" - case F = "F" - case Zero = "0" - case Nine = "9" - - var value : UInt32 { - return self.rawValue.unicodeScalars.first!.value - } - } - - let v = scalar.value - switch v { - case Sentinal.Zero.value ... Sentinal.Nine.value: - return v - Sentinal.Zero.value - case Sentinal.A.value ... Sentinal.F.value: - return v - Sentinal.A.value + 10 - default: - preconditionFailure("Unexpected ascii char with value:\(v)") - } - } - - let hex = self.uuidString.components(separatedBy: "-").joined(separator: "") - var accumulator : [UInt32] = [] - - // Create a buffer that will be our UUID hex string as actual hex bytes - // For example, if our UUID starts "AF" then the first byte of data - // will be 0xAF. - let data = NSMutableData(capacity: 0)! - - // Add the digits to our buffer in two character (one byte) chunks - for character in hex.unicodeScalars { - accumulator.append(hexValue(character)) - if(accumulator.count == 2) { - var value = accumulator[0] + (accumulator[1] << 4) - data.append(&value, length: 1) - accumulator.removeAll() - } - } - - var result = data.base64EncodedString(options: .lineLength64Characters) - for remaining in accumulator { - result.append(String(describing: UnicodeScalar(remaining))) - } - // Replace characters not allowed in usernames and remove the unnecessary tail of "=" from base64. - // It doesn't matter how we do this exactly, since we never decode this out of base64. - // Our goal is just to get a unique token that only users username safe characters - return result - .replacingOccurrences(of: "/", with: "-") - .replacingOccurrences(of: "+", with: "_") - .replacingOccurrences(of: "=", with: "") - } -} diff --git a/Test/EndToEnd/Code/NavigationDrawerInteractor.swift b/Test/EndToEnd/Code/NavigationDrawerInteractor.swift deleted file mode 100644 index 6bab1a573b..0000000000 --- a/Test/EndToEnd/Code/NavigationDrawerInteractor.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// NavigationDrawerInteractor.swift -// edX -// -// Created by Saeed Bashir on 4/12/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -class NavigationDrawerInteractor: FeatureInteractor { - - fileprivate var container: XCUIElement { - return find(identifier: "navigation-drawer") - } - - fileprivate var findCoursesItem: XCUIElement { - return find(identifier: "find-courses-cell") - } - - func waitForDisplay() { - waitForElement(container) - } - - func showFindCoursesScreen() -> FindCoursesInteractor { - findCoursesItem.tap() - - let findCoursesScreen = FindCoursesInteractor() - findCoursesScreen.waitForDisplay() - return findCoursesScreen - } -} diff --git a/Test/EndToEnd/Code/RegisterFeatureTestCase.swift b/Test/EndToEnd/Code/RegisterFeatureTestCase.swift deleted file mode 100644 index 0bad6c9525..0000000000 --- a/Test/EndToEnd/Code/RegisterFeatureTestCase.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// RegisterFeatureTestCase.swift -// edX -// -// Created by Akiva Leffert on 3/15/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation - -class RegisterFeatureTestCase : FeatureTestCase { - func testRegisterUsernamePassword() { - let credentials = TestCredentials(type: .fresh) - - AppInteractor() - .launchApp() - .observeSplashScreen() - .navigateToRegisterScreen() - .enterValues(values: [ - "username": .text(credentials.username), - "password": .text(credentials.password), - "email": .text(credentials.email), - "name": .text("Test Person"), - "country": .picker("Antarctica") - ]) - .register() - .observeEnrolledCoursesScreen() - } -} diff --git a/Test/EndToEnd/Code/RegistrationScreenInteractor.swift b/Test/EndToEnd/Code/RegistrationScreenInteractor.swift deleted file mode 100644 index df5861149e..0000000000 --- a/Test/EndToEnd/Code/RegistrationScreenInteractor.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// RegistrationScreenInteractor.swift -// edX -// -// Created by Akiva Leffert on 3/15/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -enum FormItem { - case text(String) - case picker(String) -} - -class RegistrationScreenInteractor : FeatureInteractor { - var container: XCUIElement { - return otherElements["registration-screen"] - } - - func waitForDisplay() { - waitForElement(container) - } - - var registerButton : XCUIElement { - return buttons["register"] - } - - func enterValues(values: [String:FormItem]) -> RegistrationScreenInteractor { - for (key, value) in values { - let element = find(identifier: "field-" + key) - switch value { - case let .text(content): - element.clearAndEnterText(content) - case let .picker(content): - element.tap() - let picker = pickerWheel(identifier: "picker-field-" + key) - picker.adjust(toPickerWheelValue: content) - } - } - return self - } - - func register() -> EnrolledCoursesInteractor { - let element = registerButton - element.tap() - - return EnrolledCoursesInteractor() - } -} diff --git a/Test/EndToEnd/Code/SplashScreenInteractor.swift b/Test/EndToEnd/Code/SplashScreenInteractor.swift deleted file mode 100644 index a580a27285..0000000000 --- a/Test/EndToEnd/Code/SplashScreenInteractor.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// SplashScreenInteractor.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -class SplashScreenInteractor : FeatureInteractor { - var container : XCUIElement { - return otherElements["splash-screen"] - } - - var registerButton : XCUIElement { - return buttons["register"] - } - - var loginButton : XCUIElement { - return buttons["login"] - } - - func observeSplashScreen() -> SplashScreenInteractor { - waitForElement(container) - XCTAssertTrue(registerButton.exists) - XCTAssertTrue(loginButton.exists) - return self - } - - func navigateToLoginScreen() -> LoginScreenInteractor { - let loginScreen = LoginScreenInteractor() - loginButton.tapUntilElementExists(loginScreen.container) - loginScreen.waitForDisplay() - return loginScreen - } - - func navigateToRegisterScreen() -> RegistrationScreenInteractor { - let registrationScreen = RegistrationScreenInteractor() - registerButton.tapUntilElementExists(registrationScreen.container) - registrationScreen.waitForDisplay() - return registrationScreen - } -} \ No newline at end of file diff --git a/Test/EndToEnd/Code/Stream+Sync.swift b/Test/EndToEnd/Code/Stream+Sync.swift deleted file mode 100644 index 5ffcda8e67..0000000000 --- a/Test/EndToEnd/Code/Stream+Sync.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Stream+Sync.swift -// edX -// -// Created by Akiva Leffert on 3/14/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import edXCore - -extension OEXStream { - func waitForValue(_ timeout: TimeInterval = 10) -> OEXStream { - let expirationDate = NSDate(timeIntervalSinceNow: timeout) - while self.value == nil && NSDate().compare(expirationDate as Date) == .orderedAscending { - let nextCheck = NSDate().addingTimeInterval(0.1) - RunLoop.main.run(until: nextCheck as Date) - } - return self - } -} diff --git a/Test/EndToEnd/Code/TestCredentials.swift b/Test/EndToEnd/Code/TestCredentials.swift deleted file mode 100644 index 231b4e6097..0000000000 --- a/Test/EndToEnd/Code/TestCredentials.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// TestCredentials.swift -// edX -// -// Created by Akiva Leffert on 3/14/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import edXCore - -private struct Credentials { - let username : String - let password: String - let email: String -} - -private class TestCredentialManager { - - fileprivate static let shared = TestCredentialManager() - - fileprivate let config = OEXConfig(bundle: Bundle(for: TestCredentialManager.self)) - - fileprivate func freshCredentials() -> Credentials { - let password = UUID().uuidString - let email = config.endToEndConfig.emailTemplate.oex_format(withParameters: ["unique_id": UUID().asUsername]) - let username = email.components(separatedBy: "@").first! - return Credentials(username : username, password: password, email: email) - } - - fileprivate lazy var defaultCredentials: Credentials = { - let credentials = self.freshCredentials() - self.registerUser(credentials) - return credentials - }() - - func registerUser(_ credentials: Credentials) { - let networkManager = NetworkManager(authorizationDataProvider: nil, credentialProvider: nil, baseURL: config.apiHostURL()!, cache: MockResponseCache()) - let body = [ - "email": credentials.email, - "username": credentials.username, - "password": credentials.password, - "name": "Test Person", - "honor_code": "true", - "terms_of_service": "true" - ] - let registrationRequest = RegistrationAPI.registrationRequest(fields: body) - let result = networkManager.streamForRequest(registrationRequest).waitForValue() - assert(result.value != nil, "failed to register user") - } -} - -class TestCredentials { - fileprivate let credentials : Credentials - - enum `Type` { - case fresh // Credentials without an existing account - case `default` // Standard test credentials. Have an account and registered for at least one course - } - - init(type: Type = .default) { - switch type { - case .fresh: - credentials = TestCredentialManager.shared.freshCredentials() - case .default: - credentials = TestCredentialManager.shared.defaultCredentials - } - } - - var username: String { return credentials.username } - var password: String { return credentials.password } - var email: String { return credentials.email } -} diff --git a/Test/EndToEnd/Code/XCUIElement+Helpers.swift b/Test/EndToEnd/Code/XCUIElement+Helpers.swift deleted file mode 100644 index 3fffb780d7..0000000000 --- a/Test/EndToEnd/Code/XCUIElement+Helpers.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// XCUIElement+Helpers.swift -// edX -// -// Created by Akiva Leffert on 3/8/16. -// Copyright © 2016 edX. All rights reserved. -// - -import Foundation -import XCTest - -extension XCUIElement { - - ///Removes any current text in the field before typing in the new value - /// - Parameter text: the text to enter into the field - func clearAndEnterText(_ text: String) -> Void { - - self.tap() - - if let stringValue = self.value as? String { - let deleteString = stringValue.map { _ in "\u{8}" }.joined(separator: "") - if deleteString.count > 0 { - self.typeText(deleteString) - } - } - - self.typeText(text) - } - /// Sometimes the first tap doesn't take, possibly due to a timing issue around userInteractionEnabled. - /// Tap in a loop until it works - func tapUntilElementExists(_ element : XCUIElement) { - while(!element.exists) { - self.tap() - if(!element.exists) { - sleep(1) - } - } - } -} diff --git a/edX.xcodeproj/project.pbxproj b/edX.xcodeproj/project.pbxproj index 8315656f69..7181327029 100644 --- a/edX.xcodeproj/project.pbxproj +++ b/edX.xcodeproj/project.pbxproj @@ -246,7 +246,6 @@ 6960892D1D53935500EE66DD /* courseCertificate@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6960892A1D53935500EE66DD /* courseCertificate@3x.png */; }; 6975C4BD1E42085300AF014D /* TranscriptParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6975C4BC1E42085300AF014D /* TranscriptParserTests.swift */; }; 697652261D9BA7C80031FF8B /* OEXColorsDataFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 697652251D9BA7C80031FF8B /* OEXColorsDataFactory.swift */; }; - 697B5A011D92D9CD002C3ABD /* TestCredentials.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775391321C973CEC00FA959C /* TestCredentials.swift */; }; 697B5A021D92DA17002C3ABD /* RegistrationAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775391831CA0600700FA959C /* RegistrationAPITests.swift */; }; 697B5A031D92DA2F002C3ABD /* RegistrationAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775391471C97A70700FA959C /* RegistrationAPI.swift */; }; 697B5A091D92DB3F002C3ABD /* RegistrationFormAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 697B5A081D92DB3F002C3ABD /* RegistrationFormAPI.swift */; }; @@ -396,9 +395,6 @@ 77503E981B2F53C300C47229 /* StreamTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77503E971B2F53C300C47229 /* StreamTests.swift */; }; 77509D941BE1710200B10CD3 /* TZStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77509D8F1BE1710200B10CD3 /* TZStackView.swift */; }; 77509D981BE1916600B10CD3 /* UserProfileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77509D971BE1916600B10CD3 /* UserProfileManager.swift */; }; - 7753912A1C9234F300FA959C /* MockResponseCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648A11C91EB4900B6740D /* MockResponseCache.swift */; }; - 7753912F1C973ADA00FA959C /* NSUUID+Username.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7753912E1C973ADA00FA959C /* NSUUID+Username.swift */; }; - 775391311C973CBE00FA959C /* Stream+Sync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775391301C973CBE00FA959C /* Stream+Sync.swift */; }; 7753913C1C97579000FA959C /* PersistentResponseCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7753913B1C97579000FA959C /* PersistentResponseCacheTests.swift */; }; 7753913E1C9758A300FA959C /* Result+Assertions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7753913D1C9758A300FA959C /* Result+Assertions.swift */; }; 7753913F1C9758D400FA959C /* XCTestCase+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 773B1D471B1F814200B861DF /* XCTestCase+Async.swift */; }; @@ -407,8 +403,6 @@ 775391451C9760BD00FA959C /* NSString+OEXCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 775391431C9760BD00FA959C /* NSString+OEXCrypto.m */; }; 775391461C9763D000FA959C /* Result+Assertions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7753913D1C9758A300FA959C /* Result+Assertions.swift */; }; 7753914B1C98A16600FA959C /* VideoBlockViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 775391491C98A15100FA959C /* VideoBlockViewControllerTests.swift */; }; - 7753914E1C98B6FA00FA959C /* RegistrationScreenInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7753914C1C98B6CA00FA959C /* RegistrationScreenInteractor.swift */; }; - 775391501C98B7C500FA959C /* RegisterFeatureTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7753914F1C98B7C500FA959C /* RegisterFeatureTestCase.swift */; }; 77542CD61CB6A398006CA428 /* JSON+Formatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77542CD51CB6A398006CA428 /* JSON+Formatting.swift */; }; 77542CD81CB6A3AA006CA428 /* BadgesAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77542CD71CB6A3AA006CA428 /* BadgesAPITests.swift */; }; 77542CDB1CB6A463006CA428 /* OEXMetaClassHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 77542CDA1CB6A463006CA428 /* OEXMetaClassHelpers.m */; }; @@ -549,18 +543,7 @@ 77E648261C90DE0200B6740D /* NSBundle+OEXConveniences.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E648241C90DE0200B6740D /* NSBundle+OEXConveniences.h */; settings = {ATTRIBUTES = (Public, ); }; }; 77E648271C90DE0200B6740D /* NSBundle+OEXConveniences.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E648251C90DE0200B6740D /* NSBundle+OEXConveniences.m */; }; 77E6482A1C90DE5000B6740D /* NSString+OEXFormattingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E648291C90DE5000B6740D /* NSString+OEXFormattingTests.m */; }; - 77E6484A1C91024C00B6740D /* AppInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E6483D1C91024C00B6740D /* AppInteractor.swift */; }; - 77E6484B1C91024C00B6740D /* AppLaunchInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E6483E1C91024C00B6740D /* AppLaunchInteractor.swift */; }; - 77E6484C1C91024C00B6740D /* EndToEndConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E6483F1C91024C00B6740D /* EndToEndConfig.swift */; }; - 77E6484D1C91024C00B6740D /* EnrolledCoursesInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648401C91024C00B6740D /* EnrolledCoursesInteractor.swift */; }; - 77E6484E1C91024C00B6740D /* FeatureTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648411C91024C00B6740D /* FeatureTestCase.swift */; }; - 77E6484F1C91024C00B6740D /* LoginFeatureTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648421C91024C00B6740D /* LoginFeatureTestCase.swift */; }; - 77E648501C91024C00B6740D /* LoginScreenInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648431C91024C00B6740D /* LoginScreenInteractor.swift */; }; - 77E648511C91024C00B6740D /* SplashScreenInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648441C91024C00B6740D /* SplashScreenInteractor.swift */; }; - 77E648521C91024C00B6740D /* XCUIElement+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648451C91024C00B6740D /* XCUIElement+Helpers.swift */; }; 77E648551C91137800B6740D /* JSON+ReadFromFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EACF3291BE0C92C0019130E /* JSON+ReadFromFile.swift */; }; - 77E648561C91137C00B6740D /* JSON+ReadFromFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EACF3291BE0C92C0019130E /* JSON+ReadFromFile.swift */; }; - 77E648571C9114F600B6740D /* XCTestCase+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 773B1D471B1F814200B861DF /* XCTestCase+Async.swift */; }; 77E648591C91235A00B6740D /* OEXConfig+AppFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77E648581C91235A00B6740D /* OEXConfig+AppFeatures.swift */; }; 77E648601C91274700B6740D /* OEXConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E6485C1C91273F00B6740D /* OEXConfig.h */; settings = {ATTRIBUTES = (Public, ); }; }; 77E648611C91274E00B6740D /* OEXConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E6485D1C91273F00B6740D /* OEXConfig.m */; }; @@ -796,7 +779,6 @@ E04848361D000DD600BE00E1 /* PostsViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E04848351D000DD600BE00E1 /* PostsViewControllerTests.swift */; }; E04A85A0282E6BB600CF0962 /* Localizable-2.strings in Resources */ = {isa = PBXBuildFile; fileRef = E04A85A2282E6BB600CF0962 /* Localizable-2.strings */; }; E04A93291F13846B00D4615D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E04A932B1F13846B00D4615D /* InfoPlist.strings */; }; - E04F56861E9E0A5B0088C65E /* DiscoveryConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7742F8DC1C3C979D009E555A /* DiscoveryConfig.swift */; }; E0514DE8285C4F7900D645E0 /* RobotoMono-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E0514DE4285C4F7800D645E0 /* RobotoMono-SemiBold.ttf */; }; E0514DE9285C4F7900D645E0 /* RobotoMono-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E0514DE5285C4F7800D645E0 /* RobotoMono-Regular.ttf */; }; E0514DEA285C4F7900D645E0 /* RobotoMono-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E0514DE6285C4F7900D645E0 /* RobotoMono-Bold.ttf */; }; @@ -811,9 +793,6 @@ E07107931C7591360004B76C /* DiscussionHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07107921C7591360004B76C /* DiscussionHelper.swift */; }; E076A5C21C7DB624008A99C6 /* DiscussionResponsesDataController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E076A5C11C7DB624008A99C6 /* DiscussionResponsesDataController.swift */; }; E07FE7551EC47FD60049A10A /* WhatsNewDataModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07FE7541EC47FD60049A10A /* WhatsNewDataModelTests.swift */; }; - E0816D7D1CBE35CE00818769 /* NavigationDrawerInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0816D781CBE356E00818769 /* NavigationDrawerInteractor.swift */; }; - E0816D7E1CBE35D300818769 /* FindCoursesInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0816D771CBE356E00818769 /* FindCoursesInteractor.swift */; }; - E0816D7F1CBE35DA00818769 /* FindCoursesTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0816D7B1CBE358900818769 /* FindCoursesTestCase.swift */; }; E082D60325C0070800C94C9A /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E082D60225C0070700C94C9A /* Photos.framework */; }; E08863F31F209B9C0009A06D /* DateFormatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = E08863F21F209B9C0009A06D /* DateFormatting.swift */; }; E08A008B1CF7546200F92DE7 /* DiscussionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E08A008A1CF7546200F92DE7 /* DiscussionModel.swift */; }; @@ -879,13 +858,6 @@ remoteGlobalIDString = 77E6478D1C90C10300B6740D; remoteInfo = "edX-core"; }; - 77E648351C91016300B6740D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BECB7B031924C0C3009C77F1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = BECB7B0A1924C0C3009C77F1; - remoteInfo = edX; - }; BECB7B311924C0C3009C77F1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BECB7B031924C0C3009C77F1 /* Project object */; @@ -1410,9 +1382,6 @@ 77503E971B2F53C300C47229 /* StreamTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StreamTests.swift; sourceTree = ""; }; 77509D8F1BE1710200B10CD3 /* TZStackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TZStackView.swift; sourceTree = ""; }; 77509D971BE1916600B10CD3 /* UserProfileManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserProfileManager.swift; sourceTree = ""; }; - 7753912E1C973ADA00FA959C /* NSUUID+Username.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSUUID+Username.swift"; sourceTree = ""; }; - 775391301C973CBE00FA959C /* Stream+Sync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Stream+Sync.swift"; sourceTree = ""; }; - 775391321C973CEC00FA959C /* TestCredentials.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCredentials.swift; sourceTree = ""; }; 7753913B1C97579000FA959C /* PersistentResponseCacheTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PersistentResponseCacheTests.swift; path = Source/Core/Test/Code/PersistentResponseCacheTests.swift; sourceTree = SOURCE_ROOT; }; 7753913D1C9758A300FA959C /* Result+Assertions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Result+Assertions.swift"; path = "Source/Core/Test/Code/Result+Assertions.swift"; sourceTree = SOURCE_ROOT; }; 775391401C97593B00FA959C /* NetworkManager+InterceptionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NetworkManager+InterceptionTests.swift"; sourceTree = ""; }; @@ -1420,8 +1389,6 @@ 775391431C9760BD00FA959C /* NSString+OEXCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+OEXCrypto.m"; path = "Source/Core/Code/NSString+OEXCrypto.m"; sourceTree = SOURCE_ROOT; }; 775391471C97A70700FA959C /* RegistrationAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RegistrationAPI.swift; path = Source/Core/Code/RegistrationAPI.swift; sourceTree = SOURCE_ROOT; }; 775391491C98A15100FA959C /* VideoBlockViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoBlockViewControllerTests.swift; sourceTree = ""; }; - 7753914C1C98B6CA00FA959C /* RegistrationScreenInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegistrationScreenInteractor.swift; sourceTree = ""; }; - 7753914F1C98B7C500FA959C /* RegisterFeatureTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RegisterFeatureTestCase.swift; sourceTree = ""; }; 775391831CA0600700FA959C /* RegistrationAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RegistrationAPITests.swift; path = Source/Core/Test/Code/RegistrationAPITests.swift; sourceTree = SOURCE_ROOT; }; 77542CD51CB6A398006CA428 /* JSON+Formatting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "JSON+Formatting.swift"; path = "Source/Core/Code/JSON+Formatting.swift"; sourceTree = SOURCE_ROOT; }; 77542CD71CB6A3AA006CA428 /* BadgesAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BadgesAPITests.swift; path = Source/Core/Test/Code/BadgesAPITests.swift; sourceTree = SOURCE_ROOT; }; @@ -1592,16 +1559,6 @@ 77E648251C90DE0200B6740D /* NSBundle+OEXConveniences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSBundle+OEXConveniences.m"; path = "Source/Core/Code/NSBundle+OEXConveniences.m"; sourceTree = SOURCE_ROOT; }; 77E648281C90DE4700B6740D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Core/Test/SupportingFiles/Info.plist; sourceTree = SOURCE_ROOT; }; 77E648291C90DE5000B6740D /* NSString+OEXFormattingTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+OEXFormattingTests.m"; path = "Source/Core/Test/Code/NSString+OEXFormattingTests.m"; sourceTree = SOURCE_ROOT; }; - 77E648301C91016300B6740D /* EndToEndTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EndToEndTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 77E6483D1C91024C00B6740D /* AppInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppInteractor.swift; sourceTree = ""; }; - 77E6483E1C91024C00B6740D /* AppLaunchInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppLaunchInteractor.swift; sourceTree = ""; }; - 77E6483F1C91024C00B6740D /* EndToEndConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EndToEndConfig.swift; sourceTree = ""; }; - 77E648401C91024C00B6740D /* EnrolledCoursesInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnrolledCoursesInteractor.swift; sourceTree = ""; }; - 77E648411C91024C00B6740D /* FeatureTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeatureTestCase.swift; sourceTree = ""; }; - 77E648421C91024C00B6740D /* LoginFeatureTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginFeatureTestCase.swift; sourceTree = ""; }; - 77E648431C91024C00B6740D /* LoginScreenInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginScreenInteractor.swift; sourceTree = ""; }; - 77E648441C91024C00B6740D /* SplashScreenInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreenInteractor.swift; sourceTree = ""; }; - 77E648451C91024C00B6740D /* XCUIElement+Helpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "XCUIElement+Helpers.swift"; sourceTree = ""; }; 77E648581C91235A00B6740D /* OEXConfig+AppFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OEXConfig+AppFeatures.swift"; sourceTree = ""; }; 77E6485C1C91273F00B6740D /* OEXConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OEXConfig.h; path = Source/Core/Code/OEXConfig.h; sourceTree = SOURCE_ROOT; }; 77E6485D1C91273F00B6740D /* OEXConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OEXConfig.m; path = Source/Core/Code/OEXConfig.m; sourceTree = SOURCE_ROOT; }; @@ -1954,9 +1911,6 @@ E07107921C7591360004B76C /* DiscussionHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscussionHelper.swift; sourceTree = ""; }; E076A5C11C7DB624008A99C6 /* DiscussionResponsesDataController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscussionResponsesDataController.swift; sourceTree = ""; }; E07FE7541EC47FD60049A10A /* WhatsNewDataModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhatsNewDataModelTests.swift; sourceTree = ""; }; - E0816D771CBE356E00818769 /* FindCoursesInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FindCoursesInteractor.swift; sourceTree = ""; }; - E0816D781CBE356E00818769 /* NavigationDrawerInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationDrawerInteractor.swift; sourceTree = ""; }; - E0816D7B1CBE358900818769 /* FindCoursesTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FindCoursesTestCase.swift; sourceTree = ""; }; E082D60225C0070700C94C9A /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; E08863F21F209B9C0009A06D /* DateFormatting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatting.swift; sourceTree = SOURCE_ROOT; }; E08A008A1CF7546200F92DE7 /* DiscussionModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscussionModel.swift; sourceTree = ""; }; @@ -2039,13 +1993,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 77E6482D1C91016300B6740D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; BECB7B081924C0C3009C77F1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -2750,51 +2697,6 @@ name = Network; sourceTree = ""; }; - 775391361C9740F600FA959C /* Library Additions */ = { - isa = PBXGroup; - children = ( - 7753912E1C973ADA00FA959C /* NSUUID+Username.swift */, - 775391301C973CBE00FA959C /* Stream+Sync.swift */, - 77E648451C91024C00B6740D /* XCUIElement+Helpers.swift */, - ); - name = "Library Additions"; - sourceTree = ""; - }; - 775391371C9741BA00FA959C /* Interactors */ = { - isa = PBXGroup; - children = ( - E0816D771CBE356E00818769 /* FindCoursesInteractor.swift */, - E0816D781CBE356E00818769 /* NavigationDrawerInteractor.swift */, - 7753914C1C98B6CA00FA959C /* RegistrationScreenInteractor.swift */, - 77E6483D1C91024C00B6740D /* AppInteractor.swift */, - 77E6483E1C91024C00B6740D /* AppLaunchInteractor.swift */, - 77E648401C91024C00B6740D /* EnrolledCoursesInteractor.swift */, - 77E648431C91024C00B6740D /* LoginScreenInteractor.swift */, - 77E648441C91024C00B6740D /* SplashScreenInteractor.swift */, - ); - name = Interactors; - sourceTree = ""; - }; - 775391381C9741C700FA959C /* Test Cases */ = { - isa = PBXGroup; - children = ( - E0816D7B1CBE358900818769 /* FindCoursesTestCase.swift */, - 77E648411C91024C00B6740D /* FeatureTestCase.swift */, - 77E648421C91024C00B6740D /* LoginFeatureTestCase.swift */, - 7753914F1C98B7C500FA959C /* RegisterFeatureTestCase.swift */, - ); - name = "Test Cases"; - sourceTree = ""; - }; - 775391391C9741D500FA959C /* Helpers */ = { - isa = PBXGroup; - children = ( - 775391321C973CEC00FA959C /* TestCredentials.swift */, - 77E6483F1C91024C00B6740D /* EndToEndConfig.swift */, - ); - name = Helpers; - sourceTree = ""; - }; 7753913A1C97576100FA959C /* Tests */ = { isa = PBXGroup; children = ( @@ -3171,34 +3073,6 @@ path = Source/Core/SupportingFiles; sourceTree = SOURCE_ROOT; }; - 77E6483B1C91024C00B6740D /* EndToEnd */ = { - isa = PBXGroup; - children = ( - 77E6483C1C91024C00B6740D /* Code */, - 77E648461C91024C00B6740D /* Supporting Files */, - ); - name = EndToEnd; - path = Test/EndToEnd; - sourceTree = ""; - }; - 77E6483C1C91024C00B6740D /* Code */ = { - isa = PBXGroup; - children = ( - 775391361C9740F600FA959C /* Library Additions */, - 775391371C9741BA00FA959C /* Interactors */, - 775391391C9741D500FA959C /* Helpers */, - 775391381C9741C700FA959C /* Test Cases */, - ); - path = Code; - sourceTree = ""; - }; - 77E648461C91024C00B6740D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - path = "Supporting Files"; - sourceTree = ""; - }; 77E648621C91275500B6740D /* Code */ = { isa = PBXGroup; children = ( @@ -3224,7 +3098,6 @@ children = ( 77124FDA1CA5A706002DA012 /* SessionUsernameProviderTests.swift */, 77E648721C912E4E00B6740D /* Shared Helpers */, - 77E6483B1C91024C00B6740D /* EndToEnd */, BECB7B331924C0C3009C77F1 /* Unit Tests */, ); name = Tests; @@ -3695,7 +3568,6 @@ BECB7B2C1924C0C3009C77F1 /* edXTests.xctest */, 77E6478E1C90C10300B6740D /* edXCore.framework */, 77E647971C90C10300B6740D /* edXCoreTests.xctest */, - 77E648301C91016300B6740D /* EndToEndTests.xctest */, ); name = Products; sourceTree = ""; @@ -4239,25 +4111,6 @@ productReference = 77E647971C90C10300B6740D /* edXCoreTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 77E6482F1C91016300B6740D /* EndToEndTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 77E6483A1C91016300B6740D /* Build configuration list for PBXNativeTarget "EndToEndTests" */; - buildPhases = ( - 77E6482C1C91016300B6740D /* Sources */, - 77E6482D1C91016300B6740D /* Frameworks */, - 77E6482E1C91016300B6740D /* Resources */, - 7753912C1C9397CE00FA959C /* Copy config */, - ); - buildRules = ( - ); - dependencies = ( - 77E648361C91016300B6740D /* PBXTargetDependency */, - ); - name = EndToEndTests; - productName = EndToEndTests; - productReference = 77E648301C91016300B6740D /* EndToEndTests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; BECB7B0A1924C0C3009C77F1 /* edX */ = { isa = PBXNativeTarget; buildConfigurationList = BECB7B3D1924C0C3009C77F1 /* Build configuration list for PBXNativeTarget "edX" */; @@ -4327,12 +4180,6 @@ LastSwiftMigration = 1030; ProvisioningStyle = Automatic; }; - 77E6482F1C91016300B6740D = { - CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 1030; - ProvisioningStyle = Automatic; - TestTargetID = BECB7B0A1924C0C3009C77F1; - }; BECB7B0A1924C0C3009C77F1 = { LastSwiftMigration = 1030; ProvisioningStyle = Automatic; @@ -4389,7 +4236,6 @@ BECB7B2B1924C0C3009C77F1 /* edXTests */, 77E6478D1C90C10300B6740D /* edXCore */, 77E647961C90C10300B6740D /* edXCoreTests */, - 77E6482F1C91016300B6740D /* EndToEndTests */, ); }; /* End PBXProject section */ @@ -4409,13 +4255,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 77E6482E1C91016300B6740D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; BECB7B091924C0C3009C77F1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -4647,20 +4486,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-edXTests/Pods-edXTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 7753912C1C9397CE00FA959C /* Copy config */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy config"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# copy config from app bundle to test bundle\n\nSOURCE=$BUILT_PRODUCTS_DIR/$TEST_TARGET_NAME.app/config.plist\nDEST=$TARGET_BUILD_DIR/$WRAPPER_NAME/config.plist\ncp $SOURCE $DEST\n"; - }; 77BDD65E1A44BD7300EA2A9C /* Process Config */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -4840,34 +4665,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 77E6482C1C91016300B6740D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 775391311C973CBE00FA959C /* Stream+Sync.swift in Sources */, - E0816D7F1CBE35DA00818769 /* FindCoursesTestCase.swift in Sources */, - 697B5A011D92D9CD002C3ABD /* TestCredentials.swift in Sources */, - E0816D7E1CBE35D300818769 /* FindCoursesInteractor.swift in Sources */, - 77E6484F1C91024C00B6740D /* LoginFeatureTestCase.swift in Sources */, - 77E648521C91024C00B6740D /* XCUIElement+Helpers.swift in Sources */, - 77E6484C1C91024C00B6740D /* EndToEndConfig.swift in Sources */, - 77E648571C9114F600B6740D /* XCTestCase+Async.swift in Sources */, - 77E648561C91137C00B6740D /* JSON+ReadFromFile.swift in Sources */, - 77E6484A1C91024C00B6740D /* AppInteractor.swift in Sources */, - 77E6484E1C91024C00B6740D /* FeatureTestCase.swift in Sources */, - 7753912F1C973ADA00FA959C /* NSUUID+Username.swift in Sources */, - 77E6484D1C91024C00B6740D /* EnrolledCoursesInteractor.swift in Sources */, - E04F56861E9E0A5B0088C65E /* DiscoveryConfig.swift in Sources */, - 77E648511C91024C00B6740D /* SplashScreenInteractor.swift in Sources */, - 77E648501C91024C00B6740D /* LoginScreenInteractor.swift in Sources */, - 77E6484B1C91024C00B6740D /* AppLaunchInteractor.swift in Sources */, - E0816D7D1CBE35CE00818769 /* NavigationDrawerInteractor.swift in Sources */, - 775391501C98B7C500FA959C /* RegisterFeatureTestCase.swift in Sources */, - 7753912A1C9234F300FA959C /* MockResponseCache.swift in Sources */, - 7753914E1C98B6FA00FA959C /* RegistrationScreenInteractor.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; BECB7B071924C0C3009C77F1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -5509,11 +5306,6 @@ target = 77E6478D1C90C10300B6740D /* edXCore */; targetProxy = 77E647A11C90C10300B6740D /* PBXContainerItemProxy */; }; - 77E648361C91016300B6740D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BECB7B0A1924C0C3009C77F1 /* edX */; - targetProxy = 77E648351C91016300B6740D /* PBXContainerItemProxy */; - }; BECB7B321924C0C3009C77F1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = BECB7B0A1924C0C3009C77F1 /* edX */; @@ -6126,7 +5918,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = 57UCUYGPA2; + DEVELOPMENT_TEAM = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; HEADER_SEARCH_PATHS = ""; @@ -6146,96 +5938,6 @@ }; name = Profile; }; - 77E648371C91016300B6740D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = ""; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ""; - "HEADER_SEARCH_PATHS[arch=*]" = "\"$(SRCROOT)/Pods/Headers/\"/**"; - INFOPLIST_FILE = Test/EndToEnd/SupportingFiles/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = org.edx.EndToEndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TEST_TARGET_NAME = edX; - USES_XCTRUNNER = YES; - }; - name = Debug; - }; - 77E648381C91016300B6740D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ""; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ""; - "HEADER_SEARCH_PATHS[arch=*]" = "\"$(SRCROOT)/Pods/Headers/\"/**"; - INFOPLIST_FILE = Test/EndToEnd/SupportingFiles/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.edx.EndToEndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - TEST_TARGET_NAME = edX; - USES_XCTRUNNER = YES; - }; - name = Release; - }; - 77E648391C91016300B6740D /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ""; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ""; - "HEADER_SEARCH_PATHS[arch=*]" = "\"$(SRCROOT)/Pods/Headers/\"/**"; - INFOPLIST_FILE = Test/EndToEnd/SupportingFiles/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = org.edx.EndToEndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - TEST_TARGET_NAME = edX; - USES_XCTRUNNER = YES; - }; - name = Profile; - }; BECB7B3B1924C0C3009C77F1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -6696,16 +6398,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 77E6483A1C91016300B6740D /* Build configuration list for PBXNativeTarget "EndToEndTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 77E648371C91016300B6740D /* Debug */, - 77E648381C91016300B6740D /* Release */, - 77E648391C91016300B6740D /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; BECB7B061924C0C3009C77F1 /* Build configuration list for PBXProject "edX" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/edX.xcodeproj/xcshareddata/xcschemes/EndToEndTests.xcscheme b/edX.xcodeproj/xcshareddata/xcschemes/EndToEndTests.xcscheme deleted file mode 100644 index dbf98ff3b1..0000000000 --- a/edX.xcodeproj/xcshareddata/xcschemes/EndToEndTests.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -