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
| { | |
| "quantidade": 1, | |
| "usuarios": [ | |
| { | |
| "nome": "Fulano da Silva", | |
| "email": "[email protected]", | |
| "password": "teste", | |
| "administrador": "true", | |
| "_id": "0uxuPY0cbmQhpEz1" | |
| } |
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
| import org.apache.http.HttpStatus; | |
| import org.junit.Test; | |
| import static io.restassured.RestAssured.when; | |
| import static io.restassured.module.jsv.JsonSchemaValidator.matchesJsonSchemaInClasspath; | |
| public class ExemploContrato { | |
| @Test | |
| public void exemploContratoValidar() { |
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
| { | |
| "type": "object", | |
| "properties": { | |
| "quantidade": { | |
| "type": "integer" | |
| }, | |
| "usuarios": { | |
| "type": "array", | |
| "items": { | |
| "type": "object", |
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
| const cucumber = require('cypress-cucumber-preprocessor').default | |
| module.exports = (on, config) => { | |
| on('file:preprocessor', cucumber()) | |
| } |
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
| const cucumber = require('cypress-cucumber-preprocessor').default | |
| module.exports = (on, config) => { | |
| on('file:preprocessor', cucumber()) | |
| } |
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
| capabilities: { | |
| 'browserName': 'chrome', | |
| chromeOptions: { | |
| args: [ | |
| '--disable-gpu' | |
| ] | |
| } | |
| }, |
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
| capabilities: { | |
| 'browserName': 'chrome', | |
| chromeOptions: { | |
| args: [ | |
| '--disable-gpu', | |
| ] | |
| }, | |
| }, |
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
| Then("devo visualizar o resultado da adição", async function () { | |
| await expect(page.result.getText()) | |
| .to.eventually.equal('30') | |
| }); |
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
| When("eu fizer cálculos de adição", async function () { | |
| await page.adicionar('10', '20').then(); | |
| }) |
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(); |
NewerOlder