Skip to content

Commit

Permalink
removed should be able to invite staff user
Browse files Browse the repository at this point in the history
  • Loading branch information
wojteknowacki committed Nov 20, 2023
1 parent 7ce5fd8 commit 1b4b8dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/staffMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("Staff members", () => {
});

it(
"should be able to invite staff user. TC: SALEOR_3501 - migration in progress - to delete when done",
"should be able to invite staff user. TC: SALEOR_3501",
{ tags: ["@staffMembers", "@allEnv", "@critical"] },
() => {
const firstName = faker.name.firstName();
Expand Down
39 changes: 0 additions & 39 deletions playwright/tests/staffMembers.spec.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,11 @@
import { BasicApiService } from "@api/basics";
import { USERS } from "@data/e2eTestData";
import { URL_LIST } from "@data/url";
import { ConfigurationPage } from "@pages/configurationPage";
import { StaffMembersPage } from "@pages/staffMembersPage";
import { expect, test } from "@playwright/test";

test.use({ storageState: "playwright/.auth/admin.json" });

test("TC: SALEOR_36 User should be able to invite staff member with full access permissions @basic-regression @staff-members", async ({
page,
request,
}) => {
const configurationPage = new ConfigurationPage(page);
const staffMembersPage = new StaffMembersPage(page, request);
const userEmail = `francesca${await staffMembersPage.basePage.getRandomInt(
1000000,
)}@gmail.com`;

await page.goto(URL_LIST.configuration);
await configurationPage.openStaffMembers();

await staffMembersPage.clickInviteStaffMemberButton();
await staffMembersPage.inviteStaffMembersDialog.typeNameLastNameAndEmail(
"Francesca",
"Leek",
userEmail,
);
await staffMembersPage.inviteStaffMembersDialog.clickSendInviteButton();

await staffMembersPage.clickPermissionsGroupSelectButton();
await staffMembersPage.assignUserToPermissionGroup("Full Access");
await staffMembersPage.clickSaveButton();
await staffMembersPage.basePage.expectSuccessBanner();
expect(await staffMembersPage.assignedPermissionGroups.count()).toEqual(1);
expect(staffMembersPage.assignedPermissionGroups).toContainText(
"Full Access",
);

const singleUserEmails =
await staffMembersPage.mailpitService.getEmailsForUser(userEmail);

await expect(singleUserEmails[0].Subject).toContain(
"Set Your Dashboard Password",
);
});

test("TC: SALEOR_37 Admin User should be able to deactivate other user @basic-regression @staff-members", async ({
page,
request,
Expand Down

0 comments on commit 1b4b8dc

Please sign in to comment.