summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts')
-rw-r--r--vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts b/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
new file mode 100644
index 000000000..b2b48b268
--- /dev/null
+++ b/vid-webpack-master/cypress/support/steps/drawingBoard/drawingBoardModel.steps.ts
@@ -0,0 +1,17 @@
+declare namespace Cypress {
+ interface Chainable {
+ drawingBoardPressAddButtonByElementName: typeof drawingBoardPressAddButtonByElementName,
+ drawingBoardNumberOfExistingElementsShouldContains: typeof drawingBoardNumberOfExistingElementsShouldContains
+ }
+}
+
+function drawingBoardPressAddButtonByElementName(elementName : string) : Chainable<any> {
+ return cy.getElementByDataTestsId(elementName + '-add-btn');
+}
+
+function drawingBoardNumberOfExistingElementsShouldContains(expectedElements : number) : void {
+ cy.getElementByDataTestsId('numberButton').contains(expectedElements);
+}
+
+Cypress.Commands.add('drawingBoardPressAddButtonByElementName', drawingBoardPressAddButtonByElementName);
+Cypress.Commands.add('drawingBoardNumberOfExistingElementsShouldContains', drawingBoardNumberOfExistingElementsShouldContains);