From daa985f434d7f03ad71327497fcf9c7f94418834 Mon Sep 17 00:00:00 2001 From: Biki-das Date: Sat, 24 Feb 2024 13:29:18 +0530 Subject: [PATCH 1/7] fixes system imagewith the updated android image --- tests/unit_tests/commands/android/testIndex.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index 572024f..849f98a 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -1585,7 +1585,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, true); - assert.deepStrictEqual(packagesInstalled, ['system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesInstalled, ['system-images;android-30;google_apis;arm64-v8a', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, true); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); @@ -1793,7 +1793,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, ['system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, ['system-images;android-30;google_apis;arm64-v8a', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, false); assert.strictEqual(avdChecked, true); @@ -1897,7 +1897,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, ['system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, ['system-images;android-30;google_apis;arm64-v8a', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); From 1bcf63a7a970a7f68efb283fbe514586f61d361d Mon Sep 17 00:00:00 2001 From: Biki-das Date: Sat, 24 Feb 2024 19:13:54 +0530 Subject: [PATCH 2/7] updated test to assert conditionally considering the arch of the OS --- tests/unit_tests/commands/android/testIndex.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index 849f98a..1100166 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -1585,7 +1585,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, true); - assert.deepStrictEqual(packagesInstalled, ['system-images;android-30;google_apis;arm64-v8a', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesInstalled, [os.arch() === 'arm64' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, true); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); @@ -1793,7 +1793,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, ['system-images;android-30;google_apis;arm64-v8a', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, [os.arch() === 'arm64' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, false); assert.strictEqual(avdChecked, true); @@ -1897,7 +1897,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, ['system-images;android-30;google_apis;arm64-v8a', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, [os.arch() === 'arm64' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); From c1e2cb0b5b6ce85557d29548e87b7914f5008509 Mon Sep 17 00:00:00 2001 From: Biki-das Date: Sun, 25 Feb 2024 12:58:25 +0530 Subject: [PATCH 3/7] updated test suit to use ABI util function --- tests/unit_tests/commands/android/testIndex.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index 1100166..c041365 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -3,6 +3,7 @@ const fs = require('fs'); const mockery = require('mockery'); const path = require('path'); const os = require('os'); +import { ABI } from '../../../../src/commands/android/constants' describe('test showHelp', function() { beforeEach(() => { @@ -1585,7 +1586,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, true); - assert.deepStrictEqual(packagesInstalled, [os.arch() === 'arm64' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesInstalled, [ABI === 'arm64-v8a' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, true); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); @@ -1793,7 +1794,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, [os.arch() === 'arm64' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, [ABI === 'arm64-v8a' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, false); assert.strictEqual(avdChecked, true); @@ -1897,7 +1898,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, [os.arch() === 'arm64' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, [ABI === 'arm64-v8a' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); From 37aed832e0bda8182abe410d2a2174e1835f25a6 Mon Sep 17 00:00:00 2001 From: Biki-das Date: Sun, 25 Feb 2024 13:33:19 +0530 Subject: [PATCH 4/7] added colon in import --- tests/unit_tests/commands/android/testIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index c041365..5052552 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -3,7 +3,7 @@ const fs = require('fs'); const mockery = require('mockery'); const path = require('path'); const os = require('os'); -import { ABI } from '../../../../src/commands/android/constants' +import { ABI } from '../../../../src/commands/android/constants'; describe('test showHelp', function() { beforeEach(() => { From 18dec5c023efcfdf2af1be3b49eecee1520dc682 Mon Sep 17 00:00:00 2001 From: BIKI DAS Date: Thu, 29 Feb 2024 23:28:16 +0530 Subject: [PATCH 5/7] Update testIndex.js Co-authored-by: Priyansh Garg --- tests/unit_tests/commands/android/testIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index 5052552..20e2008 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -1586,7 +1586,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, true); - assert.deepStrictEqual(packagesInstalled, [ABI === 'arm64-v8a' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesInstalled, [`system-images;android-30;google_apis;${ABI}`, 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, true); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true); From 94128cea43ceb002b5713d379f2cdcda3dd69b2c Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Wed, 6 Mar 2024 15:41:10 +0530 Subject: [PATCH 6/7] Update testIndex.js --- tests/unit_tests/commands/android/testIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index 20e2008..1e801aa 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -1794,7 +1794,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, [ABI === 'arm64-v8a' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, [`system-images;android-30;google_apis;${ABI}`, 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, false); assert.strictEqual(avdChecked, true); From 4031e30ddaa310b7d888e33a724b0bea4a4fb938 Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Wed, 6 Mar 2024 15:41:22 +0530 Subject: [PATCH 7/7] Update testIndex.js --- tests/unit_tests/commands/android/testIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/commands/android/testIndex.js b/tests/unit_tests/commands/android/testIndex.js index 1e801aa..55cbdc6 100644 --- a/tests/unit_tests/commands/android/testIndex.js +++ b/tests/unit_tests/commands/android/testIndex.js @@ -1898,7 +1898,7 @@ describe('test setupAndroid', function() { assert.deepStrictEqual(binariesCheckedForWorking, ['sdkmanager']); assert.strictEqual(cmdlineToolsDownloaded, false); - assert.deepStrictEqual(packagesToInstall, [ABI === 'arm64-v8a' ? 'system-images;android-30;google_apis;arm64-v8a' : 'system-images;android-30;google_apis;x86_64', 'emulator']); // emulator updated + assert.deepStrictEqual(packagesToInstall, [`system-images;android-30;google_apis;${ABI}`, 'emulator']); // emulator updated assert.strictEqual(platformFolderCreated, false); assert.strictEqual(buildToolsDownloaded, true); assert.strictEqual(avdChecked, true);