Skip to content

Commit

Permalink
This fix improving logging during running e2e tests. (facebook#39466)
Browse files Browse the repository at this point in the history
Summary:
Motivation was to improve logging for RNTester e2e tests.

## Changelog:

[INTERNAL] - Add logging.

Pull Request resolved: facebook#39466

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

Reviewed By: NickGerleman

Differential Revision: D49499233

Pulled By: cipolleschi

fbshipit-source-id: c803fa9227995ed3862b6a919a7590f80e2afc08
  • Loading branch information
mateuszm22 authored and facebook-github-bot committed Sep 29, 2023
1 parent 8e36cc0 commit e21b3c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/rn-tester-e2e/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
testMatch: ['**/specs/**/*.js'],
maxWorkers: 1,
verbose: true,
};
15 changes: 13 additions & 2 deletions packages/rn-tester-e2e/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};

0 comments on commit e21b3c8

Please sign in to comment.