-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
118 changed files
with
3,576 additions
and
3,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
apps/sensenet/cypress/integration/permission-editor/add_new_permission.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
describe('Add new permission entry', () => { | ||
before(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
|
||
it('opens a new dialog', () => { | ||
cy.viewport(1840, 890) | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]').rightclick() | ||
cy.get('[data-test="content-context-menu-setpermissions"]').click() | ||
cy.get('[data-test="assing-new-permission"]').click() | ||
cy.get('[data-test="member-select-dialog"]').should('contain.text', 'New permission entry') | ||
|
||
cy.get('[data-test="reference-input"]').type('Developer D') | ||
cy.get('[data-test="suggestion-developer-dog"]').click() | ||
cy.get('[data-test="member-select-add"]').click() | ||
cy.get('[data-test="set-on-this-developer-dog"]').should('exist') | ||
cy.get('[data-test="permission-dialog-title"]').should('contain.text', 'Developer Dog') | ||
cy.get('[data-test="permission-editor-cancel"]').click() | ||
cy.get('[data-test="set-on-this-developer-dog"]').should('not.exist') | ||
cy.get('[data-test="permission-dialog-title"]').should('not.exist') | ||
}) | ||
}) |
57 changes: 57 additions & 0 deletions
57
apps/sensenet/cypress/integration/permission-editor/edit_group_member.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
const expectedMembers = ['Developer Dog'] | ||
const expectedMembersAfterAdditon = ['Developer Dog', 'Business Cat'] | ||
|
||
describe('Editing group member in permission editor', () => { | ||
beforeEach(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
|
||
it('adding a new member to a group works from permission editor', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]').rightclick() | ||
cy.get('[data-test="content-context-menu-setpermissions"]').click() | ||
cy.get('[data-test="permission-inherited-list"]').click() | ||
cy.get('[data-test="inherited-developers"]').click() | ||
cy.get('[data-test="members-tab"]').click() | ||
cy.get('[data-test="reference-list"] li') | ||
.should('have.length', expectedMembers.length) | ||
.each(($el) => { | ||
expect(expectedMembers).to.include($el.children().eq(0).children().eq(1).text()) | ||
}) | ||
cy.get('[data-test="reference-input"]').type('Business C') | ||
cy.get('[data-test="suggestion-business-cat"]').click() | ||
cy.get('[data-test="add-new-member"]').click() | ||
cy.get('[data-test="reference-list"] li') | ||
.should('have.length', expectedMembersAfterAdditon.length) | ||
.each(($el) => { | ||
expect(expectedMembersAfterAdditon).to.include($el.children().eq(0).children().eq(1).text()) | ||
}) | ||
cy.get('[data-test="permission-editor-submit"]').click() | ||
cy.get('[data-test="drawer-menu-item-users-and-groups"]').click() | ||
cy.get('[data-test="groups"]').click() | ||
cy.get(`[data-test="developers-members"]`).click() | ||
cy.get('[data-test="reference-list"] li') | ||
.should('have.length', expectedMembersAfterAdditon.length) | ||
.each(($el) => { | ||
expect(expectedMembersAfterAdditon).to.include($el.children().eq(0).children().eq(1).text()) | ||
}) | ||
cy.get(`[data-test="business-cat-delete"]`).click() | ||
}) | ||
|
||
it('contains the appropriate values', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]').rightclick() | ||
cy.get('[data-test="content-context-menu-setpermissions"]').click() | ||
cy.get('[data-test="permission-inherited-list"]').click() | ||
cy.get('[data-test="inherited-developers"]').click() | ||
cy.get('[data-test="members-tab"]').click() | ||
cy.get('[data-test="reference-list"] li') | ||
.should('have.length', expectedMembers.length) | ||
.each(($el) => { | ||
expect(expectedMembers).to.include($el.children().eq(0).children().eq(1).text()) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.