Ifd_Mobile 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/Ifd_Mobile/lib_web.rb +118 -106
  3. data/lib/Ifd_Mobile/methods/IFD_Assertion.rb +44 -44
  4. data/lib/Ifd_Mobile/methods/core.rb +243 -231
  5. data/lib/Ifd_Mobile/methods/lib_var.rb +53 -53
  6. data/lib/Ifd_Mobile/version.rb +5 -5
  7. data/project/Gemfile +9 -9
  8. data/project/apps/TestApp/Test App 2/GestureTestViewController.h +18 -18
  9. data/project/apps/TestApp/Test App 2/GestureTestViewController.m +48 -48
  10. data/project/apps/TestApp/Test App 2/GestureTestViewController.xib +46 -46
  11. data/project/apps/TestApp/Test App 2/MyViewControllerViewController.h +42 -42
  12. data/project/apps/TestApp/Test App 2/MyViewControllerViewController.m +193 -193
  13. data/project/apps/TestApp/Test App 2/TA2AppDelegate.h +28 -28
  14. data/project/apps/TestApp/Test App 2/TA2AppDelegate.m +85 -85
  15. data/project/apps/TestApp/Test App 2/TestApp-Info.plist +40 -40
  16. data/project/apps/TestApp/Test App 2/TestApp-Prefix.pch +29 -29
  17. data/project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings +21 -21
  18. data/project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib +175 -175
  19. data/project/apps/TestApp/Test App 2/main.m +31 -31
  20. data/project/apps/TestApp/TestApp.xcodeproj/project.pbxproj +336 -336
  21. data/project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
  22. data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/TestApp.xcscheme +88 -88
  23. data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/xcschememanagement.plist +22 -22
  24. data/project/features/android/Android_test1.feature +14 -14
  25. data/project/features/android/Android_test2.feature +14 -14
  26. data/project/features/iOS/iOS_test.feature +15 -17
  27. data/project/features/step_definitions/lib_steps/PolyClaim_homepage.rb +2 -2
  28. data/project/features/step_definitions/lib_steps/PolyClaim_loginpage.rb +3 -3
  29. data/project/features/step_definitions/repositories/android_ob_test.rb +9 -9
  30. data/project/features/step_definitions/repositories/ios_ob_test.rb +6 -6
  31. data/project/features/support/env.rb +36 -36
  32. data/project/features/support/hooks.rb +8 -8
  33. data/project/features/support/project_env.rb +42 -42
  34. metadata +40 -40
@@ -1,7 +1,7 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "self:TestApp.xcodeproj">
6
- </FileRef>
7
- </Workspace>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:TestApp.xcodeproj">
6
+ </FileRef>
7
+ </Workspace>
@@ -1,88 +1,88 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "0630"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
18
- BuildableName = "TestApp.app"
19
- BlueprintName = "TestApp"
20
- ReferencedContainer = "container:TestApp.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28
- shouldUseLaunchSchemeArgsEnv = "YES"
29
- buildConfiguration = "Debug">
30
- <Testables>
31
- </Testables>
32
- <MacroExpansion>
33
- <BuildableReference
34
- BuildableIdentifier = "primary"
35
- BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
36
- BuildableName = "TestApp.app"
37
- BlueprintName = "TestApp"
38
- ReferencedContainer = "container:TestApp.xcodeproj">
39
- </BuildableReference>
40
- </MacroExpansion>
41
- </TestAction>
42
- <LaunchAction
43
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45
- launchStyle = "0"
46
- useCustomWorkingDirectory = "NO"
47
- buildConfiguration = "Debug"
48
- ignoresPersistentStateOnLaunch = "NO"
49
- debugDocumentVersioning = "YES"
50
- allowLocationSimulation = "YES">
51
- <BuildableProductRunnable
52
- runnableDebuggingMode = "0">
53
- <BuildableReference
54
- BuildableIdentifier = "primary"
55
- BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
56
- BuildableName = "TestApp.app"
57
- BlueprintName = "TestApp"
58
- ReferencedContainer = "container:TestApp.xcodeproj">
59
- </BuildableReference>
60
- </BuildableProductRunnable>
61
- <AdditionalOptions>
62
- </AdditionalOptions>
63
- </LaunchAction>
64
- <ProfileAction
65
- shouldUseLaunchSchemeArgsEnv = "YES"
66
- savedToolIdentifier = ""
67
- useCustomWorkingDirectory = "NO"
68
- buildConfiguration = "Release"
69
- debugDocumentVersioning = "YES">
70
- <BuildableProductRunnable
71
- runnableDebuggingMode = "0">
72
- <BuildableReference
73
- BuildableIdentifier = "primary"
74
- BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
75
- BuildableName = "TestApp.app"
76
- BlueprintName = "TestApp"
77
- ReferencedContainer = "container:TestApp.xcodeproj">
78
- </BuildableReference>
79
- </BuildableProductRunnable>
80
- </ProfileAction>
81
- <AnalyzeAction
82
- buildConfiguration = "Debug">
83
- </AnalyzeAction>
84
- <ArchiveAction
85
- buildConfiguration = "Release"
86
- revealArchiveInOrganizer = "YES">
87
- </ArchiveAction>
88
- </Scheme>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "0630"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
18
+ BuildableName = "TestApp.app"
19
+ BlueprintName = "TestApp"
20
+ ReferencedContainer = "container:TestApp.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28
+ shouldUseLaunchSchemeArgsEnv = "YES"
29
+ buildConfiguration = "Debug">
30
+ <Testables>
31
+ </Testables>
32
+ <MacroExpansion>
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
36
+ BuildableName = "TestApp.app"
37
+ BlueprintName = "TestApp"
38
+ ReferencedContainer = "container:TestApp.xcodeproj">
39
+ </BuildableReference>
40
+ </MacroExpansion>
41
+ </TestAction>
42
+ <LaunchAction
43
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45
+ launchStyle = "0"
46
+ useCustomWorkingDirectory = "NO"
47
+ buildConfiguration = "Debug"
48
+ ignoresPersistentStateOnLaunch = "NO"
49
+ debugDocumentVersioning = "YES"
50
+ allowLocationSimulation = "YES">
51
+ <BuildableProductRunnable
52
+ runnableDebuggingMode = "0">
53
+ <BuildableReference
54
+ BuildableIdentifier = "primary"
55
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
56
+ BuildableName = "TestApp.app"
57
+ BlueprintName = "TestApp"
58
+ ReferencedContainer = "container:TestApp.xcodeproj">
59
+ </BuildableReference>
60
+ </BuildableProductRunnable>
61
+ <AdditionalOptions>
62
+ </AdditionalOptions>
63
+ </LaunchAction>
64
+ <ProfileAction
65
+ shouldUseLaunchSchemeArgsEnv = "YES"
66
+ savedToolIdentifier = ""
67
+ useCustomWorkingDirectory = "NO"
68
+ buildConfiguration = "Release"
69
+ debugDocumentVersioning = "YES">
70
+ <BuildableProductRunnable
71
+ runnableDebuggingMode = "0">
72
+ <BuildableReference
73
+ BuildableIdentifier = "primary"
74
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
75
+ BuildableName = "TestApp.app"
76
+ BlueprintName = "TestApp"
77
+ ReferencedContainer = "container:TestApp.xcodeproj">
78
+ </BuildableReference>
79
+ </BuildableProductRunnable>
80
+ </ProfileAction>
81
+ <AnalyzeAction
82
+ buildConfiguration = "Debug">
83
+ </AnalyzeAction>
84
+ <ArchiveAction
85
+ buildConfiguration = "Release"
86
+ revealArchiveInOrganizer = "YES">
87
+ </ArchiveAction>
88
+ </Scheme>
@@ -1,22 +1,22 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>TestApp.xcscheme</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- <key>SuppressBuildableAutocreation</key>
14
- <dict>
15
- <key>3647AE0D15CA0082006F70D6</key>
16
- <dict>
17
- <key>primary</key>
18
- <true/>
19
- </dict>
20
- </dict>
21
- </dict>
22
- </plist>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>TestApp.xcscheme</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ <key>SuppressBuildableAutocreation</key>
14
+ <dict>
15
+ <key>3647AE0D15CA0082006F70D6</key>
16
+ <dict>
17
+ <key>primary</key>
18
+ <true/>
19
+ </dict>
20
+ </dict>
21
+ </dict>
22
+ </plist>
@@ -1,15 +1,15 @@
1
- @android_demo1
2
- Feature: Demo
3
-
4
- As a Android user
5
- I want to PolyClaim app
6
- So that I can make the test for Demo section
7
-
8
- Scenario: Navigate
9
- Given I have App running with appium
10
- When I click on Sign In button
11
- # And I input text "11122233" on "poly_DigiD"
12
- # And I input text "12345" on "poly_Password"
13
- # And I click on Login
14
- # Then I verify property "poly_ErrorMessage" with "name" has value "Invalid credentials."
1
+ @android_demo1
2
+ Feature: Demo
3
+
4
+ As a Android user
5
+ I want to PolyClaim app
6
+ So that I can make the test for Demo section
7
+
8
+ Scenario: Navigate
9
+ Given I have App running with appium
10
+ When I click on Sign In button
11
+ # And I input text "11122233" on "poly_DigiD"
12
+ # And I input text "12345" on "poly_Password"
13
+ # And I click on Login
14
+ # Then I verify property "poly_ErrorMessage" with "name" has value "Invalid credentials."
15
15
  # * I test "poly_DigiD"
@@ -1,14 +1,14 @@
1
- @android_demo2
2
- Feature: Demo
3
-
4
- As a Android user
5
- I want to PolyClaim app
6
- So that I can make the test for Demo section
7
-
8
- Scenario: Navigate
9
- Given I have App running with appium
10
- When I click on Sign In button
11
- And I input text "111222333" on "poly_DigiD"
12
- And I input text "12345" on "poly_Password"
13
- And I click on Login
14
- Then I verify property "poly_Overview_header" with "name" has value "Declaration overview"
1
+ @android_demo2
2
+ Feature: Demo
3
+
4
+ As a Android user
5
+ I want to PolyClaim app
6
+ So that I can make the test for Demo section
7
+
8
+ Scenario: Navigate
9
+ Given I have App running with appium
10
+ When I click on Sign In button
11
+ And I input text "111222333" on "poly_DigiD"
12
+ And I input text "12345" on "poly_Password"
13
+ And I click on Login
14
+ Then I verify property "poly_Overview_header" with "name" has value "Declaration overview"
@@ -1,17 +1,15 @@
1
- Feature: Demo
2
-
3
- As a iPhone user
4
- I want to Demo app
5
- So that I can make the test for Demo section
6
- @ios_demo
7
- Scenario: Navigate
8
- Given I have App running with appium
9
- When I input text "4" on "textbox1"
10
- # And I input text "4" on "textbox2"
11
- # And I click on "button_sum"
12
- # Then I verify property "result" with "value" has value "8"
13
- # When I click on "show_alert"
14
- # Then I verify property "alert title" with "name" has value "Cool title"
15
- # And I accept alert
16
- * I rotate device to landscape
17
- * I rotate device to portrait
1
+ Feature: Demo
2
+
3
+ As a iPhone user
4
+ I want to Demo app
5
+ So that I can make the test for Demo section
6
+ @ios_demo
7
+ Scenario: Navigate
8
+ Given I have App running with appium
9
+ When I input text "4" on "textbox1"
10
+ And I input text "4" on "textbox2"
11
+ And I click on "button_sum"
12
+ Then I verify property "result" with "value" has value "8"
13
+ When I click on "show_alert"
14
+ Then I verify property "alert title" with "name" has value "Cool title"
15
+ And I accept alert
@@ -1,3 +1,3 @@
1
- And /^I click on Sign In button$/ do
2
- step %{I click on element with x: "520", y: "1150"}
1
+ And /^I click on Sign In button$/ do
2
+ step %{I click on element with x: "520", y: "1150"}
3
3
  end
@@ -1,4 +1,4 @@
1
- And /^I click on Login$/ do
2
- step %{I hide the keyboard}
3
- step %{I click on "poly_Login"}
1
+ And /^I click on Login$/ do
2
+ step %{I hide the keyboard}
3
+ step %{I click on "poly_Login"}
4
4
  end
@@ -1,9 +1,9 @@
1
- # All elements on Welcome page
2
- $_RP_OBJECT['poly_SignIn_home'] = {xpath: '//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
3
- #All elements on Login page
4
- $_RP_OBJECT['poly_DigiD'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[6]/android.view.View[2]/android.widget.EditText[1]'}
5
- $_RP_OBJECT['poly_Password'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[7]/android.view.View[2]/android.widget.EditText[1]'}
6
- $_RP_OBJECT['poly_Login'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.widget.Button[1]'}
7
- $_RP_OBJECT['poly_ErrorMessage'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[10]'}
8
- #All elements on Declaration Overview page
9
- $_RP_OBJECT['poly_Overview_header'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
1
+ # All elements on Welcome page
2
+ $_RP_OBJECT['poly_SignIn_home'] = {xpath: '//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
3
+ #All elements on Login page
4
+ $_RP_OBJECT['poly_DigiD'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[6]/android.view.View[2]/android.widget.EditText[1]'}
5
+ $_RP_OBJECT['poly_Password'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[7]/android.view.View[2]/android.widget.EditText[1]'}
6
+ $_RP_OBJECT['poly_Login'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.widget.Button[1]'}
7
+ $_RP_OBJECT['poly_ErrorMessage'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[10]'}
8
+ #All elements on Declaration Overview page
9
+ $_RP_OBJECT['poly_Overview_header'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
@@ -1,6 +1,6 @@
1
- $_RP_OBJECT['textbox1'] = {name: 'TextField1'}
2
- $_RP_OBJECT['textbox2'] = {name: 'TextField2'}
3
- $_RP_OBJECT['button_sum'] = {name: 'ComputeSumButton'}
4
- $_RP_OBJECT['result'] = {name: 'Answer'}
5
- $_RP_OBJECT['show_alert'] = {name: 'show alert'}
6
- $_RP_OBJECT['alert title'] = {name: 'Cool title'}
1
+ $_RP_OBJECT['textbox1'] = {name: 'TextField1'}
2
+ $_RP_OBJECT['textbox2'] = {name: 'TextField2'}
3
+ $_RP_OBJECT['button_sum'] = {name: 'ComputeSumButton'}
4
+ $_RP_OBJECT['result'] = {name: 'Answer'}
5
+ $_RP_OBJECT['show_alert'] = {name: 'show alert'}
6
+ $_RP_OBJECT['alert title'] = {name: 'Cool title'}
@@ -1,37 +1,37 @@
1
- require 'rspec/expectations'
2
- require 'appium_lib'
3
- require 'cucumber/ast'
4
- require 'Ifd_Mobile'
5
- # Define global variables
6
- $current_dir = File.expand_path(File.dirname(__FILE__))
7
- $base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
8
- require "#{$current_dir}/project_env.rb"
9
-
10
- # Create a custom World class so we don't pollute `Object` with Appium methods
11
- class AppiumWorld
12
- end
13
-
14
- case $_CONFIG['DeviceName'].upcase.to_sym
15
- when :IOS
16
- Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
17
- when :ANDROID
18
- Appium::Driver.new({caps: capabilities_android, appium_lib: {server_url: server_url}}).start_driver
19
- else
20
- raise "\nERROR: *** Invalid Device Name!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
21
- end
22
-
23
- Appium.promote_appium_methods AppiumWorld
24
-
25
- World do
26
- AppiumWorld.new
27
- end
28
-
29
- def selenium
30
- return $driver
31
- end
32
-
33
- # Before { $driver.start_driver }
34
- #
35
- # After do
36
- # $driver.driver_quit
1
+ require 'rspec/expectations'
2
+ require 'appium_lib'
3
+ require 'cucumber/ast'
4
+ require 'Ifd_Mobile'
5
+ # Define global variables
6
+ $current_dir = File.expand_path(File.dirname(__FILE__))
7
+ $base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
8
+ require "#{$current_dir}/project_env.rb"
9
+
10
+ # Create a custom World class so we don't pollute `Object` with Appium methods
11
+ class AppiumWorld
12
+ end
13
+
14
+ case $_CONFIG['DeviceName'].upcase.to_sym
15
+ when :IOS
16
+ Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
17
+ when :ANDROID
18
+ Appium::Driver.new({caps: capabilities_android, appium_lib: {server_url: server_url}}).start_driver
19
+ else
20
+ raise "\nERROR: *** Invalid Device Name!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
21
+ end
22
+
23
+ Appium.promote_appium_methods AppiumWorld
24
+
25
+ World do
26
+ AppiumWorld.new
27
+ end
28
+
29
+ def selenium
30
+ return $driver
31
+ end
32
+
33
+ # Before { $driver.start_driver }
34
+ #
35
+ # After do
36
+ # $driver.driver_quit
37
37
  # end