mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(ios): support for a11y font scale (#10207)
This commit is contained in:
committed by
GitHub
parent
ab436dbfe6
commit
95f3772e77
17
apps/automated/src/ui/styling/style-properties-tests.ios.ts
Normal file
17
apps/automated/src/ui/styling/style-properties-tests.ios.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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');
|
||||
}
|
||||
Reference in New Issue
Block a user