Skip to content

Commit 234df45

Browse files
committed
fixed auth
1 parent e1563de commit 234df45

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

js_npm/graphql/ecommerce-server/em/app-driver.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ class AppController extends em.SutController {
1111

1212
getInfoForAuthentication() {
1313
let jwtLogin = new em.dto.JsonTokenPostLoginDto();
14-
jwtLogin.endpoint = "/api/graphql";
14+
jwtLogin.endpoint = "/graphql";
1515
jwtLogin.userId = "foo";
1616
jwtLogin.extractTokenField = "/data/login/token";
1717
jwtLogin.jsonPayload = `{
18-
"mutation": "login(data:{email:\\"foo@foo.com\\",password:\\"bar123\\"}){token}"
18+
"query": "mutation{login(data:{email:\\"foo@foo.com\\",password:\\"bar123\\"}){token}}"
1919
}`;
2020
jwtLogin.headerPrefix = "Bearer ";
2121

@@ -50,15 +50,9 @@ class AppController extends em.SutController {
5050
.post(this.baseUrlOfSut + "/graphql")
5151
.set('Content-Type', 'application/json')
5252
.send(`{
53-
"mutation" : "createUser(data:{
54-
name:\\"foo\\",
55-
username:\\"foo\\",
56-
email:\\"foo@foo.com\\",
57-
password:\\"bar123\\",
58-
confirmPassword:\\"bar123\\"}
59-
){username}"
53+
"query" : "mutation{createUser(data:{ name:\\"foo\\",username:\\"foo\\", email:\\"foo@foo.com\\",password:\\"bar123\\",confirmPassword:\\"bar123\\"}){username}}"
6054
}`)
61-
.ok(res => res.status);
55+
//.ok(res => res.status);
6256
resolve();
6357
});
6458
});

0 commit comments

Comments
 (0)