Commit 03279a21 authored by Laurent's avatar Laurent

adapter for new InMedia done

parent 3eff2988
......@@ -16,7 +16,7 @@ export class InMediaV2 extends PortalAdapter {
public canHandleWebsite($): boolean {
return $('boddy>div#app').length;
return $('body>div#app').length;
}
......@@ -29,7 +29,7 @@ export class InMediaV2 extends PortalAdapter {
{ url: account.getUrl() + '/in/rest/api/authenticate',
method: "POST",
content: "locale=fr&username=" + account.credentials['login'] + "&password=" + account.credentials['password'],
headers: {"Content-Type": "application/json"} })
headers: {"Content-Type": "application/x-www-form-urlencoded"} })
.then( (response) => {
return this._handleSignIn(account, response)
} )
......@@ -134,7 +134,6 @@ export class InMediaV2 extends PortalAdapter {
protected _holdStatus(code: string): string {
let codes = {RESV_NOT_AVAILABLE: L('hold_not_available'),
RESV_AVAILABLE: L('hold_available')};
return codes[code] ? codes[code] : L('unknown');
}
}
......@@ -12,7 +12,7 @@ export class InMediaV2SignIn extends HTTPScenario {
.expect({ url: base_url + '/in/rest/api/authenticate',
method: "POST",
content: 'locale=fr&username=marco&password=polo',
headers: {"Content-Type": "application/json"} },
headers: {"Content-Type": "application/x-www-form-urlencoded"} },
{ content: this.authenticateJSON() })
}
......@@ -248,7 +248,7 @@ export class InMediaV2WithLoginError extends InMediaV2SignIn {
.expect({ url: base_url + '/in/rest/api/authenticate',
method: "POST",
content: 'locale=fr&username=marco&password=polo',
headers: {"Content-Type": "application/json"} },
headers: {"Content-Type": "application/x-www-form-urlencoded"} },
{ content: '',
statusCode: 401
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment