From a4bd2f8c3dffe8c678708f7adf214000329bf4b4 Mon Sep 17 00:00:00 2001 From: kg422 Date: Tue, 25 Aug 2015 11:59:58 -0700 Subject: [PATCH] readme for tests --- .../CodePushDemoApp.xcodeproj/project.pbxproj | 2 +- .../CodePushDemoAppTests/ApplyUpdateTests.m | 2 -- .../CodePushDemoApp/CodePushDemoAppTests/README.md | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 Examples/CodePushDemoApp/CodePushDemoAppTests/README.md diff --git a/Examples/CodePushDemoApp/CodePushDemoApp.xcodeproj/project.pbxproj b/Examples/CodePushDemoApp/CodePushDemoApp.xcodeproj/project.pbxproj index 0dccf0b..0d3a903 100644 --- a/Examples/CodePushDemoApp/CodePushDemoApp.xcodeproj/project.pbxproj +++ b/Examples/CodePushDemoApp/CodePushDemoApp.xcodeproj/project.pbxproj @@ -408,7 +408,7 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0610; - ORGANIZATIONNAME = Facebook; + ORGANIZATIONNAME = Microsoft; TargetAttributes = { 00E356ED1AD99517003FC87E = { CreatedOnToolsVersion = 6.2; diff --git a/Examples/CodePushDemoApp/CodePushDemoAppTests/ApplyUpdateTests.m b/Examples/CodePushDemoApp/CodePushDemoAppTests/ApplyUpdateTests.m index 879bd96..acaeda8 100644 --- a/Examples/CodePushDemoApp/CodePushDemoAppTests/ApplyUpdateTests.m +++ b/Examples/CodePushDemoApp/CodePushDemoAppTests/ApplyUpdateTests.m @@ -52,8 +52,6 @@ #pragma mark Logic Tests - (void)testDownloadAndApplyUpdate { - - NSString *sanitizedAppName = [app stringByReplacingOccurrencesOfString:@"/" withString:@"-"]; sanitizedAppName = [sanitizedAppName stringByReplacingOccurrencesOfString:@"\\" withString:@"-"]; NSURL* scriptURL; diff --git a/Examples/CodePushDemoApp/CodePushDemoAppTests/README.md b/Examples/CodePushDemoApp/CodePushDemoAppTests/README.md new file mode 100644 index 0000000..7118293 --- /dev/null +++ b/Examples/CodePushDemoApp/CodePushDemoAppTests/README.md @@ -0,0 +1,14 @@ + +Test Cases +--- +* QueryUpdateTests +Tests the functionality of querying for new app updates via the SDK + * testNoRemotePackage - Checks that when the remote server has no update packages available, CodePushSdk.queryUpdate does not return a new package nor throw an error. + * testNoRemotePackageWithSameAppVersion - Checks that when the remote server has an update with a different appVersion, the CodePushSdk.queryUpdate does not return a new package nor throw an error. + * testFirstUpdate - Checks that when there is no current package (for example, the current build is a fresh install from the app store) and the remote server has a new package, CodePushSdk.queryUpdate returns that new package without throwing an error. + * testNewUpdate - Checks that when the remote server has a new package with a different package hash and same version as the current package, CodePushSdk.queryUpdate returns that new package without throwing an error. + * testSamePackage - Checks that when the remote server has a package that is identical to the current package, CodePushSdk.queryUpdate does not return a new package nor throw an error. + +* ApplyUpdateTests +Tests the functionality of installing new app updates downloaded from the server via the SDK + * testDownloadAndApplyUpdate - Queries for a new update, downloads it and then verifies that from the UI that the new update has been installed. \ No newline at end of file