From e588e25dff692dfc09dca36acd187dbd3f0bdf6b Mon Sep 17 00:00:00 2001 From: Alisson Neves Date: Tue, 21 Aug 2018 13:38:03 -0300 Subject: [PATCH 1/2] =?UTF-8?q?:fire:=20Remover=20diret=C3=B3rio=20e=20tes?= =?UTF-8?q?te=20funcional=20com=20estrutura=20duplicada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 1 - src/components/comum/campoTexto/index.js | 2 +- src/testeFuncional/pages/denuncia.js | 28 ------------------ src/testeFuncional/pages/home.js | 28 ------------------ src/testeFuncional/pages/login.js | 29 ------------------- src/testeFuncional/steps/steps_file.js | 5 ---- .../testes/jornadaDeUsuario_test.js | 11 ------- yarn.lock | 27 +++++------------ 8 files changed, 8 insertions(+), 123 deletions(-) delete mode 100644 src/testeFuncional/pages/denuncia.js delete mode 100644 src/testeFuncional/pages/home.js delete mode 100644 src/testeFuncional/pages/login.js delete mode 100644 src/testeFuncional/steps/steps_file.js delete mode 100644 src/testeFuncional/testes/jornadaDeUsuario_test.js diff --git a/.eslintignore b/.eslintignore index 22411a75..1f76ae34 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ src/utils/registerServiceWorker.js -src/testeFuncional src/setupTests.js src/tests diff --git a/src/components/comum/campoTexto/index.js b/src/components/comum/campoTexto/index.js index 2cbff1c0..c5af5431 100644 --- a/src/components/comum/campoTexto/index.js +++ b/src/components/comum/campoTexto/index.js @@ -44,7 +44,7 @@ const campoTexto = ({ component={renderCampoTexto} validate={validacoes} normalize={normalize} - />); + />).isRequired; } return renderCampoTexto({ divClasse, id, type, onChange, inputClasse, maxLen, placeholder, label, state, meta: {}, diff --git a/src/testeFuncional/pages/denuncia.js b/src/testeFuncional/pages/denuncia.js deleted file mode 100644 index 38f35547..00000000 --- a/src/testeFuncional/pages/denuncia.js +++ /dev/null @@ -1,28 +0,0 @@ -let I; - -module.exports = { - - _init() { - I = actor(); - }, - - // locators - fields: { - detalhamento: { id: 'detalhamento' }, - data: { id: 'dataHoraOcorrencia' }, - - }, - botaoSalvarDenuncia: { name: 'salvarDenuncia' }, - - - // methods - salvarDenuncia() { - I.click(this.botaoSalvarDenuncia); - }, - - preencherDenuncia(detalhamento, data) { - I.fillField(this.fields.detalhamento, detalhamento); - I.fillField(this.fields.data, data); - }, - -}; diff --git a/src/testeFuncional/pages/home.js b/src/testeFuncional/pages/home.js deleted file mode 100644 index 8c07bb87..00000000 --- a/src/testeFuncional/pages/home.js +++ /dev/null @@ -1,28 +0,0 @@ -let I; - -module.exports = { - - _init() { - I = actor(); - }, - - // locators - botaoSobre: { name: 'sobre' }, - botaoLogin: { name: 'Registrar / Entrar' }, - botaoDenuncia: { name: 'denuncia' }, - - - // methods - login() { - I.click(this.botaoLogin); - }, - - sobre() { - I.click(this.botaoSobre); - }, - - denuncia() { - I.click(this.botaoDenuncia); - }, - -} diff --git a/src/testeFuncional/pages/login.js b/src/testeFuncional/pages/login.js deleted file mode 100644 index 5046862b..00000000 --- a/src/testeFuncional/pages/login.js +++ /dev/null @@ -1,29 +0,0 @@ -const actor = require('../steps/steps_file'); - -let I; - -module.exports = { - - _init() { - I = actor(); - }, - - // locators - fields: { - email: 'Email', - senha: 'Senha', - }, - botaoEntrar: { name: 'Entrar' }, - - - // methods - entrar() { - I.click(this.botaoEntrar); - }, - - preencherLogin(email, senha) { - I.fillField(this.fields.email, email); - I.fillField(this.fields.senha, senha); - }, - -}; diff --git a/src/testeFuncional/steps/steps_file.js b/src/testeFuncional/steps/steps_file.js deleted file mode 100644 index 8950eab2..00000000 --- a/src/testeFuncional/steps/steps_file.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function () { - return actor({ - - }); -}; diff --git a/src/testeFuncional/testes/jornadaDeUsuario_test.js b/src/testeFuncional/testes/jornadaDeUsuario_test.js deleted file mode 100644 index ec4ba6a3..00000000 --- a/src/testeFuncional/testes/jornadaDeUsuario_test.js +++ /dev/null @@ -1,11 +0,0 @@ -Feature('Criar Denuncia'); - -Scenario('Fazer Denuncia', (I, homePage, loginPage, denunciaPage) => { - I.amOnPage('/'); - homePage.denuncia(); - I.see('Acesso'); - loginPage.preencherLogin('a@a.com', '123456'); - loginPage.entrar(); - denunciaPage.preencherDenuncia('Teste', '12/10/2017'); - denunciaPage.salvarDenuncia(); -}); diff --git a/yarn.lock b/yarn.lock index 3c5c7eba..3769f887 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1303,10 +1303,6 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - buffer-indexof@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" @@ -1715,16 +1711,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.7: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@^1.6.0: +concat-stream@^1.4.7, concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -7878,15 +7865,15 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" +which@1, which@1.2.x, which@^1.2.12, which@^1.2.9: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: isexe "^2.0.0" -which@1.2.x: - version "1.2.14" - resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" +which@^1.2.14, which@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: isexe "^2.0.0" From 2c97bd4c729356a76d7f67725f911c4c4c05af09 Mon Sep 17 00:00:00 2001 From: Alisson Neves Date: Wed, 22 Aug 2018 13:55:39 -0300 Subject: [PATCH 2/2] =?UTF-8?q?:shirt:=20Adicionar=20refer=C3=AAncia=20aos?= =?UTF-8?q?=20par=C3=A2metros=20para=20remover=20error=20do=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/comum/campoTexto/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/comum/campoTexto/index.js b/src/components/comum/campoTexto/index.js index c5af5431..dfb1e851 100644 --- a/src/components/comum/campoTexto/index.js +++ b/src/components/comum/campoTexto/index.js @@ -28,7 +28,7 @@ const renderCampoTexto = ({ const campoTexto = ({ divClasse, id, type, onChange, inputClasse, maxLen, placeholder, label, state, validacoes, normalize -}) => { +} = this) => { if (state) { return ().isRequired; + />); } return renderCampoTexto({ divClasse, id, type, onChange, inputClasse, maxLen, placeholder, label, state, meta: {},