From 202d5f4009eae12e349828c14893774d9e7ef6ca Mon Sep 17 00:00:00 2001 From: kenji Date: Thu, 10 Oct 2019 08:57:50 +0200 Subject: [PATCH] Improve attachments naming --- CHANGELOG.md | 12 +++++++++++- SwiftiumTestingKit.xcodeproj/project.pbxproj | 8 ++++---- SwiftiumTestingKit/STKSolo.swift | 4 ++++ SwiftiumTestingKit/XCTestCaseExtension.swift | 8 ++++++-- tag-release.sh | 2 -- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0383ad0..82b571d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/SwiftiumTestingKit.xcodeproj/project.pbxproj b/SwiftiumTestingKit.xcodeproj/project.pbxproj index e925403..df16a83 100644 --- a/SwiftiumTestingKit.xcodeproj/project.pbxproj +++ b/SwiftiumTestingKit.xcodeproj/project.pbxproj @@ -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; @@ -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; @@ -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; @@ -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; diff --git a/SwiftiumTestingKit/STKSolo.swift b/SwiftiumTestingKit/STKSolo.swift index bd54075..1f292af 100644 --- a/SwiftiumTestingKit/STKSolo.swift +++ b/SwiftiumTestingKit/STKSolo.swift @@ -185,6 +185,10 @@ public class STKSolo: NSObject { return textBecameInvalid } + public func waitForAnimationsToFinish() { + testActor.waitForAnimationsToFinish() + } + public func waitForever() { testActor.wait(forTimeInterval: internalTimeToWaitForever) } diff --git a/SwiftiumTestingKit/XCTestCaseExtension.swift b/SwiftiumTestingKit/XCTestCaseExtension.swift index ae32f2c..3a7452c 100644 --- a/SwiftiumTestingKit/XCTestCaseExtension.swift +++ b/SwiftiumTestingKit/XCTestCaseExtension.swift @@ -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) } } diff --git a/tag-release.sh b/tag-release.sh index cf8bcd7..a5f6c17 100755 --- a/tag-release.sh +++ b/tag-release.sh @@ -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"