summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
blob: ae3bf6da7333f1db6bf15670e05e870260b67335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
declare namespace Cypress {
  interface Chainable {
    drawingBoardPressAddButtonByElementName: typeof drawingBoardPressAddButtonByElementName,
    drawingBoardNumberOfExistingElementsShouldContains: typeof drawingBoardNumberOfExistingElementsShouldContains
    getDrawingBoardDeployBtn: typeof getDrawingBoardDeployBtn
  }
}

function drawingBoardPressAddButtonByElementName(elementName : string) : Chainable<any>  {
  return cy.getElementByDataTestsId(elementName + '-add-btn');
}

function drawingBoardNumberOfExistingElementsShouldContains(expectedElements : number) : void   {
  cy.getElementByDataTestsId('numberButton').contains(expectedElements);
}

function getDrawingBoardDeployBtn() : Chainable<any> {
  return cy.getElementByDataTestsId('deployBtn');
}


Cypress.Commands.add('drawingBoardPressAddButtonByElementName', drawingBoardPressAddButtonByElementName);
Cypress.Commands.add('drawingBoardNumberOfExistingElementsShouldContains', drawingBoardNumberOfExistingElementsShouldContains);
Cypress.Commands.add('getDrawingBoardDeployBtn', getDrawingBoardDeployBtn);