Created
August 11, 2020 09:43
-
-
Save steppat/64eae8b2005345c71f23b78941bf2a2e to your computer and use it in GitHub Desktop.
This file contains 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
public class LeilaoSteps implements io.cucumber.java8.Pt{ | |
private LoginPage loginPage; | |
private LeiloesPage leiloesPage; | |
private NovoLeilaoPage novoLeilaoPage; | |
private Browser browser; | |
public LeilaoSteps() { | |
Dado("um usuario logado", () -> { | |
this.browser = new Browser(); | |
browser.seed(); | |
loginPage = browser.getLoginPage(); | |
leiloesPage = loginPage.realizaLoginComoFulano(); | |
}); | |
Quando("acessa a pagina de novo leilao", () -> { | |
novoLeilaoPage = this.leiloesPage.visitaPaginaParaCriarUmNovoLeilao(); | |
}); | |
Quando("prenche o formulario com dados validos", () -> { | |
this.leiloesPage = this.novoLeilaoPage.preencheForm("PC Novo", "1500", "01/11/2020"); | |
}); | |
Entao("volta para a pagina de leiloes", () -> { | |
Assert.assertTrue(this.leiloesPage.estaNaPaginaDeLeiloes()); | |
}); | |
Entao("o novo leilao aparece na tabela", () -> { | |
this.leiloesPage.existe("PC Novo", "1500", "01/11/2020", "fulano"); | |
this.browser.clean(); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment