mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
33 lines
1006 B
JavaScript
33 lines
1006 B
JavaScript
/**
|
|
* Sanity suite
|
|
* ------------
|
|
*
|
|
* Tests in this suite ensure that the most basic functionality of Detox is
|
|
* working as expected: app launches, element matching, assertions, etc.
|
|
*
|
|
* @severity critical
|
|
* @tag sanity
|
|
*/
|
|
describe('Sanity', () => {
|
|
beforeEach(async () => {
|
|
await device.reloadReactNative();
|
|
await detox.traceCall('Navigate to sanity', element(by.text('Sanity')).tap());
|
|
});
|
|
|
|
it('should have welcome screen', async () => {
|
|
await expect(element(by.text('Welcome'))).toBeVisible();
|
|
await expect(element(by.text('Say Hello'))).toBeVisible();
|
|
await expect(element(by.text('Say World'))).toBeVisible();
|
|
});
|
|
|
|
it('should show hello screen after tap', async () => {
|
|
await element(by.text('Say Hello')).tap();
|
|
await expect(element(by.text('Hello!!!'))).toBeVisible();
|
|
});
|
|
|
|
it('should show world screen after tap', async () => {
|
|
await element(by.text('Say World')).tap();
|
|
await expect(element(by.text('World!!!'))).toBeVisible();
|
|
});
|
|
});
|