Skip to content

Commit

Permalink
e2e test-show preview
Browse files Browse the repository at this point in the history
  • Loading branch information
danloa committed Sep 11, 2023
1 parent 743385d commit b2c3808
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/e2e/specs/previewPanel/PreviewPanel.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const { nodeTypes } = require('../../support/constants');
const {
clickAndDropElement,
waitToRenderAllShapes, getCrownButtonForElement,
} = require('../../support/utils');

describe('Inspector panel test', { scrollBehavior: false }, () => {

beforeEach(() => {
cy.get('.control-add').click();
cy.get('[data-test=processmaker-modeler-start-event] > .pinIcon').click();
cy.get('[data-test=processmaker-modeler-task] > .pinIcon').click();
waitToRenderAllShapes();

cy.get('.control-add').click();
waitToRenderAllShapes();
cy.get('[data-test=explorer-rail]').should('not.be.visible');
waitToRenderAllShapes();
});


it('should open preview panel when clicks on preview icon', () => {
const taskPosition = { x: 500, y: 500 };
clickAndDropElement(nodeTypes.task, taskPosition);
crown('preview-button');
});

});

function crown(buttonId)
{
getCrownButtonForElement(null, buttonId).click({ force: true });
}

0 comments on commit b2c3808

Please sign in to comment.