-
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
216 changed files
with
8,156 additions
and
10,416 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"websocket":true, | ||
"origins":["*:*"], | ||
"cookie_needed":false, | ||
"entropy":3320651666 | ||
} |
60 changes: 60 additions & 0 deletions
60
apps/sensenet/cypress/integration/breadcrumb/breadcrumb.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,60 @@ | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
const expectedBreadcrumbItems = ['Content', '/', 'IT Workspace', '/', 'Document library'] | ||
|
||
describe('Breadcrumb', () => { | ||
before(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
it('breadcrumb after navigating to IT Workspace, breadcrumb should be displayed as it should.', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]') | ||
.click() | ||
.then(() => { | ||
cy.get('[data-test="table-cell-calendar"]').should('be.visible') | ||
}) | ||
|
||
cy.get('[data-test="menu-item-document-library"]').click({ force: true }) | ||
cy.get('nav[aria-label="breadcrumb"] li') | ||
.should('have.length', expectedBreadcrumbItems.length) | ||
.each(($el) => { | ||
expect(expectedBreadcrumbItems).to.include($el.text()) | ||
}) | ||
}) | ||
it('clicking on parent item in the breadcrumb should open the chosen container', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]') | ||
.click() | ||
.then(() => { | ||
cy.get('[data-test="table-cell-calendar"]').should('be.visible') | ||
}) | ||
cy.get('[data-test="menu-item-document-library"]') | ||
.click({ force: true }) | ||
.then(() => { | ||
cy.get('[data-test="table-cell-calendar"]').should('not.be.visible') | ||
}) | ||
cy.get('nav[aria-label="breadcrumb"] li') | ||
.find('button[aria-label="IT Workspace"]') | ||
.click() | ||
.then(() => { | ||
cy.get('[data-test="table-cell-calendar"]').should('be.visible') | ||
}) | ||
}) | ||
it('right click on a breadcrumb item should open its actionmenu.', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]') | ||
.click() | ||
.then(() => { | ||
cy.get('[data-test="table-cell-calendar"]').should('be.visible') | ||
}) | ||
cy.get('[data-test="menu-item-document-library"]').click({ force: true }) | ||
cy.get('nav[aria-label="breadcrumb"] li') | ||
.should('have.length', expectedBreadcrumbItems.length) | ||
.find('button[aria-label="IT Workspace"]') | ||
.rightclick() | ||
.then(() => { | ||
cy.get('ul[role="menu"]').should('be.visible') | ||
}) | ||
}) | ||
}) |
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
16 changes: 8 additions & 8 deletions
16
apps/sensenet/cypress/integration/drawer/drawerActiveStates.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
65 changes: 65 additions & 0 deletions
65
apps/sensenet/cypress/integration/drawer/drawerItemsNavigation.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,65 @@ | ||
import { globals } from '../../../src/globalStyles' | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
describe('Drawer items navigation', () => { | ||
before(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
|
||
it('clicking on the search icon on the drawer should navigate to the Saved Queries page', () => { | ||
cy.get('[data-test="drawer-menu-item-search"]').as('searchIcon') | ||
cy.get('@searchIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/saved-queries/') | ||
}) | ||
}) | ||
|
||
it('clicking on the globe icon on the drawer should navigate to the Content page', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').as('contentIcon') | ||
cy.get('@contentIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/content/explorer/') | ||
}) | ||
}) | ||
|
||
it('clicking on the Users and groups icon on the drawer should navigate to the Users and groups page', () => { | ||
cy.get('[data-test="drawer-menu-item-users-and-groups"]').as('UsersAndGroupsIcon') | ||
cy.get('@UsersAndGroupsIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/users-and-groups/explorer/') | ||
}) | ||
}) | ||
|
||
it('clicking on the Trash icon on the drawer on the drawer should navigate to the Trash page', () => { | ||
cy.get('[data-test="drawer-menu-item-trash"]').as('trashIcon') | ||
cy.get('@trashIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/trash/explorer/') | ||
}) | ||
}) | ||
|
||
it('clicking on the Content Types icon on the drawer should navigate to the Content Types page', () => { | ||
cy.get('[data-test="drawer-menu-item-content-types"]').as('contentTypesIcon') | ||
cy.get('@contentTypesIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/content-types/explorer/') | ||
}) | ||
}) | ||
|
||
it('clicking on the Localization icon on the drawer should navigate to the Localization page', () => { | ||
cy.get('[data-test="drawer-menu-item-localization"]').as('localizationIcon') | ||
cy.get('@localizationIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/localization/explorer/') | ||
}) | ||
}) | ||
|
||
it('clicking on the Setup icon on the drawer should navigate to the Setup page', () => { | ||
cy.get('[data-test="drawer-menu-item-setup"]').as('setupIcon') | ||
cy.get('@setupIcon').click() | ||
cy.location().should((loc) => { | ||
expect(loc.pathname).to.eq('/setup/') | ||
}) | ||
}) | ||
}) |
45 changes: 45 additions & 0 deletions
45
apps/sensenet/cypress/integration/edit-content/edit-content.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,45 @@ | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
describe('Edit Content', () => { | ||
before(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
it('Test case 1: edit content should work properly.', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]') | ||
.rightclick() | ||
.then(() => { | ||
cy.get('[data-test="content-context-menu-edit"]').click() | ||
cy.get('#DisplayName').type(' Test') | ||
cy.contains('Submit').click() | ||
cy.get(`[data-test="table-cell-it-workspace-test"]`).should('have.text', 'IT Workspace Test') | ||
// breadcrumb test | ||
const expectedBreadcrumbItems = ['Content', '/', 'IT Workspace Test'] | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace-test"]').click() | ||
cy.get('nav[aria-label="breadcrumb"] li').each(($el) => { | ||
expect(expectedBreadcrumbItems).to.include($el.text()) | ||
}) | ||
}) | ||
}) | ||
it('Test case 2: edit content should work properly.', () => { | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace-test"]') | ||
.rightclick() | ||
.then(() => { | ||
cy.get('[data-test="content-context-menu-edit"]').click() | ||
cy.get('#DisplayName').type('{selectall}IT Workspace') | ||
cy.contains('Submit') | ||
.click() | ||
.then(() => { | ||
const expectedBreadcrumbItems = ['Content', '/', 'IT Workspace'] | ||
cy.get('[data-test="drawer-menu-item-content"]').click() | ||
cy.get('[data-test="menu-item-it-workspace"]').click() | ||
cy.get('nav[aria-label="breadcrumb"] li').each(($el) => { | ||
expect(expectedBreadcrumbItems).to.include($el.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
const contextMenuItems = ['browse', 'copyto', 'edit', 'moveto', 'delete'] | ||
describe('Groups', () => { | ||
before(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
it('Groups list should have the appropriate data', () => { | ||
const items = ['Administrators', 'Developers', 'Editors'] | ||
cy.get('[data-test="drawer-menu-item-users-and-groups"]').click() | ||
cy.get('[data-test="groups"]').click() | ||
items.forEach((item) => { | ||
cy.get(`[data-test="table-cell-${item.replace(/\s+/g, '-').toLowerCase()}"]`).should('be.visible') | ||
}) | ||
}) | ||
it('right click on a group should open context-menu', () => { | ||
cy.get('[data-test="drawer-menu-item-users-and-groups"]').click() | ||
cy.get('[data-test="groups"]').click() | ||
cy.get('[data-test="table-cell-editors"]') | ||
.rightclick() | ||
.then(() => { | ||
contextMenuItems.forEach((item) => { | ||
cy.get(`[data-test="content-context-menu-${item.replace(/\s+/g, '-').toLowerCase()}"]`).should('be.visible') | ||
}) | ||
cy.get('body').click() | ||
}) | ||
}) | ||
it('Double click on group should open a edit form of the content', () => { | ||
cy.get('[data-test="drawer-menu-item-users-and-groups"]').click() | ||
cy.get('[data-test="groups"]').click() | ||
cy.get('[data-test="table-cell-editors"]').dblclick() | ||
cy.get('[data-test="viewtitle"').should('have.text', 'Edit Editors') | ||
cy.get('[data-test="cancel"]').click() | ||
}) | ||
}) |
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
47 changes: 47 additions & 0 deletions
47
apps/sensenet/cypress/integration/saved-queries/saved-queries.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,47 @@ | ||
import { pathWithQueryParams } from '../../../src/services/query-string-builder' | ||
|
||
describe('Saved queries', () => { | ||
before(() => { | ||
cy.login() | ||
cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) | ||
}) | ||
it('saving a query should work properly.', () => { | ||
const inputText = "+InFolder:'/Root/Content/IT/Document_Library'" | ||
cy.get('[data-test="drawer-menu-item-search"]').click() | ||
cy.get('a[title="New search"]').click() | ||
cy.get('[data-test="input-search"]').type(inputText) | ||
cy.get('[data-test="table-cell-chicago"]').should('be.visible') | ||
cy.get('[data-test="table-cell-munich"]').should('be.visible') | ||
cy.get('button[aria-label="Save Query"]') | ||
.click() | ||
.then(() => { | ||
cy.get('div[role="dialog"]').find('input[type="text"]').clear().type('test query for IT Doclib') | ||
cy.get('div[role="dialog"]').find('button[aria-label="Save"]').click() | ||
cy.get('[data-test="drawer-menu-item-search"]') | ||
.click() | ||
.then(() => { | ||
cy.get('[data-test="table-cell-test-query-for-it-doclib"]').should('be.visible') | ||
}) | ||
cy.get('[data-test="table-cell-test-query-for-it-doclib"]').dblclick() | ||
cy.get('[data-test="input-search"]').find('input[type="text"]').should('have.value', inputText) | ||
|
||
cy.get('[data-test="table-cell-chicago"]').should('be.visible') | ||
cy.get('[data-test="table-cell-munich"]').should('be.visible') | ||
}) | ||
}) | ||
it('delete of a saved query should work properly.', () => { | ||
cy.get('[data-test="drawer-menu-item-search"]').click() | ||
cy.get('[data-test="table-cell-test-query-for-it-doclib"]') | ||
.rightclick() | ||
.then(() => { | ||
cy.get('[data-test="content-context-menu-delete"]') | ||
.click() | ||
.then(() => { | ||
cy.get('[data-test="delete-permanently"]').click() | ||
cy.get('button[aria-label="Delete"]').click() | ||
cy.get('h6').should('have.text', 'There is no query saved yet.') | ||
cy.get('[data-test="table-cell-test-query-for-it-doclib"]').should('not.be.visible') | ||
}) | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.