This fix improving logging during running e2e tests. (#39466)

Summary:
Motivation was to improve logging for RNTester e2e tests.

## Changelog:

[INTERNAL] - Add logging.

Pull Request resolved: https://github.com/facebook/react-native/pull/39466

Test Plan: Check logs during 2e automation is running.

Reviewed By: NickGerleman

Differential Revision: D49499233

Pulled By: cipolleschi

fbshipit-source-id: c803fa9227995ed3862b6a919a7590f80e2afc08
This commit is contained in:
Mateusz 2023-09-28 20:18:25 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 8e36cc0293
Коммит e21b3c8296
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -14,4 +14,5 @@ module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
testMatch: ['**/specs/**/*.js'],
maxWorkers: 1,
verbose: true,
};

Просмотреть файл

@ -20,19 +20,30 @@ const config = {
host: 'localhost',
port: 4723,
waitforTimeout: 60000,
logLevel: 'error',
capabilities: {
...capabilities,
},
};
beforeEach(async () => {
// $FlowFixMe
let testName: any = expect.getState().currentTestName;
console.info(
'------------------------------------------------------------ Test is starting... ------------------------------------------------------------',
);
console.info(
'------------------------------ Test name: ' +
testName +
' ------------------------------',
);
driver = await wdio.remote(config);
});
afterEach(async () => {
console.info('[afterAll] Done with testing!');
await driver.deleteSession();
console.info(
'------------------------------------------------------------ Done with testing. ------------------------------------------------------------',
);
});
export {driver};