xcfit 7.0.0 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fac080f3eb50a2486f051e9ab0d30ac3a5ee9d0
4
- data.tar.gz: 1d79d62dc1c11dd2b6b1b0e13a4b5d0fa371b4c2
3
+ metadata.gz: 1207b749be43407e7c47581b12b637eb987ccbab
4
+ data.tar.gz: a9bb3ab211bbf2c283f358df56f80f6aefb44c04
5
5
  SHA512:
6
- metadata.gz: fa01d01805938559f821aa8edf096d2dc560027c88456fee421a5a2d6a9b2d90a4ee8a4da6c7f90f59f290222bb0686931b2ea40de0b8b6ddafa600508093965
7
- data.tar.gz: 7e1eb1dd77a7cdfb4627ce85434c7c6ee2136b934fd7a267abdbdc92820a1131978fe1541c09be2d3aec2d333fc277a7142a948fabc8afd993ac31a555845196
6
+ metadata.gz: 9e2acab3067f1507936b242bf7e774c0408c31d42a9ad53b2f0c756180a09a9db9c914d3a0911cef4929ab06ca3b3117a31afe8d43bfbb5a755743aa7cfeb7f0
7
+ data.tar.gz: d1701a40b1f459a13dfbccf5201b5b82dee44b7462c99c12fff5fa3e2bc971c45b7b271adc1aaac399bdde455605f8401e6059a3fcd6b6df49218504f945ef68
data/.swift-version CHANGED
@@ -1 +1 @@
1
- 4.0
1
+ 4.1
data/README.md CHANGED
@@ -13,7 +13,6 @@
13
13
  ------------------------------------------------------
14
14
  [![CI Status](http://img.shields.io/travis/Shashikant86/XCFit.svg?style=flat&label=travisci)](https://travis-ci.org/Shashikant86/XCFit)
15
15
  [![BuddyBuild](https://dashboard.buddybuild.com/api/statusImage?appID=59b9a96f1efa9600015eb138&branch=master&build=latest)](https://dashboard.buddybuild.com/apps/59b9a96f1efa9600015eb138/build/latest?branch=master)
16
- [![Nevercode build status](https://app.nevercode.io/api/projects/eaabd63a-fc8b-445c-887f-ae7ff0b41631/workflows/80607373-32fe-45ea-9c94-a713ceb02e97/status_badge.svg?branch=Swift31)](https://app.nevercode.io/#/project/eaabd63a-fc8b-445c-887f-ae7ff0b41631/workflow/80607373-32fe-45ea-9c94-a713ceb02e97/latestBuild?branch=Swift31)
17
16
  ![BitRise](https://www.bitrise.io/app/c8bfbd4aa57ec9fc/status.svg?token=y5G14HOmhB_aAxVWMkHxsw&branch=master)
18
17
  [![CircleCI](https://circleci.com/gh/Shashikant86/XCFit/tree/master.svg?style=shield)](https://circleci.com/gh/Shashikant86/XCFit/tree/master)
19
18
 
@@ -37,7 +36,7 @@
37
36
  * [XCFit Features](#xcfit-features)
38
37
  * [Tech & Software Requirements](#tech--software-requirements)
39
38
  * [Installation](#installation)
40
- * [XCFit Swift Framework](#xcfit-swift-framework--xcui-page-object-pattern--pre-defined-steps)
39
+ * [XCFit Swift Framework](#xcfit-swift-framework--protocol-oriented-bdd)
41
40
  * [Setting Cucumberish BDD Scenarios in Xcode](#setting-cucumberish-bdd-scenarios-in-xcode)
42
41
  * [Advide on using pre-defined BDD Steps](#advise-on-using-pre-defines-bdd-style-steps)
43
42
  * [Fitnesse for iOS: Acceptance/Contract Tests](#fitnesse-for-ios-acceptancecontract-tests)
@@ -212,10 +211,24 @@ Now, we can fetch and build Carthage Dependencies using following command.
212
211
 
213
212
  $ carthage update --platform iOS
214
213
 
215
- This will checkout and build XCFit frameworks then we can manually drag those frameworks in the `Build Phases` of the test targets. This is explained in details in the later section.
214
+ This will checkout and build XCFit frameworks then we can manually drag those frameworks in the `Build Phases` of the test targets. This will create 'Carthage' directory with built framework. We need to manually drag and drop this to our XCUIPoMTest' target build settings. On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
215
+
216
+
217
+ /usr/local/bin/carthage copy-frameworks
218
+
219
+ and add the paths to the frameworks you want to use under “Input Files”, e.g.:
220
+
221
+
222
+ $(SRCROOT)/Carthage/Build/iOS/XCFit.framework
223
+
224
+
225
+
226
+ You can choose any of the above method but Cocoapods is easy and less manual.
216
227
 
217
228
  ### Swift Package Manager
218
229
 
230
+ #### ==== Please Note that Swift Package Manager doesn't support iOS at the moment =====
231
+
219
232
  XCFit can be installed with Swift Package Manager however Swift Package Manager isn't officially supported for iOS so we can use XCFit only for the standalone Libraries. We need to create `Package.swift` file with following content.
220
233
  ```
221
234
  import PackageDescription
@@ -276,82 +289,15 @@ This is a base class for all the Test. Once XCFit imported then we can extend th
276
289
 
277
290
  ## Getting XCFit Framework for pre-defined BDD Style steps
278
291
 
279
- ### Cocoapods
280
- You can get XCFit Framework easily. Create `Podfile` and add specific dependency for the target
292
+ You can get XCFit Framework easily with methods mentioned above. If you choose decided to use Cocoapods then create `Podfile` and add specific dependency for the target
281
293
  Cocoapods is more automated than Carthage. We can create `Podfile` and add specific dependency for the target or we can use XCFit template `Podfile` using command.
282
294
 
283
295
  $ xcfit setup_xcfit_podfile
284
296
 
285
- This will create a Podfile, you need to replace your target names as required.
286
-
287
- * **Swift 4**
288
-
289
- We can create `Podfile` and add specific dependency for the target
290
-
291
- ```ruby
292
- target '$_YOUR__TARGET' do
293
- pod 'XCFit', :git => 'https://github.com/Shashikant86/XCFit.git', :tag => '7.0.0'
294
- end
295
- ```
296
- This will doownload Cocoapods supporting Swift 3.0.2
297
-
298
- * **Swift 3.1**
299
-
300
- You can get version 6.0.0 to work with Swift 3.1
301
-
302
- ```ruby
303
- target '$_YOUR__TARGET' do
304
- pod 'XCFit', :git => 'https://github.com/Shashikant86/XCFit.git', :tag => '6.0.0'
305
- end
306
- ```
307
-
308
- Now that, We need to install the framework using
309
-
310
- ```sh
311
- $ pod install
312
- ```
313
-
314
- Close existing Xcode Session and Open `.xcworkspace/`. Now in the 'testBase' class just `import XCFit` and extend the class to `XCFit` class. The predefined steps are ready to use.
315
-
316
-
317
- ### Carthage
318
-
319
- XCFit and Cucumberish can be installed as Carthage. We need to create `Cartfile` in the root of the project. Depending on which version of Swift you are using, we can use different tag
320
-
321
- * **Swift 4**
322
-
323
- Add the following to `Cartfile` to get Swift 4 compatable source
324
-
325
- github "Shashikant86/XCFit" "7.0.0"
326
-
327
-
328
- * **Swift 3.1**
329
-
330
- You can get latest tag will work with Swift 3.1 then `Cartfile` can have following
331
-
332
- github "Shashikant86/XCFit" "6.0.0"
333
-
297
+ This will create a Podfile, you need to replace your target names as required and then follow the instructions above.
334
298
 
335
- Now fetch dependency and build XCFit using.
336
299
 
337
300
 
338
- $ carthage update --platform iOS
339
-
340
-
341
- This will create 'Carthage' directory with built framework. We need to manually drag and drop this to our XCUIPoMTest' target build settings. On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:
342
-
343
-
344
- /usr/local/bin/carthage copy-frameworks
345
-
346
- and add the paths to the frameworks you want to use under “Input Files”, e.g.:
347
-
348
-
349
- $(SRCROOT)/Carthage/Build/iOS/XCFit.framework
350
-
351
-
352
-
353
-
354
- You can choose any of the above method but Cocoapods is easy and less manual.
355
301
  ## Import XCFit & Use Predefined Steps
356
302
 
357
303
  There are some predefined XCFit steps we can use by importing `XCFit` and extending out test class to `XCFit`. There are plenty of Pre-Defined BDD Style Steps available [here](https://github.com/Shashikant86/XCFit/blob/master/Pre-Defined_Steps/XCFit_Predefined_Steps.md). You can use predefined steps wherever they make sense however it's fairly easy to write your own.
@@ -360,13 +306,12 @@ There are some predefined XCFit steps we can use by importing `XCFit` and extend
360
306
 
361
307
  You can simply import `XCFit` inside the `UITestBase` class and extend it to XCFit. You can also use `FeatureSteps.swift` to implement or override some steps. You can read step by step tutorial on my blog on Protocol-Oriented BDD [here](http://shashikantjagtap.net/introducing-protocol-oriented-bdd-swift-ios-apps/)
362
308
 
363
- # Practical Demo
364
-
365
- [![Alt text](https://img.youtube.com/vi/7gqPxy6UVRw/0.jpg)](https://www.youtube.com/watch?v=7gqPxy6UVRw)
309
+ # Practical Demo: Watch Youtube Video
366
310
 
311
+ [![Alt text](https://img.youtube.com/vi/m2u0CGiwV_8/0.jpg)](https://www.youtube.com/watch?v=m2u0CGiwV_8)
367
312
 
368
313
 
369
- ** =====I would strongly recommend to use Protocol Oriented Approach for BDD and you can ignore the below mentioned patterns ===== **
314
+ ### I would strongly recommend to use Protocol Oriented Approach for BDD and you can ignore the below mentioned patterns
370
315
 
371
316
 
372
317
  ---
@@ -721,7 +666,7 @@ You can clone the existing repo which has a demo app we can run Unit, Fitnesse a
721
666
 
722
667
 
723
668
 
724
- # Step by Step Video Demo
669
+ # Step by Step Video Demo: OLD Version
725
670
 
726
671
  You can watch step by step video demo on Youtube. Click the link below
727
672
 
data/XCFit.podspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'XCFit'
3
- s.version = '7.0.0'
3
+ s.version = '7.1.0'
4
4
  s.summary = 'Full Stack BDD for iOS and macOS Apps with Swift, Xcode using XCUITest, Cucumberish, FitNesse and friends.'
5
5
 
6
6
  s.description = <<-DESC
@@ -19,12 +19,16 @@ import XCTest
19
19
 
20
20
  enum FeatureScreen: String {
21
21
 
22
- case homeButton
22
+ case homeButton = "Home"
23
23
 
24
24
  var button: XCUIElement {
25
25
  switch self {
26
26
  case .homeButton:
27
- return XCUIApplication().buttons["homeButton"]
27
+ if UIDevice.current.userInterfaceIdiom == .pad {
28
+ return XCUIApplication().buttons["iPadHome"]
29
+ } else {
30
+ return XCUIApplication().buttons[self.rawValue]
31
+ }
28
32
  }
29
33
  }
30
34
  }
data/lib/XCFit/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module XCFit
2
- VERSION = "7.0.0"
2
+ VERSION = "7.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcfit
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant86
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-04 00:00:00.000000000 Z
11
+ date: 2018-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  requirements: []
158
158
  rubyforge_project:
159
- rubygems_version: 2.6.8
159
+ rubygems_version: 2.6.14
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: Full Stack BDD in Xcode Templates for iOS and macOS Apps with Swift, Xcode