Skip to content

Commit

Permalink
test fabric in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsocj-cb committed Sep 16, 2022
1 parent fc1f6ad commit 839fc02
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,42 @@ jobs:
- store_artifacts:
path: ./artifacts

e2e_release_ios_fabric:
executor:
name: rn/macos
xcode_version: '13.1.0'
environment:
RCT_NEW_ARCH_ENABLED: 1
steps:
- checkout
- run:
name: install applesimutils
command: |
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null
- rn/ios_simulator_start:
device: 'iPhone 11'
# - rn/yarn_install
- run:
command: yarn install --frozen-lockfile
name: yarn install
- run:
command: yarn bundle:ios
name: bundle js
- rn/pod_install:
pod_install_directory: 'example/ios'
- run:
command: curl https://raw.githubusercontent.com/facebook/react-native/6334ac35ac3cbc2c84b2d46d46ec118bf9bf714d/scripts/find-node.sh > node_modules/react-native/scripts/find-node.sh
name: fix issue with nvm # will be fixed in RN 67 (https://github.com/react-native-community/upgrade-support/issues/138)
- run:
command: yarn detox:ios:build:release
name: build app for e2e tests
- run:
command: yarn detox:ios:test:release
name: run e2e tests
- store_artifacts:
path: ./artifacts

e2e_release_android:
executor:
name: android/android-machine
Expand Down
20 changes: 0 additions & 20 deletions src/datetimepicker.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,6 @@ export default function Picker({
const _picker = React.useRef(null);
const display = getDisplaySafe(providedDisplay);

React.useEffect(
function ensureNativeIsInSyncWithJS() {
if (isFabricEnabled) {
// we don't need this workaround when fabric is enabled
return;
}

const {current} = _picker;

if (value && onChange && current) {
const timestamp = value.getTime();
// $FlowFixMe Cannot call `current.setNativeProps` because property `setNativeProps` is missing in `AbstractComponent` [1].
current.setNativeProps({
date: timestamp,
});
}
},
[onChange, value],
);

React.useEffect(
function ensureCorrectHeight() {
const height = getPickerHeightStyle(display, mode);
Expand Down
2 changes: 1 addition & 1 deletion src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export type IOSNativeProps = $ReadOnly<{|
/**
* Sets the preferredDatePickerStyle for picker
*/
displayIOS?: IOSDisplay,
display?: IOSDisplay,

/**
* Is this picker enabled?
Expand Down

0 comments on commit 839fc02

Please sign in to comment.