7854899f83bb7b8fcb2cf4e48bcfe2b4c4cbfda8
[vid.git] / vid-webpack-master / cypress / support / steps / drawingBoard / drawingBoardModel.steps.ts
1 declare namespace Cypress {
2   interface Chainable {
3     drawingBoardPressAddButtonByElementName: typeof drawingBoardPressAddButtonByElementName,
4     drawingBoardNumberOfExistingElementsShouldContains: typeof drawingBoardNumberOfExistingElementsShouldContains
5     getDrawingBoardDeployBtn: typeof getDrawingBoardDeployBtn
6   }
7 }
8
9 function drawingBoardPressAddButtonByElementName(elementName : string) : Chainable<any>  {
10   return cy.getElementByDataTestsId(elementName + '-add-btn');
11 }
12
13 function drawingBoardNumberOfExistingElementsShouldContains(expectedElements : number) : void   {
14   cy.getElementByDataTestsId('numberButton').contains(expectedElements);
15 }
16
17 function getDrawingBoardDeployBtn() : Chainable<any> {
18   return cy.getElementByDataTestsId('deployBtn');
19 }
20
21 Cypress.Commands.add('drawingBoardPressAddButtonByElementName', drawingBoardPressAddButtonByElementName);
22 Cypress.Commands.add('drawingBoardNumberOfExistingElementsShouldContains', drawingBoardNumberOfExistingElementsShouldContains);
23 Cypress.Commands.add('getDrawingBoardDeployBtn', getDrawingBoardDeployBtn);