onnxruntime/js/react_native/e2e/test/OnnxruntimeModuleExample.test.js
Edward Chen cbf3c50d75
Improve stability of Android ReactNative E2E test (#21969)
- Remove redundant `OnnxruntimeModuleExampleE2ETest CheckOutputComponentExists` test
- Attempt to close any Application Not Responding (ANR) dialog prior to running Android test
- Add `--take-screenshots failing` option to detox test commands to save screenshots on failure
2024-09-04 08:41:07 -07:00

19 lines
638 B
JavaScript

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/* Initial Simple Detox Test Setup. Can potentially add more unit tests. */
describe('OnnxruntimeModuleExample', () => {
beforeAll(async () => {
await device.launchApp();
});
it('OnnxruntimeModuleExampleE2ETest CheckInferenceResultValueIsCorrect', async () => {
if (device.getPlatform() === 'ios') {
await expect(element(by.label('output')).atIndex(1)).toHaveText('Result: 3');
}
if (device.getPlatform() === 'android') {
await expect(element(by.label('output'))).toHaveText('Result: 3');
}
});
});