Skip to content

Commit

Permalink
Some improvements to test suite (#229)
Browse files Browse the repository at this point in the history
* typos in JJFloatingActionButtonSpec

* add more device agnostic reference images

* run tests on iPhone 11 Pro Max with iOS 13.3

* fix circleci config

* Explicitly change to ruby 2.6
  • Loading branch information
jjochen committed Feb 28, 2020
1 parent f38d9a9 commit 4030528
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 14 deletions.
24 changes: 16 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ version: 2.1

executors:

ios13-iphone-xs-max:
ios13-iphone-11-pro-max:
macos:
xcode: 11.0.0
xcode: 11.3.1
shell: /bin/bash --login -eo pipefail
environment:
SIMULATOR_OS: 13.0
DESTINATION: platform=iOS Simulator,OS=13.0,name=iPhone 11 Pro Max
SIMULATOR: iPhone 11 Pro Max (13.0) [
SIMULATOR_OS: 13.3
DESTINATION: platform=iOS Simulator,OS=13.3,name=iPhone 11 Pro Max
SIMULATOR: iPhone 11 Pro Max (13.3) [

ios12-iphone-xs-max:
macos:
Expand Down Expand Up @@ -39,6 +39,13 @@ executors:

commands:

change-ruby:
description: Select the correct version of ruby
steps:
- run:
name: Set Ruby Version
command: echo 'chruby ruby-2.6' >> ~/.bash_profile

update-bundler:
description: Update bundler to newest version
steps:
Expand Down Expand Up @@ -131,6 +138,7 @@ commands:
setup-gems:
description: Update bundler and install gems
steps:
- change-ruby
- update-bundler
- restore-gem-cache
- bundle-install
Expand All @@ -157,8 +165,8 @@ aliases:

jobs:

build-and-test-ios13-iphonexsmax:
executor: ios13-iphone-xs-max
build-and-test-ios13-iphone11promax:
executor: ios13-iphone-11-pro-max
steps:
- checkout
- setup-gems
Expand Down Expand Up @@ -248,7 +256,7 @@ workflows:
jobs:
- lint-podspec
- swiftlint
- build-and-test-ios13-iphonexsmax
- build-and-test-ios13-iphone11promax
- build-and-test-ios12-iphonexsmax
- build-documentation
- push-podspec: *filter-version-tags-only
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.5
ruby-2.6
10 changes: 5 additions & 5 deletions Example/Tests/JJFloatingActionButtonSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class JJFloatingActionButtonSpec: QuickSpec {
expect(superview) == snapshot()
}

it("items look correct highlighted with custom highligted color") {
it("items look correct highlighted with custom highlighted color") {
let item = actionButton.items[0]
item.circleView.highlightedColor = .purple
item.isHighlighted = true
Expand All @@ -255,7 +255,7 @@ class JJFloatingActionButtonSpec: QuickSpec {
}

it("closes") {
expect(actionButton.buttonState).toNotEventually(equal(JJFloatingActionButtonState.closed))
expect(actionButton.buttonState).toEventually(equal(JJFloatingActionButtonState.closed))
}
}

Expand All @@ -265,7 +265,7 @@ class JJFloatingActionButtonSpec: QuickSpec {
}

it("closes") {
expect(actionButton.buttonState).toNotEventually(equal(JJFloatingActionButtonState.closed))
expect(actionButton.buttonState).toEventually(equal(JJFloatingActionButtonState.closed))
}

it("does not perform action") {
Expand All @@ -280,7 +280,7 @@ class JJFloatingActionButtonSpec: QuickSpec {
}

it("closes") {
expect(actionButton.buttonState).toNotEventually(equal(JJFloatingActionButtonState.closed))
expect(actionButton.buttonState).toEventually(equal(JJFloatingActionButtonState.closed))
}

it("performs action") {
Expand Down Expand Up @@ -415,7 +415,7 @@ class JJFloatingActionButtonSpec: QuickSpec {
}
}

context("and is opened with handle single action direclty disabled") {
context("and is opened with handle single action directly disabled") {
beforeEach {
actionButton.handleSingleActionDirectly = false
actionButton.open(animated: false)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 4030528

Please sign in to comment.