Skip to content

Commit fc4b9ad

Browse files
committed
fix: web pack tests for ng projects
1 parent 4bc6771 commit fc4b9ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/webpack/hello_world_ng_tests.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class WebPackHelloWorldNG(BaseClass):
2424
image_change = 'hello-world-ng-js-css-xml'
2525

2626
wp_run = ['Webpack compilation complete', 'Successfully installed']
27-
wp_errors = ['ERROR', 'Module not found', 'Error']
27+
wp_errors = ['ERROR', 'Module not found']
2828

2929
html_change = ['app/item/items.component.html', '[text]="item.name"', '[text]="item.id"']
3030
ts_change = ['app/item/item.service.ts', 'Ter Stegen', 'Stegen Ter']
@@ -55,7 +55,7 @@ def tearDownClass(cls):
5555
def test_000_build_without_bundle(self):
5656
Tns.build_android(attributes={"--path": self.app_name})
5757
apk_size = File.get_size(Helpers.get_apk_path(app_name=self.app_name, config="debug"))
58-
assert 26500000 < apk_size < 27000000, "Actual apk size is " + str(apk_size)
58+
assert 26000000 < apk_size < 27000000, "Actual apk size is " + str(apk_size)
5959
Helpers.run_android_via_adb(app_name=self.app_name, config="debug", image=self.image_original)
6060

6161
if CURRENT_OS is OSType.OSX:
@@ -65,7 +65,7 @@ def test_000_build_without_bundle(self):
6565
app_path = Helpers.get_app_path(app_name=self.app_name).replace("emulator", "device")
6666
ipa_path = app_path.replace(".app", ".ipa")
6767
ipa_size = File.get_size(ipa_path)
68-
assert 26500000 < ipa_size < 27000000, "Actual app is " + str(ipa_size)
68+
assert 26000000 < ipa_size < 27000000, "Actual app is " + str(ipa_size)
6969

7070
def test_001_android_build_with_bundle(self):
7171
Tns.build_android(attributes={"--path": self.app_name, "--bundle": ""})
@@ -172,7 +172,7 @@ def test_100_ios_build_release_with_and_bundle_and_uglify(self):
172172
starter_js_size = File.get_size(os.path.join(app_path, "app", "starter.js"))
173173
vendor_js_size = File.get_size(os.path.join(app_path, "app", "vendor.js"))
174174
ipa_size = File.get_size(ipa_path)
175-
assert 450000 < bundle_js_size < 500000, "Actual bundle_js_size is " + str(bundle_js_size)
175+
assert 400000 < bundle_js_size < 500000, "Actual bundle_js_size is " + str(bundle_js_size)
176176
assert 30 < starter_js_size < 50, "Actual starter_js_size is " + str(starter_js_size)
177177
assert 685000 < vendor_js_size < 695000, "Actual vendor_js_size is " + str(vendor_js_size)
178178
assert 12500000 < ipa_size < 13000000, "Actual app is " + str(ipa_size)
@@ -265,7 +265,7 @@ def test_120_ios_build_release_with_and_bundle_and_snapshot_and_uglify(self):
265265
starter_js_size = File.get_size(os.path.join(app_path, "app", "starter.js"))
266266
vendor_js_size = File.get_size(os.path.join(app_path, "app", "vendor.js"))
267267
ipa_size = File.get_size(ipa_path)
268-
assert 450000 < bundle_js_size < 500000, "Actual bundle_js_size is " + str(bundle_js_size)
268+
assert 400000 < bundle_js_size < 500000, "Actual bundle_js_size is " + str(bundle_js_size)
269269
assert 30 < starter_js_size < 50, "Actual starter_js_size is " + str(starter_js_size)
270270
assert 680000 < vendor_js_size < 700000, "Actual vendor_js_size is " + str(vendor_js_size)
271271
assert 12500000 < ipa_size < 13000000, "Actual app is " + str(ipa_size)

0 commit comments

Comments
 (0)