From 980244dd244cc309b97aaf6a681ac17f534d33f5 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Wed, 14 Aug 2024 14:20:46 +0530 Subject: [PATCH 1/4] chore: testcases are added for early access --- .../sdk/ExampleInstrumentedTest.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java b/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java index c512193a..2fe024f6 100644 --- a/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java +++ b/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java @@ -2,6 +2,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import android.content.Context; import android.util.Log; @@ -98,4 +99,30 @@ public void onCompletion(SyncStack syncStack, Error error) { }); assertNotNull(stack.syncParams); } + + @Test + public void testEarlyAccess() throws Exception { + Context ctx = ApplicationProvider.getApplicationContext(); + Config config = new Config(); + String[] earlyAccess = {"Taxonomy"}; + config.earlyAccess(earlyAccess); + stack = Contentstack.stack(ctx, apiKey, deliveryToken, environment, config); + assertEquals(earlyAccess[0], config.earlyAccess[0]); + assertNotNull(stack.localHeader.containsKey("x-header-ea")); + assertEquals("Taxonomy", stack.localHeader.get("x-header-ea")); + } + + @Test + public void testConfigEarlyAccessMultipleFeature() throws Exception { + Context ctx = ApplicationProvider.getApplicationContext(); + Config config = new Config(); + String[] earlyAccess = {"Taxonomy", "Teams", "Terms", "LivePreview"}; + config.earlyAccess(earlyAccess); + stack = Contentstack. stack(ctx, apiKey, deliveryToken, environment, config); + assertEquals(4, stack.localHeader.keySet().size()); + assertEquals(earlyAccess[1], config.earlyAccess[1]); + assertTrue(stack.localHeader.containsKey("x-header-ea")); + assertEquals("Taxonomy,Teams,Terms,LivePreview", stack.localHeader.get("x-header-ea")); + } + } \ No newline at end of file From c8f1e08d76417fa14af533a480fd11f4d4e3b426 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Mon, 19 Aug 2024 11:53:30 +0530 Subject: [PATCH 2/4] chore : indentation fixing --- .../java/com/contentstack/sdk/ExampleInstrumentedTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java b/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java index 2fe024f6..da0d480e 100644 --- a/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java +++ b/contentstack/src/androidTest/java/com/contentstack/sdk/ExampleInstrumentedTest.java @@ -118,7 +118,7 @@ public void testConfigEarlyAccessMultipleFeature() throws Exception { Config config = new Config(); String[] earlyAccess = {"Taxonomy", "Teams", "Terms", "LivePreview"}; config.earlyAccess(earlyAccess); - stack = Contentstack. stack(ctx, apiKey, deliveryToken, environment, config); + stack = Contentstack.stack(ctx, apiKey, deliveryToken, environment, config); assertEquals(4, stack.localHeader.keySet().size()); assertEquals(earlyAccess[1], config.earlyAccess[1]); assertTrue(stack.localHeader.containsKey("x-header-ea")); From d51bff207faed28164df9e3b2493dabee5d9a08a Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Fri, 23 Aug 2024 16:04:20 +0530 Subject: [PATCH 3/4] version bump --- CHANGELOG.md | 8 ++++++++ contentstack/build.gradle | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5d2e1c1..b6cb5103 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## Version 3.16.2 + +### Date: 28-August-2024 + +- Early access header test + +--- + ## Version 3.16.1 ### Date: 21-August-2024 diff --git a/contentstack/build.gradle b/contentstack/build.gradle index 68257fdc..7cbb41e8 100755 --- a/contentstack/build.gradle +++ b/contentstack/build.gradle @@ -10,7 +10,7 @@ android.buildFeatures.buildConfig true mavenPublishing { publishToMavenCentral(SonatypeHost.DEFAULT) signAllPublications() - coordinates("com.contentstack.sdk", "android", "3.16.1") + coordinates("com.contentstack.sdk", "android", "3.16.2") pom { name = "contentstack-android" From 62ad2457049c419de398e95df2662c46f29a9b27 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Mon, 2 Sep 2024 17:56:57 +0530 Subject: [PATCH 4/4] chore: discarding version bump --- CHANGELOG.md | 8 -------- contentstack/build.gradle | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6cb5103..b5d2e1c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,5 @@ # CHANGELOG -## Version 3.16.2 - -### Date: 28-August-2024 - -- Early access header test - ---- - ## Version 3.16.1 ### Date: 21-August-2024 diff --git a/contentstack/build.gradle b/contentstack/build.gradle index 7cbb41e8..68257fdc 100755 --- a/contentstack/build.gradle +++ b/contentstack/build.gradle @@ -10,7 +10,7 @@ android.buildFeatures.buildConfig true mavenPublishing { publishToMavenCentral(SonatypeHost.DEFAULT) signAllPublications() - coordinates("com.contentstack.sdk", "android", "3.16.2") + coordinates("com.contentstack.sdk", "android", "3.16.1") pom { name = "contentstack-android"