Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from TCA-Team/max/snapshot
Browse files Browse the repository at this point in the history
Add Fastlane Snapshot
  • Loading branch information
kordianbruck authored Mar 23, 2017
2 parents 8865ab0 + 9e35e63 commit c028d8d
Show file tree
Hide file tree
Showing 9 changed files with 477 additions and 6 deletions.
45 changes: 45 additions & 0 deletions AutomatedScreenshots/AutomatedScreenshots.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// AutomatedScreenshots.swift
// AutomatedScreenshots
//
// Created by Max Muth on 09.03.17.
// Copyright © 2017 LS1 TUM. All rights reserved.
//

import XCTest

//@testable import Campus

class ScreenshotUITests: XCTestCase {

let app = XCUIApplication()

override func setUp() {
super.setUp()
setupSnapshot(app)
app.launch()
}

override func tearDown() {
super.tearDown()
}

func testAllScreenshots() {
snapshot("0_CardsOverview")
app.tabBars.buttons["More"].tap()
snapshot("1_MoreOverview")
let tablesQuery = app.tables
tablesQuery.staticTexts["Calendar"].tap()
snapshot("2_Calendar")
app.navigationBars.buttons.element(boundBy: 0).tap()
tablesQuery.staticTexts["My Lectures"].tap()
snapshot("3_MyLectures")
app.navigationBars["My Lectures"].buttons["More"].tap()
tablesQuery.staticTexts["Room Finder"].tap()
app.navigationBars["Campus.SearchView"].textFields["Search"].typeText("hs1")
sleep(10)
snapshot("4_RoomFinderSearch")
XCTAssert(true)
}

}
22 changes: 22 additions & 0 deletions AutomatedScreenshots/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ You're welcome to contribute to this app! Just check it out and open PR's for yo
- We have SonarQube to check the code quality at [https://sonarqube.com/dashboard?id=de.tum.in.www.Tum-Campus-App](https://sonarqube.com/dashboard?id=de.tum.in.www.Tum-Campus-App)
- If a PR is coming from a branch from this repository (and not a fork), our [@TCA-Bot](https://travis-ci.org/TCA-Team/iOS) will review the changes automatically
- Use [ci skip] in the commit message if you know there is no need to run a build on Travis
- You can use _fastlane snapshot_ to automatically generate localized screenshots. If you want to add a view, just record a UI Test and add it to the AutomatedScreenshots.swift test

## Disclaimer:
This is not an official app of the Technische Universität München. There's no support or warranty (you can however send us an email [[email protected]](mailto:[email protected]) or open an issue here on Github). The app is developed by students and for students, so use it at your own risk. We try to keep your data safe with only using TUMonline tokens and not saving your password. For further information you should have a look at our privacy policy and the terms and conditions of the lecture chat.
Expand Down
126 changes: 125 additions & 1 deletion TUM Campus App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
504C292C1E2BBB9C007583E2 /* MovieTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504C292B1E2BBB9C007583E2 /* MovieTests.swift */; };
50AFC9861E6C8ECF00E7886A /* Pods_Campus.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50AFC9851E6C8ECF00E7886A /* Pods_Campus.framework */; };
50D1535A1E6DEAC9005EF930 /* MockReceiver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50D153591E6DEAC9005EF930 /* MockReceiver.swift */; };
50F798E11E71615400FA4E49 /* AutomatedScreenshots.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50F798E01E71615400FA4E49 /* AutomatedScreenshots.swift */; };
50F798E91E71618400FA4E49 /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50F798E81E71618400FA4E49 /* SnapshotHelper.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -136,6 +138,13 @@
remoteGlobalIDString = 0E424F441BE16DBD00B5DFCB;
remoteInfo = Campus;
};
50DDC48F1E71703C0021894E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0E424F3D1BE16DBD00B5DFCB /* Project object */;
proxyType = 1;
remoteGlobalIDString = 0E424F441BE16DBD00B5DFCB;
remoteInfo = Campus;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -259,6 +268,10 @@
504C292D1E2BBB9C007583E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50AFC9851E6C8ECF00E7886A /* Pods_Campus.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pods_Campus.framework; path = "../../Library/Developer/Xcode/DerivedData/Campus_App-abdlonhukuicsjbpypswdmfoclts/Build/Products/Debug-iphonesimulator/Pods_Campus.framework"; sourceTree = "<group>"; };
50D153591E6DEAC9005EF930 /* MockReceiver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockReceiver.swift; sourceTree = "<group>"; };
50F798DE1E71615400FA4E49 /* AutomatedScreenshots.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AutomatedScreenshots.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
50F798E01E71615400FA4E49 /* AutomatedScreenshots.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomatedScreenshots.swift; sourceTree = "<group>"; };
50F798E21E71615400FA4E49 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
50F798E81E71618400FA4E49 /* SnapshotHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SnapshotHelper.swift; path = ../fastlane/SnapshotHelper.swift; sourceTree = "<group>"; };
B036FEAD3E1DFC9E65802F03 /* Pods-Campus.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Campus.release.xcconfig"; path = "Pods/Target Support Files/Pods-Campus/Pods-Campus.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -285,6 +298,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
50F798DB1E71615400FA4E49 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand Down Expand Up @@ -338,6 +358,7 @@
0E424F471BE16DBE00B5DFCB /* TUM Campus App */,
0E424F5C1BE16DBE00B5DFCB /* TUM Campus AppUITests */,
504C292A1E2BBB9C007583E2 /* TUM Campus AppUnitTests */,
50F798DF1E71615400FA4E49 /* AutomatedScreenshots */,
0E424F461BE16DBE00B5DFCB /* Products */,
F378FBA46D95A7D54F58A390 /* Pods */,
50AFC9841E6C8ECE00E7886A /* Frameworks */,
Expand All @@ -350,6 +371,7 @@
0E424F451BE16DBE00B5DFCB /* Campus.app */,
0E424F591BE16DBE00B5DFCB /* TUM Campus AppUITests.xctest */,
504C29291E2BBB9C007583E2 /* TUM Campus AppUnitTests.xctest */,
50F798DE1E71615400FA4E49 /* AutomatedScreenshots.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -654,6 +676,16 @@
name = Frameworks;
sourceTree = "<group>";
};
50F798DF1E71615400FA4E49 /* AutomatedScreenshots */ = {
isa = PBXGroup;
children = (
50F798E81E71618400FA4E49 /* SnapshotHelper.swift */,
50F798E01E71615400FA4E49 /* AutomatedScreenshots.swift */,
50F798E21E71615400FA4E49 /* Info.plist */,
);
path = AutomatedScreenshots;
sourceTree = "<group>";
};
F378FBA46D95A7D54F58A390 /* Pods */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -722,13 +754,31 @@
productReference = 504C29291E2BBB9C007583E2 /* TUM Campus AppUnitTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
50F798DD1E71615400FA4E49 /* AutomatedScreenshots */ = {
isa = PBXNativeTarget;
buildConfigurationList = 50F798E51E71615400FA4E49 /* Build configuration list for PBXNativeTarget "AutomatedScreenshots" */;
buildPhases = (
50F798DA1E71615400FA4E49 /* Sources */,
50F798DB1E71615400FA4E49 /* Frameworks */,
50F798DC1E71615400FA4E49 /* Resources */,
);
buildRules = (
);
dependencies = (
50DDC4901E71703C0021894E /* PBXTargetDependency */,
);
name = AutomatedScreenshots;
productName = AutomatedScreenshots;
productReference = 50F798DE1E71615400FA4E49 /* AutomatedScreenshots.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
0E424F3D1BE16DBD00B5DFCB /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0810;
ORGANIZATIONNAME = "LS1 TUM";
TargetAttributes = {
Expand All @@ -748,6 +798,11 @@
ProvisioningStyle = Automatic;
TestTargetID = 0E424F441BE16DBD00B5DFCB;
};
50F798DD1E71615400FA4E49 = {
CreatedOnToolsVersion = 8.2.1;
ProvisioningStyle = Automatic;
TestTargetID = 0E424F441BE16DBD00B5DFCB;
};
};
};
buildConfigurationList = 0E424F401BE16DBD00B5DFCB /* Build configuration list for PBXProject "TUM Campus App" */;
Expand All @@ -766,6 +821,7 @@
0E424F441BE16DBD00B5DFCB /* Campus */,
0E424F581BE16DBE00B5DFCB /* TUM Campus AppUITests */,
504C29281E2BBB9C007583E2 /* TUM Campus AppUnitTests */,
50F798DD1E71615400FA4E49 /* AutomatedScreenshots */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -810,6 +866,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
50F798DC1E71615400FA4E49 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -975,6 +1038,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
50F798DA1E71615400FA4E49 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
50F798E91E71618400FA4E49 /* SnapshotHelper.swift in Sources */,
50F798E11E71615400FA4E49 /* AutomatedScreenshots.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand All @@ -988,6 +1060,11 @@
target = 0E424F441BE16DBD00B5DFCB /* Campus */;
targetProxy = 504C292E1E2BBB9C007583E2 /* PBXContainerItemProxy */;
};
50DDC4901E71703C0021894E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 0E424F441BE16DBD00B5DFCB /* Campus */;
targetProxy = 50DDC48F1E71703C0021894E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down Expand Up @@ -1020,6 +1097,7 @@
/* Begin XCBuildConfiguration section */
0E424F601BE16DBE00B5DFCB /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 44B8D8B1367F8E0398040486 /* Pods-Campus.debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down Expand Up @@ -1163,6 +1241,7 @@
};
0E424F661BE16DBE00B5DFCB /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 44B8D8B1367F8E0398040486 /* Pods-Campus.debug.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "TUM Campus AppUITests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand All @@ -1177,6 +1256,7 @@
};
0E424F671BE16DBE00B5DFCB /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B036FEAD3E1DFC9E65802F03 /* Pods-Campus.release.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "TUM Campus AppUITests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down Expand Up @@ -1209,6 +1289,7 @@
};
504C29311E2BBB9C007583E2 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B036FEAD3E1DFC9E65802F03 /* Pods-Campus.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
Expand All @@ -1222,6 +1303,40 @@
};
name = Release;
};
50F798E61E71615400FA4E49 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 44B8D8B1367F8E0398040486 /* Pods-Campus.debug.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
INFOPLIST_FILE = AutomatedScreenshots/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AutomatedScreenshots.AutomatedScreenshots";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = Campus;
};
name = Debug;
};
50F798E71E71615400FA4E49 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B036FEAD3E1DFC9E65802F03 /* Pods-Campus.release.xcconfig */;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
INFOPLIST_FILE = AutomatedScreenshots/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
PRODUCT_BUNDLE_IDENTIFIER = "de.tum.in.www1.ios15.TUM-Campus-AutomatedScreenshots.AutomatedScreenshots";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 3.0;
TEST_TARGET_NAME = Campus;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -1261,6 +1376,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
50F798E51E71615400FA4E49 /* Build configuration list for PBXNativeTarget "AutomatedScreenshots" */ = {
isa = XCConfigurationList;
buildConfigurations = (
50F798E61E71615400FA4E49 /* Debug */,
50F798E71E71615400FA4E49 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0E424F3D1BE16DBD00B5DFCB /* Project object */;
Expand Down
Loading

0 comments on commit c028d8d

Please sign in to comment.