Web: Client: Tests: update create user page render test
This commit is contained in:
parent
5e49e2cc9d
commit
552e53c1bc
@ -67,4 +67,16 @@ module.exports = class Endpoints {
|
||||
method: "GET",
|
||||
baseDir: "settings",
|
||||
};
|
||||
|
||||
static capabilities = {
|
||||
url: ["http://localhost:8092/api/2.0/capabilities"],
|
||||
method: "GET",
|
||||
baseDir: "settings",
|
||||
};
|
||||
|
||||
static user = {
|
||||
url: ["http://localhost:8092/api/2.0/people/user.json"],
|
||||
method: "GET",
|
||||
baseDir: "people",
|
||||
};
|
||||
};
|
||||
|
26
web/ASC.Web.Client/tests/mocking/mock-data/people/user.json
Normal file
26
web/ASC.Web.Client/tests/mocking/mock-data/people/user.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"count": 1,
|
||||
"response": {
|
||||
"firstName": "Test",
|
||||
"lastName": "Test",
|
||||
"status": 0,
|
||||
"activationStatus": 0,
|
||||
"department": "Group",
|
||||
"groups": [
|
||||
{
|
||||
"name": "Group",
|
||||
"id": "1",
|
||||
"manager": "Test"
|
||||
}
|
||||
],
|
||||
"isAdmin": false,
|
||||
"isLDAP": false,
|
||||
"isOwner": false,
|
||||
"isVisitor": false,
|
||||
"mobilePhoneActivationStatus": 0,
|
||||
"isSSO": false,
|
||||
"id": "00000000-0000-0000-0000-000000000000"
|
||||
},
|
||||
"status": 0,
|
||||
"statusCode": 200
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"count": 1,
|
||||
"response": {
|
||||
"ldapEnabled": false,
|
||||
"providers": [],
|
||||
"ssoLabel": "",
|
||||
"ssoUrl": "http://localhost"
|
||||
},
|
||||
"status": 0,
|
||||
"statusCode": 200
|
||||
}
|
@ -84,16 +84,49 @@ Scenario("Change phone page render test", async ({ I }) => {
|
||||
});
|
||||
|
||||
Scenario("Create user page render test", async ({ I }) => {
|
||||
I.mockEndpoint(Endpoints.confirm, "confirm");
|
||||
I.mockEndpoint(Endpoints.settings, "settings");
|
||||
I.mockEndpoint(Endpoints.build, "build");
|
||||
I.mockEndpoint(Endpoints.settings, "settings");
|
||||
I.mockEndpoint(Endpoints.password, "password");
|
||||
I.mockEndpoint(Endpoints.user, "user");
|
||||
I.mockEndpoint(Endpoints.providers, "providers");
|
||||
I.mockEndpoint(Endpoints.confirm, "confirm");
|
||||
I.mockEndpoint(Endpoints.capabilities, "capabilities");
|
||||
|
||||
I.amOnPage("/confirm/LinkInvite");
|
||||
I.amOnPage("/confirm/LinkInvite?type=LinkInvite&key=KEY&uid=user&emplType=1");
|
||||
|
||||
I.see("Web Office");
|
||||
|
||||
I.seeElement({
|
||||
react: "SocialButton",
|
||||
});
|
||||
|
||||
I.seeElement({
|
||||
react: "EmailInput",
|
||||
});
|
||||
|
||||
I.seeElement({
|
||||
react: "TextInput",
|
||||
props: {
|
||||
name: "first-name",
|
||||
},
|
||||
});
|
||||
|
||||
I.seeElement({
|
||||
react: "TextInput",
|
||||
props: {
|
||||
name: "last-name",
|
||||
},
|
||||
});
|
||||
|
||||
I.seeElement({
|
||||
react: "PasswordInput",
|
||||
});
|
||||
|
||||
I.seeElement({
|
||||
react: "Button",
|
||||
});
|
||||
|
||||
I.saveScreenshot(`4.create-user.png`);
|
||||
if (!isModel) {
|
||||
I.seeVisualDiff(`4.create-user.png`, {
|
||||
|
Loading…
Reference in New Issue
Block a user