Skip to content

Commit

Permalink
Improve attachments naming
Browse files Browse the repository at this point in the history
  • Loading branch information
kenji21 committed Oct 10, 2019
1 parent e5ac65b commit 202d5f4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/openium/SwiftiumTestingKit/compare/latest...HEAD)
## [Unreleased](https://github.com/openium/SwiftiumTestingKit/compare/v0.6.0...HEAD)
### Added

### Changed

### Removed

## [0.6.0](https://github.com/openium/SwiftiumTestingKit/compare/v0.5.0...v0.4.0)
### Added
Add ability for solo to waitForAnimationsToFinish

### Changed
attachScreenshot now prefixes the attachment name with Locale identifier and device name

### Removed
latest tag "update" and force push making clones not able to fetch smoothly

## [0.5.0](https://github.com/openium/SwiftiumTestingKit/compare/v0.5.0...v0.4.0)
### Added
Add default carrier name
Expand Down
8 changes: 4 additions & 4 deletions SwiftiumTestingKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = QH6KR5PAQ7;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -560,7 +560,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.6.0;
PRODUCT_BUNDLE_IDENTIFIER = fr.openium.SwiftiumTestingKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand All @@ -576,7 +576,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = QH6KR5PAQ7;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -594,7 +594,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 0.5.0;
MARKETING_VERSION = 0.6.0;
PRODUCT_BUNDLE_IDENTIFIER = fr.openium.SwiftiumTestingKit;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
4 changes: 4 additions & 0 deletions SwiftiumTestingKit/STKSolo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ public class STKSolo: NSObject {
return textBecameInvalid
}

public func waitForAnimationsToFinish() {
testActor.waitForAnimationsToFinish()
}

public func waitForever() {
testActor.wait(forTimeInterval: internalTimeToWaitForever)
}
Expand Down
8 changes: 6 additions & 2 deletions SwiftiumTestingKit/XCTestCaseExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@ extension XCTestCase {
add(attachment)
}

public func attachScreenshot(name: String) {
public func attachScreenshot(name: String, useLangPhonePrefix: Bool = true, separator: String = "_") {
let image = XCUIScreen.main.screenshot().image
let attachment = XCTAttachment(image: image, quality: .medium)
attachment.lifetime = .keepAlways
attachment.name = name
if useLangPhonePrefix {
attachment.name = NSLocale.current.identifier + separator + UIDevice.current.name + separator + name
} else {
attachment.name = name
}
add(attachment)
}
}
Expand Down
2 changes: 0 additions & 2 deletions tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ carthage build --no-skip-current && carthage archive SwiftiumTestingKit
echo "Creating tag $TAG and pushing it to github"
git tag $TAG
git push --tags
git tag -f latest
git push --tags -f

echo "You can now upload SwiftiumTestingKit.framework.zip and edit release notes from https://github.com/openium/SwiftiumTestingKit/releases/edit/$TAG"

0 comments on commit 202d5f4

Please sign in to comment.