Skip to content

Commit

Permalink
fix: timeout from config during late inject
Browse files Browse the repository at this point in the history
  • Loading branch information
sn-sap committed Oct 12, 2023
1 parent 2622063 commit 4bff021
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/wdi5-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ function checkUI5Version(ui5Version: string) {
* attach the sap/ui/test/RecordReplay object to the application context window object as 'bridge'
*/
export async function injectUI5(config: wdi5Config, browserInstance) {
if (config === undefined) {
//Fetching config from global variable
config = global.__wdi5Config
}
const waitForUI5Timeout = config.wdi5.waitForUI5Timeout || 15000
let result = true

Expand Down
2 changes: 2 additions & 0 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default class Service implements Services.ServiceInstance {
) {}

async before(/*capabilities* , specs*/) {
// cache config to global for later use
global.__wdi5Config = this._config
// if no wdi5 config is available we add it manually
if (!this._config.wdi5) {
this._config["wdi5"] = {}
Expand Down

0 comments on commit 4bff021

Please sign in to comment.