diff --git a/apps/automated/src/ui/styling/style-properties-tests.ios.ts b/apps/automated/src/ui/styling/style-properties-tests.ios.ts deleted file mode 100644 index 76d8aeabf..000000000 --- a/apps/automated/src/ui/styling/style-properties-tests.ios.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as TKUnit from '../../tk-unit'; -import * as helper from '../../ui-helper'; -import { Label } from '@nativescript/core'; - -export function test_native_font_size_with_a11y_font_scale() { - const page = helper.getCurrentPage(); - const testView = new Label(); - const deviceFontScaleMock = 4.0; - - page.content = testView; - - testView.style._fontScale = deviceFontScaleMock; - - const nativeFontSize = testView.nativeTextViewProtected.font.pointSize; - const expectedNativeFontSize = testView.style.fontInternal.fontSize * deviceFontScaleMock; - TKUnit.assertEqual(nativeFontSize, expectedNativeFontSize, 'View font size does not respect a11y font scaling'); -} diff --git a/apps/automated/src/ui/styling/style-properties-tests.ts b/apps/automated/src/ui/styling/style-properties-tests.ts index 2f8632276..8870592e5 100644 --- a/apps/automated/src/ui/styling/style-properties-tests.ts +++ b/apps/automated/src/ui/styling/style-properties-tests.ts @@ -580,6 +580,22 @@ export function test_setting_font_properties_sets_native_font() { test_native_font('italic', 'bold'); } +export function test_native_font_size_with_a11y_font_scale() { + if (isIOS) { + const page = helper.getCurrentPage(); + const testView = new Label(); + const deviceFontScaleMock = 4.0; + + page.content = testView; + + testView.style._fontScale = deviceFontScaleMock; + + const nativeFontSize = testView.nativeTextViewProtected.font.pointSize; + const expectedNativeFontSize = testView.style.fontInternal.fontSize * deviceFontScaleMock; + TKUnit.assertEqual(nativeFontSize, expectedNativeFontSize, 'View font size does not respect a11y font scaling'); + } +} + function test_native_font(style: 'normal' | 'italic', weight: '100' | '200' | '300' | 'normal' | '400' | '500' | '600' | 'bold' | '700' | '800' | '900') { const testView = new Button();