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
describe('Example', () => { | |
beforeEach(async () => { | |
await device.reloadReactNative(); | |
}); | |
describe('Test describe block', () => { | |
it('should make something great', async () => { | |
// core of the async test | |
}); | |
}); |
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
<TextInput | |
placeholderTextColor="#dddddd" | |
style={[styles.main, styles.textColor]} | |
placeholder="Add a new todo item" | |
onChangeText={this.handleInputChanges} | |
value={inputValue} | |
testID="inputAdder" | |
/> |
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
describe('Handle changes on input text', () => { | |
it('should have...', async () => { | |
const itemAdder = await element(by.id('inputAdder')); | |
// some actions and expectations | |
}); | |
}); |
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
describe('Handle changes on input text', () => { | |
it('should have...', async () => { | |
const itemAdder = await element(by.id('inputAdder')); | |
const touchableAdder = await element(by.id('touchableAdder')); | |
// some actions and expectations | |
}); | |
}); |
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
describe('Handle changes on input text', () => { | |
it('should have...', async () => { | |
const itemAdder = await element(by.id('inputAdder')); | |
const touchableAdder = await element(by.id('touchableAdder')); | |
// Focus the input field | |
await itemAdder.tap(); | |
await itemAdder.typeText('Item'); | |
// expectations | |
}); |
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
describe('Handle changes on input text', () => { | |
it('should have displayed the Add button when a text is filled in the input', async () => { | |
const itemAdder = await element(by.id('inputAdder')); | |
const touchableAdder = await element(by.id('touchableAdder')); | |
// Check that it's not visible before typing text | |
await expect(touchableAdder).toBeNotVisible(); | |
// Focus the input field | |
await itemAdder.tap(); |
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
{ | |
"detox": { | |
"configurations": { | |
"ios.sim.debug": { | |
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/detoxExample.app", | |
"build": "xcodebuild -project ios/detoxExample.xcodeproj -scheme detoxExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", | |
"type": "ios.simulator", | |
"name": "iPhone 7" | |
} | |
} |
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
{ | |
"configurations": { | |
"ios.sim7.debug": { | |
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/detoxExample.app", | |
"build": "xcodebuild -project ios/detoxExample.xcodeproj -scheme detoxExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", | |
"type": "ios.simulator", | |
"name": "iPhone 7" | |
}, | |
"ios.sim6.debug": { | |
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/detoxExample.app", |
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
MessageQueue.spy(true) // will display every messages sent and received in the console. |
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
<View style={style.blue}> | |
<Text>Hello world !</Text> | |
</View> |
OlderNewer