feat(types-ios): 18.x sdk types (#10629)

This commit is contained in:
Nathan Walker
2024-11-01 23:06:37 -07:00
committed by GitHub
parent ec7fa5d05e
commit a2aa2613c6
71 changed files with 18586 additions and 9276 deletions

View File

@@ -77,7 +77,7 @@ export class SafeAreaTests extends testModule.UITest<any> {
const view: UIView = layout.page.actionBar.nativeViewProtected;
// use the action bar position and size instead of the status bar and action bar heights as those are unreliable on iOS 16+
const topInset = round(dipToDp(view.frame.origin.y + view.frame.size.height));
const topInset = Math.round(dipToDp(view.frame.origin.y + view.frame.size.height));
const insets = layout.getSafeAreaInsets();
equal(insets.top, topInset, `${layout}.topInset - actual:${insets.top}; expected: ${topInset}`);
@@ -87,7 +87,7 @@ export class SafeAreaTests extends testModule.UITest<any> {
const keyWindow = Utils.ios.getWindow();
// const statusBarHeight = round(dipToDp(app.statusBarFrame.size.height));
// use window inset instead of status bar frame as that's unreliable on iOS 16+
const topInset = round(dipToDp(keyWindow ? keyWindow.safeAreaInsets.top : UIApplication.sharedApplication.keyWindow.safeAreaInsets.top));
const topInset = Math.round(dipToDp(keyWindow ? keyWindow.safeAreaInsets.top : UIApplication.sharedApplication.keyWindow.safeAreaInsets.top));
const insets = layout.getSafeAreaInsets();
equal(insets.top, topInset, `${layout}.topInset - actual:${insets.top}; expected: ${topInset}`);

View File

@@ -24,7 +24,7 @@ class ScrollLayoutSafeAreaTest extends UITest<ScrollView> {
waitUntilTestElementLayoutIsValid(ui.root);
test(ui);
},
pageOptions
pageOptions,
);
}
@@ -70,7 +70,7 @@ class ScrollLayoutSafeAreaTest extends UITest<ScrollView> {
({ root }) => {
this.scroll_view_in_full_screen(root, pageOptions);
},
pageOptions
pageOptions,
);
}
@@ -194,11 +194,11 @@ class ScrollLayoutSafeAreaTest extends UITest<ScrollView> {
isBelowWith(root, childFirst, insets.top);
isRightWith(childFirst, root, insets.right);
const scrollViewContentHeight = round(dipToDp(root.nativeViewProtected.contentSize.height));
const scrollViewContentHeight = Math.round(dipToDp(root.nativeViewProtected.contentSize.height));
const sumOfNestedLabelHeightsAndInsets = height(childFirst) * stack.getChildrenCount() + insets.top + insets.bottom;
equal(scrollViewContentHeight, sumOfNestedLabelHeightsAndInsets, `scroll view content height<${scrollViewContentHeight}> sum of nested label height and insets <${sumOfNestedLabelHeightsAndInsets}>`);
},
pageOptions
pageOptions,
);
}
@@ -426,7 +426,7 @@ class ScrollLayoutSafeAreaTest extends UITest<ScrollView> {
const sumOfNestedScrollViewWidths = width(cells[1][0]) + width(cells[1][1]) + width(cells[1][2]);
equal(width(grid), sumOfNestedScrollViewWidths, `grid width<${width(grid)}> sum of nested scroll views width <${sumOfNestedScrollViewWidths}>`);
},
pageOptions
pageOptions,
);
}