diff --git a/apps/sensenet/cypress/e2e/content/action_bar.cy.ts b/apps/sensenet/cypress/e2e/content/action_bar.cy.ts new file mode 100644 index 000000000..5df24504b --- /dev/null +++ b/apps/sensenet/cypress/e2e/content/action_bar.cy.ts @@ -0,0 +1,22 @@ +import { PATHS, resolvePathParams } from '../../../src/application-paths' +import { pathWithQueryParams } from '../../../src/services/query-string-builder' + +describe('Action bar testing', () => { + beforeEach(() => { + cy.login() + cy.visit( + pathWithQueryParams({ + path: resolvePathParams({ path: PATHS.content.appPath, params: { browseType: 'explorer' } }), + newParams: { repoUrl: Cypress.env('repoUrl'), path: '/SampleWorkspace/Document_Library' }, + }), + ) + }) + + it('should edit button show in action bar', () => { + cy.get('[data-test="menu-item-document-library"]').rightclick({ force: true }) + cy.get('[data-test="content-context-menu-browse"]').click() + cy.get('[data-test="viewtitle-edit"]').should('be.visible').click() + cy.get('[data-test="viewtitle-details"]').should('be.visible').click() + cy.get('[data-test="viewtitle-edit"]').should('be.visible') + }) +}) diff --git a/apps/sensenet/src/components/view-controls/common/view-title.tsx b/apps/sensenet/src/components/view-controls/common/view-title.tsx index 71560631d..e56640835 100644 --- a/apps/sensenet/src/components/view-controls/common/view-title.tsx +++ b/apps/sensenet/src/components/view-controls/common/view-title.tsx @@ -69,6 +69,7 @@ export const ViewTitle: React.FunctionComponent = (props) => {
{props.actionName === 'browse' && ( { history.push( @@ -97,6 +98,7 @@ export const ViewTitle: React.FunctionComponent = (props) => { )} {props.actionName === 'edit' && ( { history.push(