Browse Source

window-size is kept fixed for acceptance tests run

jasson99 4 years ago
parent
commit
15dfcdb8e3
2 changed files with 4 additions and 4 deletions
  1. 2 2
      nightwatch.conf.js
  2. 2 2
      test/acceptance/setup.js

+ 2 - 2
nightwatch.conf.js

@@ -18,9 +18,9 @@ module.exports = {
 				browserName : 'chrome',
 				javascriptEnabled : true,
 				chromeOptions : {
-					args : ['disable-gpu'],
+					args : ['disable-gpu', 'window-size=1280,1024'],
 					w3c : false
-				}
+				},
 			}
 		}
 	}

+ 2 - 2
test/acceptance/setup.js

@@ -30,7 +30,7 @@ Before(async function getDolApiKey() {
 	const params = new URLSearchParams()
 	params.set('login', adminUsername)
 	params.set('password', adminPassword)
-	const apiKey = `http://localhost/dolibarr/htdocs/api/index.php/login?${params.toString()}`;
+	const apiKey = client.globals.backend_url + `api/index.php/login?${params.toString()}`;
 	header['Accept'] = 'application/json'
 	await fetch(apiKey, {
 		method: 'GET',
@@ -74,4 +74,4 @@ After(async () => {
 				});
 		}
 	}
-});
+});