mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
20 lines
642 B
JavaScript
20 lines
642 B
JavaScript
const LogInterceptor = require('./utils/log-interceptor');
|
|
|
|
describe(':android: App responsiveness', () => {
|
|
it('should log ANR warning when app nonresponsive', async () => {
|
|
const logInterceptor = new LogInterceptor();
|
|
|
|
try {
|
|
logInterceptor.startStderr();
|
|
await element(by.text('ANR')).tap();
|
|
} finally {
|
|
logInterceptor.stopAll();
|
|
}
|
|
|
|
if (!logInterceptor.strerrData.includes('Application Not Responding')) {
|
|
console.error('APP_NONRESPONSIVE warning-log was expected, but got:\n'+logInterceptor.strerrData);
|
|
throw new Error('APP_NONRESPONSIVE not found in intercepted log');
|
|
}
|
|
});
|
|
});
|