Skip to content

Commit 5f7e4cd

Browse files
authored
Merge pull request #57 from react-native-jp/resolved-detox-error
✨✅ Fix Detox Errors.
2 parents 6184a25 + 41b160e commit 5f7e4cd

File tree

7 files changed

+8
-170
lines changed

7 files changed

+8
-170
lines changed

e2e/firstTest.spec.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ describe('All', () => {
8080

8181
it('サインアウトできる', async () => {
8282
await elementById(testIDs.MENU_HEADER_LEFT_BUTTON).tap();
83-
await expect(elementById(testIDs.MENU_DRAWER_ITEMS)).toBeVisible();
84-
85-
await elementById(testIDs.DRAWER_ITEM_USER_INFO).tap();
83+
await elementByLabel('USER_INFO').tap();
8684
await expect(elementById(testIDs.USER_INFO_SCREEN)).toBeVisible();
8785

8886
await elementById(testIDs.USER_INFO_SIGN_OUT_BUTTON).tap();

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@typescript-eslint/eslint-plugin": "2.24.0",
7070
"@typescript-eslint/parser": "2.24.0",
7171
"babel-jest": "25.1.0",
72-
"detox": "15.1.4",
72+
"detox": "16.0.1",
7373
"eslint": "6.8.0",
7474
"eslint-config-prettier": "6.10.0",
7575
"eslint-plugin-jest": "23.8.2",

src/constants/testIDs.ts

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ export default {
1818
HOME: 'HOME',
1919
MENU_HEADER_LEFT_BUTTON: 'MENU_HEADER_LEFT_BUTTON',
2020
MENU_DRAWER_ITEMS: 'MENU_DRAWER_ITEMS',
21-
DRAWER_ITEM_HOME: 'DRAWER_ITEM_HOME',
22-
DRAWER_ITEM_USER_INFO: 'DRAWER_ITEM_USER_INFO',
2321
USER_INFO_SCREEN: 'USER_INFO_SCREEN',
2422
USER_INFO_SIGN_OUT_BUTTON: 'USER_INFO_SIGN_OUT_BUTTON',
2523
TODO_OPEN_INPUT_BUTTON: 'TODO_OPEN_INPUT_BUTTON',

src/routes/Drawer/Drawer.tsx

-150
This file was deleted.

src/routes/Drawer/index.tsx

-1
This file was deleted.

src/routes/Main/index.tsx

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
3-
import { createDrawerNavigator, DrawerContentComponentProps } from '@react-navigation/drawer'
3+
import { createDrawerNavigator } from '@react-navigation/drawer'
44
import {
55
CHOOSE_LOGIN,
66
HOME,
@@ -18,7 +18,6 @@ import Statistics from './Statistics'
1818
import { ChooseLogin, Initial } from '../../components/pages'
1919
import { Loading, SignIn, SignUp, Input } from '../../containers'
2020
import { headerStyle, headerTintColor } from '../Header'
21-
import { Drawer as DrawerComponent } from '../Drawer'
2221
import * as UiContext from '../../contexts/ui'
2322
import { createStackNavigator, StackCardInterpolationProps } from '@react-navigation/stack'
2423
import { COLOR } from '../../constants/theme'
@@ -33,12 +32,7 @@ const drawerContentOptions = {
3332
}
3433
function HomeWithDrawer() {
3534
return (
36-
<Drawer.Navigator
37-
drawerStyle={drawerStyle}
38-
drawerContentOptions={drawerContentOptions}
39-
initialRouteName={HOME}
40-
drawerContent={(props: DrawerContentComponentProps) => <DrawerComponent {...props} />}
41-
>
35+
<Drawer.Navigator drawerStyle={drawerStyle} drawerContentOptions={drawerContentOptions} initialRouteName={HOME}>
4236
<Drawer.Screen name={HOME} component={Home} />
4337
<Drawer.Screen name={USER_INFO} component={UserInfo} />
4438
</Drawer.Navigator>
@@ -50,7 +44,6 @@ function StatisticsWithDrawer() {
5044
drawerStyle={drawerStyle}
5145
drawerContentOptions={drawerContentOptions}
5246
initialRouteName={STATISTICS}
53-
drawerContent={(props: DrawerContentComponentProps) => <DrawerComponent {...props} />}
5447
>
5548
<Drawer.Screen name={STATISTICS} component={Statistics} />
5649
<Drawer.Screen name={USER_INFO} component={UserInfo} />

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2774,10 +2774,10 @@ detect-newline@^3.0.0:
27742774
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
27752775
integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
27762776

2777-
detox@15.1.4:
2778-
version "15.1.4"
2779-
resolved "https://registry.yarnpkg.com/detox/-/detox-15.1.4.tgz#e459a39d4877ea4c582a886210aaac531c347e65"
2780-
integrity sha512-Clk6ceSkX5MM28eJCKJdRKSe+vesGe4OnRkEqpVshvH+Ce35/nBnyKDH0O4+qvoMJItOIZHi2Hn327b2+L81Gg==
2777+
detox@16.0.1:
2778+
version "16.0.1"
2779+
resolved "https://registry.yarnpkg.com/detox/-/detox-16.0.1.tgz#e4aadf5bd0a9b561bcbf81a1573a2d59006b1684"
2780+
integrity sha512-W5jWU9vtGXA6KTH5Ulkxhw50QEsGqPRvysc+g5nrM+e2ZRh+saWPojlS2GA7YBCbae/SRHY4CNzpK0VrANU/rA==
27812781
dependencies:
27822782
"@babel/core" "^7.4.5"
27832783
bunyan "^1.8.12"

0 commit comments

Comments
 (0)