-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
684 changed files
with
23,130 additions
and
6,208 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
"use strict"; | ||
// RN do Object.freeze for Style in __DEV__ | ||
// https://github.com/facebook/react-native/commit/a8e3c7f5780516eb0297830632862484ad032c10#r74968198 | ||
// And I don't know why | ||
jest.mock('react-native/Libraries/StyleSheet/StyleSheet.js', () => { | ||
const real = jest.requireActual('react-native/Libraries/StyleSheet/StyleSheet.js'); | ||
return { | ||
...real, | ||
create: (obj) => obj, | ||
}; | ||
}); | ||
// Somehow Platform.isTesting === undefined when running in jest:/ | ||
jest.mock('react-native/Libraries/Utilities/Platform', () => { | ||
const real = jest.requireActual('react-native/Libraries/Utilities/Platform'); | ||
return { | ||
...real, | ||
isTesting: true, | ||
}; | ||
}); | ||
// we don't need logs in test's scripts | ||
jest.mock('../scripts/utils/logger'); // or use require | ||
jest.mock('react-native/Libraries/Utilities/BackHandler', () => { | ||
return jest.requireActual('react-native/Libraries/Utilities/__mocks__/BackHandler.js'); | ||
}); | ||
jest.mock('react-native-safe-area-context', () => { | ||
return jest.requireActual('react-native-safe-area-context/jest/mock').default; | ||
}); | ||
jest.mock('react-native/Libraries/Interaction/PanResponder', () => { | ||
const real = jest.requireActual('react-native/Libraries/Interaction/PanResponder'); | ||
return { | ||
...real, | ||
create: (config) => ({ panHandlers: config }), | ||
}; | ||
}); | ||
jest.mock('react-native-calendars', () => { | ||
const real = jest.requireActual('react-native-calendars'); | ||
real.Calendar.defaultProps = { | ||
initialDate: '8.01.2022', | ||
}; | ||
return { | ||
...real, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"use strict"; | ||
module.exports = 'SvgMock'; | ||
module.exports.ReactComponent = 'SvgMock'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TEXTS = void 0; | ||
exports.TEXTS = { | ||
NAVIGATOR: 'NAVIGATOR', | ||
ADDONS: 'ADDONS', | ||
KNOBS: 'KNOBS', | ||
PREVIEW: 'PREVIEW', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const detox_1 = require("detox"); | ||
const const_1 = require("../../const"); | ||
const functions_1 = require("../../functions"); | ||
const typeTextField = (0, functions_1.getTypeTextField)(); | ||
const devicePlatform = (0, functions_1.getPlatform)(); | ||
describe('Button', () => { | ||
beforeAll(async () => { | ||
await detox_1.device.launchApp(); | ||
}); | ||
beforeEach(async () => { | ||
await detox_1.device.reloadReactNative(); | ||
}); | ||
it('should have basic button', async () => { | ||
await (0, detox_1.element)(detox_1.by.text(const_1.TEXTS.NAVIGATOR)).tap(); | ||
await (0, detox_1.element)(detox_1.by.text('basic button')).tap(); | ||
await (0, detox_1.element)(detox_1.by.text(const_1.TEXTS.PREVIEW)).tap(); | ||
await (0, detox_1.expect)((0, detox_1.element)(detox_1.by.text('text big text'))).toBeVisible(); | ||
await (0, detox_1.element)(detox_1.by.text(const_1.TEXTS.ADDONS)).tap(); | ||
await (0, detox_1.element)(detox_1.by.text(const_1.TEXTS.KNOBS)).tap(); | ||
if (devicePlatform === 'ios') { | ||
await (0, detox_1.element)(detox_1.by.type(typeTextField)).atIndex(4).tap(); | ||
await (0, detox_1.element)(detox_1.by.text('large')).tap(); | ||
await (0, detox_1.element)(detox_1.by.type(typeTextField)).atIndex(1).tap(); | ||
await (0, detox_1.element)(detox_1.by.text('secondary')).tap(); | ||
await (0, detox_1.element)(detox_1.by.type(typeTextField)).atIndex(2).clearText(); | ||
await (0, detox_1.element)(detox_1.by.type(typeTextField)) | ||
.atIndex(2) | ||
.replaceText('Добавить карту'); | ||
} | ||
else { | ||
await (0, detox_1.element)(detox_1.by.text('size')).tap({ x: 5, y: 20 }); | ||
await (0, detox_1.element)(detox_1.by.text('large')).tap(); | ||
await (0, detox_1.element)(detox_1.by.text('type')).tap({ x: 5, y: 20 }); | ||
await (0, detox_1.element)(detox_1.by.text('secondary')).tap(); | ||
await (0, detox_1.element)(detox_1.by.text('disabled')).tap({ x: 5, y: 30 }); | ||
await (0, detox_1.element)(detox_1.by.text('disabled')).tap({ x: 5, y: 30 }); | ||
await (0, detox_1.element)(detox_1.by.type(typeTextField)).atIndex(1).clearText(); | ||
await (0, detox_1.element)(detox_1.by.type(typeTextField)) | ||
.atIndex(1) | ||
.replaceText('Добавить карту'); | ||
} | ||
await (0, detox_1.element)(detox_1.by.text(const_1.TEXTS.PREVIEW)).tap(); | ||
await (0, detox_1.element)(detox_1.by.text('light')).tap(); | ||
}); | ||
}); |
Oops, something went wrong.