Created
July 4, 2018 12:52
-
-
Save uLucasFraga/9ec6aa3c8d256e0fe19f1fc6652d758b to your computer and use it in GitHub Desktop.
ARQUIVO DE STEPS_DEFINITIONS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// protractor/features/step_definitions/calculator_steps.js | |
const { Given, When, Then } = require('cucumber') | |
const expect = require('chai').use(require("chai-as-promised")).expect; | |
const CalculadoraPage = require('../pages/calculadora.po.js') | |
const page = new CalculadoraPage(); | |
Given('que eu esteja na tela de cálculos', async function () { | |
await page.visit(); | |
}); | |
When("eu fizer cálculos de adição", async function () { | |
await page.adicionar('10', '20').then(); | |
}); | |
Then("devo visualizar o resultado da adição", async function () { | |
await expect(page.result.getText()) | |
.to.eventually.equal('30') | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment