Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 633 B After Width: | Height: | Size: 633 B |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
@ -0,0 +1,79 @@
|
||||
// Copyright © 2015 Abhishek Banthia |
||||
|
||||
@testable import Clocker |
||||
import EventKit |
||||
import XCTest |
||||
|
||||
class EventInfoTests: XCTestCase { |
||||
private let eventStore = EKEventStore() |
||||
|
||||
func testMetadataForUpcomingEventHappeningInFiveMinutes() throws { |
||||
let futureChunk = TimeChunk(seconds: 10, minutes: 5, hours: 0, days: 0, weeks: 0, months: 0, years: 0) |
||||
let mockEvent = EKEvent(eventStore: eventStore) |
||||
mockEvent.title = "Mock Title" |
||||
mockEvent.startDate = Date().add(futureChunk) |
||||
|
||||
let mockEventInfo = EventInfo(event: mockEvent, |
||||
isAllDay: false, |
||||
meetingURL: nil, |
||||
attendeStatus: .accepted) |
||||
XCTAssert(mockEventInfo.metadataForMeeting() == "in 5m", |
||||
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") |
||||
} |
||||
|
||||
func testMetadataForUpcomingEventHappeningInTenSeconds() throws { |
||||
let futureChunk = TimeChunk(seconds: 10, minutes: 0, hours: 0, days: 0, weeks: 0, months: 0, years: 0) |
||||
let mockEvent = EKEvent(eventStore: eventStore) |
||||
mockEvent.title = "Mock Title" |
||||
mockEvent.startDate = Date().add(futureChunk) |
||||
|
||||
let mockEventInfo = EventInfo(event: mockEvent, |
||||
isAllDay: false, |
||||
meetingURL: nil, |
||||
attendeStatus: .accepted) |
||||
XCTAssert(mockEventInfo.metadataForMeeting() == "in <1m", |
||||
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") |
||||
} |
||||
|
||||
func testMetadataForEventPastTwoMinutes() throws { |
||||
let pastChunk = TimeChunk(seconds: 10, minutes: 2, hours: 0, days: 0, weeks: 0, months: 0, years: 0) |
||||
let mockEvent = EKEvent(eventStore: eventStore) |
||||
mockEvent.title = "Mock Title" |
||||
mockEvent.startDate = Date().subtract(pastChunk) |
||||
|
||||
let mockEventInfo = EventInfo(event: mockEvent, |
||||
isAllDay: false, |
||||
meetingURL: nil, |
||||
attendeStatus: .accepted) |
||||
XCTAssert(mockEventInfo.metadataForMeeting() == "started +2m.", |
||||
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") |
||||
} |
||||
|
||||
func testMetadataForEventPastTenMinutes() throws { |
||||
let pastChunk = TimeChunk(seconds: 10, minutes: 10, hours: 0, days: 0, weeks: 0, months: 0, years: 0) |
||||
let mockEvent = EKEvent(eventStore: eventStore) |
||||
mockEvent.title = "Mock Title" |
||||
mockEvent.startDate = Date().subtract(pastChunk) |
||||
|
||||
let mockEventInfo = EventInfo(event: mockEvent, |
||||
isAllDay: false, |
||||
meetingURL: nil, |
||||
attendeStatus: .accepted) |
||||
XCTAssert(mockEventInfo.metadataForMeeting() == "Error", |
||||
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") |
||||
} |
||||
|
||||
func testMetadataForEventHappeningTomorrow() throws { |
||||
let pastChunk = TimeChunk(seconds: 10, minutes: 0, hours: 25, days: 0, weeks: 0, months: 0, years: 0) |
||||
let mockEvent = EKEvent(eventStore: eventStore) |
||||
mockEvent.title = "Mock Title" |
||||
mockEvent.startDate = Date().add(pastChunk) |
||||
|
||||
let mockEventInfo = EventInfo(event: mockEvent, |
||||
isAllDay: false, |
||||
meetingURL: nil, |
||||
attendeStatus: .accepted) |
||||
XCTAssert(mockEventInfo.metadataForMeeting() == "in 25h", |
||||
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") |
||||
} |
||||
} |
@ -1,7 +0,0 @@
|
||||
app_identifier "com.abhishek.Clocker" # The bundle identifier of your app |
||||
apple_id "abhishekbanthia1712@gmail.com" # Your Apple email address |
||||
|
||||
team_id "[[DEV_PORTAL_TEAM_ID]]" # Developer Portal Team ID |
||||
|
||||
# you can even provide different app identifiers, Apple IDs and team names per lane: |
||||
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md |
@ -1,73 +0,0 @@
|
||||
# Customise this file, documentation can be found here: |
||||
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs |
||||
# All available actions: https://docs.fastlane.tools/actions |
||||
# can also be listed using the `fastlane actions` command |
||||
|
||||
# Change the syntax highlighting to Ruby |
||||
# All lines starting with a # are ignored when running `fastlane` |
||||
|
||||
# If you want to automatically update fastlane if a new version is available: |
||||
# update_fastlane |
||||
|
||||
# This is the minimum version number required. |
||||
# Update this, if you use features of a newer version |
||||
fastlane_version "2.36.0" |
||||
|
||||
default_platform :ios |
||||
|
||||
platform :ios do |
||||
before_all do |
||||
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." |
||||
|
||||
|
||||
end |
||||
|
||||
desc "Runs all the tests" |
||||
lane :test do |
||||
scan |
||||
end |
||||
|
||||
desc "Submit a new Beta Build to Apple TestFlight" |
||||
desc "This will also make sure the profile is up to date" |
||||
lane :beta do |
||||
# match(type: "appstore") # more information: https://codesigning.guide |
||||
gym # Build your app - more options available |
||||
pilot |
||||
|
||||
# sh "your_script.sh" |
||||
# You can also use other beta testing services here (run `fastlane actions`) |
||||
end |
||||
|
||||
desc "Deploy a new version to the App Store" |
||||
lane :release do |
||||
# match(type: "appstore") |
||||
# snapshot |
||||
gym # Build your app - more options available |
||||
deliver(force: true) |
||||
# frameit |
||||
end |
||||
|
||||
# You can define as many lanes as you want |
||||
|
||||
after_all do |lane| |
||||
# This block is called, only if the executed lane was successful |
||||
|
||||
# slack( |
||||
# message: "Successfully deployed new App Update." |
||||
# ) |
||||
end |
||||
|
||||
error do |lane, exception| |
||||
# slack( |
||||
# message: exception.message, |
||||
# success: false |
||||
# ) |
||||
end |
||||
end |
||||
|
||||
|
||||
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md |
||||
# All available actions: https://docs.fastlane.tools/actions |
||||
|
||||
# fastlane reports which actions are used. No personal data is recorded. |
||||
# Learn more at https://github.com/fastlane/fastlane#metrics |
Before Width: | Height: | Size: 291 KiB |
Before Width: | Height: | Size: 726 KiB |
Before Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 429 KiB |
@ -1,171 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8" /> |
||||
<title>Test Results | xcpretty</title> |
||||
<style type="text/css"> |
||||
body { font-family:Avenir Next, Helvetica Neue, sans-serif; color: #4A4A4A; background-color: #F0F3FB; margin:0;} |
||||
h1 { font-weight: normal; font-size: 24px; margin: 10px 0 0 0;} |
||||
h3 { font-weight: normal; margin: 2px; font-size: 1.1em;} |
||||
header { position: fixed;width: 100%;background: rgba(249, 254, 255, 0.9);margin: 0;padding: 10px;} |
||||
header:before, header:after { content:""; display:table;} |
||||
header:after { clear:both;} |
||||
a:link { color: #A1D761;} |
||||
footer { clear: both;position: relative;z-index: 10;height: 40px;margin-top: -10px; margin-left:30px; font-size:12px;} |
||||
table { width:100%; border-collapse: collapse;} |
||||
tr td:first-child { width:7%} |
||||
.left { float: left; margin-left:30px;} |
||||
.right { float: right; margin-right: 40px; margin-top: 0; margin-bottom:0;} |
||||
.test-suite { margin: 0 0 30px 0;} |
||||
.test-suite > .heading { font-family:Menlo, Monaco, monospace; font-weight: bold; border-color: #A1D761; background-color: #B8E986; border-width: 1px;} |
||||
.test-suite.failing > .heading { border-color: #C84F5E; background-color: #E58591;} |
||||
.test-suite > .heading > .title { margin-top: 4px; margin-left: 10px;} |
||||
.tests { overflow: scroll;margin: 0 30px 0 60px;} |
||||
.test, .test-suite > .heading { height: 30px; overflow: hidden; margin: 0 30px;} |
||||
.test, .test-suite > .heading { border-width: 1px; border-collapse: collapse; border-style: solid; } |
||||
.test { margin-left: 30px; border-top:none;} |
||||
.test.failing { border-color: #C84F5E; background-color: #F4DDE0;} |
||||
.test.passing { border-color: #A1D761;} |
||||
.test.failing { background-color: #E7A1AA;} |
||||
.test.passing { background-color: #CAF59F;} |
||||
.test.failing.odd { background-color: #EEC7CC;} |
||||
.test.passing.odd { background-color: #E5FBCF;} |
||||
.details { background-color: #F4DDE0; border: 1px solid #C84F5E;} |
||||
.test .test-detail:last-child { padding-bottom: 8px;} |
||||
.test .title { float: left; font-size: 0.9em; margin-top: 8px; font-family: Menlo, Monaco, monospace;} |
||||
.test .time { float: left;margin: 4px 10px 0 20px;} |
||||
.test-detail { font-family:Menlo, Monaco, monospace; font-size: 0.9em; margin: 5px 0 5px 0px;} |
||||
.screenshots { height: auto; overflow: hidden; padding: 4px 4px 0 4px; background-color: #B8E986; border: #A1D761; border-width: 0 1px; border-style: solid; } |
||||
.screenshots.failing { border-color: #C84F5E; background-color: #E58591; } |
||||
.screenshot { max-height: 60px; float: left; transition: max-height 0.2s; margin: 0 4px 4px 0 } |
||||
.screenshot.selected { max-height: 568px; } |
||||
#test-suites { display: inline-block; width: 100%;margin-top:100px;} |
||||
#segment-bar { margin-top: 10px;margin-left: 14px;float:right;} |
||||
#segment-bar a:first-child { border-radius: 9px 0 0 9px; border-right: none;} |
||||
#segment-bar a:last-child { border-radius: 0 9px 9px 0; border-left: none;} |
||||
#segment-bar > a { color: #565656; border: 2px solid #7B7B7B; width: 80px; font-weight: bold; display:inline-block;text-align:center; font-weight: normal;} |
||||
#segment-bar > a.selected { background-color: #979797; color: #F0F3FB;} |
||||
#counters { float: left;margin: 10px;text-align: right;} |
||||
#counters h2 { font-size: 16px; font-family: Avenir, sans-serif; font-weight: lighter; display:inline;} |
||||
#counters .number { font-size: 20px;} |
||||
#fail-count { color: #D0021B; margin-left:10px;} |
||||
@media (max-width: 640px) { |
||||
h1, #counters, #segment-bar { margin: 5px auto; text-align:center;} |
||||
header, #segment-bar { width: 100%; position: relative; background:none;} |
||||
.left, .right { float:none; margin:0;} |
||||
#test-suites { margin-top: 0;} |
||||
#counters { float:none;} |
||||
} |
||||
</style> |
||||
<script type="text/javascript"> |
||||
var hide = function(element) { element.style.display = 'none';} |
||||
var show = function(element) { element.style.display = '';} |
||||
var isHidden = function(element) { return element.style.display == 'none';} |
||||
var isSelected = function(element) { return element.classList.contains("selected");} |
||||
var deselect = function(element) { return element.classList.remove("selected");} |
||||
var select = function(element) { return element.classList.add("selected");} |
||||
var toggle = function(element) { isHidden(element) ? show(element) : hide(element);}; |
||||
var toggleTests = function(heading) { toggle(heading.parentNode.children[1]);}; |
||||
var toggleDetails = function(detailClass) { |
||||
var details = document.querySelectorAll('.' + detailClass); |
||||
for (var i = details.length - 1; i >= 0; i--) { toggle(details[i]);}; |
||||
}; |
||||
var hideAll = function(collection) { |
||||
for (var i = collection.length - 1; i >= 0; i--) { hide(collection[i]); }; |
||||
} |
||||
var showAll = function(collection) { |
||||
for (var i = collection.length - 1; i >= 0; i--) { show(collection[i]); }; |
||||
} |
||||
var selectSegment = function(segment) { |
||||
if (isSelected(segment)) return; |
||||
var segments = document.querySelectorAll('#segment-bar > a'); |
||||
for (var i = segments.length - 1; i >= 0; i--) { deselect(segments[i]);}; |
||||
select(segment); |
||||
if (segment.id == "all-segment") { |
||||
showAll(document.querySelectorAll('.test-suite')); |
||||
showAll(document.querySelectorAll('.test')); |
||||
} else if (segment.id == "failing-segment") { |
||||
hideAll(document.querySelectorAll('.test.passing')); |
||||
showAll(document.querySelectorAll('.test.failing')); |
||||
hideAll(document.querySelectorAll('.test-suite.passing')); |
||||
showAll(document.querySelectorAll('.test-suite.failing')); |
||||
} else if (segment.id == "passing-segment") { |
||||
hideAll(document.querySelectorAll('.test.failing')); |
||||
showAll(document.querySelectorAll('.test.passing')); |
||||
hideAll(document.querySelectorAll('.test-suite.failing')); |
||||
showAll(document.querySelectorAll('.test-suite.passing')); |
||||
} |
||||
} |
||||
var toggleScreenshot = function(suiteName, index) { |
||||
var screenshot = document.getElementById("screenshot-" + suiteName + "-" + index); |
||||
isSelected(screenshot) ? deselect(screenshot) : select(screenshot); |
||||
} |
||||
</script> |
||||
</head> |
||||
<body> |
||||
<header> |
||||
<section class="left"> |
||||
<h1>Test Results</h1> |
||||
</section> |
||||
<section class="right"> |
||||
<section id="counters"> |
||||
<h2 id="test-count"><span class="number">3</span> tests</h2> |
||||
|
||||
</section> |
||||
<section id="segment-bar"> |
||||
<a id="all-segment" onclick="selectSegment(this);" class="selected">All</a><a id="failing-segment" onclick="selectSegment(this);">Failing</a><a id="passing-segment" onclick="selectSegment(this);">Passing</a> |
||||
</section> |
||||
</section> |
||||
</header> |
||||
<section id="test-suites"> |
||||
|
||||
|
||||
<section class="test-suite passing" id="ClockerTests"> |
||||
<section class="heading" onclick="toggleTests(this);"> |
||||
<h3 class="title">ClockerTests</h3> |
||||
</section> |
||||
<section class="tests"> |
||||
|
||||
<table> |
||||
|
||||
|
||||
<tr class="test passing " onclick="toggleDetails('testAddingPlaceToUserDefaults');"> |
||||
<td> |
||||
|
||||
<h3 class="time">0.154s</h3> |
||||
|
||||
</td> |
||||
<td><h3 class="title">testAddingPlaceToUserDefaults</h3></td> |
||||
</tr> |
||||
|
||||
|
||||
|
||||
<tr class="test passing odd" onclick="toggleDetails('testDeletingPlaceFromUserDefaults');"> |
||||
<td> |
||||
|
||||
<h3 class="time">0.002s</h3> |
||||
|
||||
</td> |
||||
<td><h3 class="title">testDeletingPlaceFromUserDefaults</h3></td> |
||||
</tr> |
||||
|
||||
|
||||
|
||||
<tr class="test passing " onclick="toggleDetails('testIfReminderIsCreated');"> |
||||
<td> |
||||
|
||||
<h3 class="time">0.022s</h3> |
||||
|
||||
</td> |
||||
<td><h3 class="title">testIfReminderIsCreated</h3></td> |
||||
</tr> |
||||
|
||||
|
||||
</table> |
||||
</section> |
||||
</section> |
||||
|
||||
</section> |
||||
<footer>Report generated with <a href="https://github.com/supermarin/xcpretty">xcpretty</a></footer> |
||||
</body> |
||||
</html> |
@ -1,8 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?> |
||||
<testsuites name='ClockerTests.xctest' tests='3' failures='0'> |
||||
<testsuite name='ClockerTests' tests='3' failures='0'> |
||||
<testcase classname='ClockerTests' name='testAddingPlaceToUserDefaults' time='0.154'/> |
||||
<testcase classname='ClockerTests' name='testDeletingPlaceFromUserDefaults' time='0.002'/> |
||||
<testcase classname='ClockerTests' name='testIfReminderIsCreated' time='0.022'/> |
||||
</testsuite> |
||||
</testsuites> |