Skip to content

Commit 5c53ebf

Browse files
author
Natalia-Hristova
committed
fix test to workaround NSLogging
1 parent 38705d4 commit 5c53ebf

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

data/issues/nativescript-cli-3650/main-page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ function pageLoaded(args) {
66
console.log("Page loaded " + ++count + " times.");
77

88
var objTC = new TestClass();
9-
objTC.sayHey();
9+
console.log(objTC.sayHey());
1010
}
1111
exports.pageLoaded = pageLoaded;

data/plugins/sample-plugin/src/platforms/ios/src/TestClass.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
@interface TestClass : NSObject
44

5-
- (void)sayHey;
5+
- (NSString *)sayHey;
66

77
@end

data/plugins/sample-plugin/src/platforms/ios/src/TestClass.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
@implementation TestClass
44

5-
- (void)sayHey{
6-
NSLog(@"Hey!");
5+
- (NSString *)sayHey{
6+
return @"Hey!";
77
}
88

99
@end

tests/simulator/run_ios_tests.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@ def test_300_tns_run_ios_just_launch_and_incremental_builds(self):
351351
device_id=self.SIMULATOR_ID, expected_image='livesync-hello-world_js_css_xml')
352352

353353
def test_315_tns_run_ios_change_appResources_check_per_platform(self):
354-
#https://github.com/NativeScript/nativescript-cli/pull/3619
354+
# https://github.com/NativeScript/nativescript-cli/pull/3619
355355
output = Tns.run_ios(attributes={'--path': self.app_name, '--emulator': ''}, wait=False, assert_success=False)
356356
strings = ['Project successfully built', 'Successfully installed on device with identifier', self.SIMULATOR_ID]
357357
Tns.wait_for_log(log_file=output, string_list=strings, timeout=150, check_interval=10)
358358

359359
source = os.path.join('data', 'issues', 'nativescript-cli-3619', 'icon-1025.png')
360360
target = os.path.join(self.app_name, 'app', 'App_Resources', 'iOS', 'Assets.xcassets', 'AppIcon.appiconset')
361361
File.copy(source, target)
362-
strings = ['Xcode build' ]
362+
strings = ['Xcode build']
363363
Tns.wait_for_log(log_file=output, string_list=strings, clean_log=False)
364364
assert "Gradle build" not in output
365365

@@ -532,7 +532,6 @@ def test_380_tns_run_ios_plugin_dependencies(self):
532532
Device.screen_match(device_name=SIMULATOR_NAME, device_id=self.SIMULATOR_ID,
533533
expected_image='livesync-hello-world_home')
534534

535-
@unittest.skip("NSLog is not shown when run the test but is show when run the same test app locally")
536535
def test_385_tns_run_ios_source_code_in_ios_part_plugin(self):
537536
"""
538537
https://github.com/NativeScript/nativescript-cli/issues/3650

0 commit comments

Comments
 (0)