Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"images": [
{
"idiom": "ipad",
"size": "20x20",
"scale": "1x",
"filename": "Icon-20x20@1x.png"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "2x",
"filename": "Icon-20x20@2x.png"
},
{
"idiom": "iphone",
"size": "20x20",
"scale": "3x",
"filename": "Icon-20x20@3x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "1x",
"filename": "Icon-29x29@1x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "2x",
"filename": "Icon-29x29@2x.png"
},
{
"idiom": "iphone",
"size": "29x29",
"scale": "3x",
"filename": "Icon-29x29@3x.png"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "2x",
"filename": "Icon-40x40@2x.png"
},
{
"idiom": "iphone",
"size": "40x40",
"scale": "3x",
"filename": "Icon-40x40@3x.png"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "2x",
"filename": "Icon-60x60@2x.png"
},
{
"idiom": "iphone",
"size": "60x60",
"scale": "3x",
"filename": "Icon-60x60@3x.png"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "1x",
"filename": "Icon-76x76@1x.png"
},
{
"idiom": "ipad",
"size": "76x76",
"scale": "2x",
"filename": "Icon-76x76@2x.png"
},
{
"idiom": "ios-marketing",
"size": "1024x1024",
"scale": "1x",
"filename": "Icon-marketing-1024x1024.png"
}
],
"info": {
"version": 1,
"author": "apetools.webprofusion.com"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions tests/build/common/resources_generate_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from core.base_class.BaseClass import BaseClass
from core.osutils.command import run
from core.osutils.folder import Folder
from core.osutils.file import File

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8: Unused import.

from core.osutils.image_utils import ImageUtils
from core.osutils.os_type import OSType
from core.settings.settings import CURRENT_OS, TEST_RUN_HOME
Expand Down Expand Up @@ -142,6 +143,22 @@ def test_002_tns_resources_generate_splashes(self):

ResourcesGenerateTests.check_splashes(app_resources_android, app_resources_ios)

def test_003_tns_resources_generate_icons_apetools(self):
#https://github.com/NativeScript/nativescript-cli/issues/3666

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8 require space between # and https://github.com/NativeScript/nativescript-cli/issues/3666

Folder.cleanup(os.path.join(self.app_name, 'app', 'App_Resources', 'iOS', 'Assets.xcassets',
'AppIcon.appiconset'))
folder = os.path.join(TEST_RUN_HOME, "data", "images", "resources_generate", "apetool",
"AppIcon.appiconset")
destination = os.path.join(self.app_name, 'app', 'App_Resources', 'iOS', 'Assets.xcassets', 'AppIcon.appiconset')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PEP8: Line too long

Folder.copy(folder, destination)
icon_path = os.path.join(self.app_name, "app", "App_Resources", "iOS", "Assets.xcassets",
"AppIcon.appiconset", "Icon-76x76@2x.png")

output = run("tns resources generate icons \"" + icon_path + "\"" + " --path " + self.app_name)
assert "Generating icons" in output
assert "Icons generation completed" in output
assert "Invalid settings specified for the resizer." not in output

def test_100_tns_resources_generate_icons_old_template_structure(self):
app_resources_android = os.path.join(TEST_RUN_HOME, self.app_based_on_old_template, self.app_resources_old)
app_resources_ios = os.path.join(TEST_RUN_HOME, self.app_based_on_old_template, self.assets_icons)
Expand Down