From c99be336862ba06971bfaa4679460335523b97ca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Sun, 19 Apr 2020 18:11:54 +0200
Subject: [PATCH 01/11] =?UTF-8?q?#41=20Implantaci=C3=B3n=20de=20nuxt=20en?=
=?UTF-8?q?=20el=20proyecto=20en=20sustituci=C3=B3n=20de=20vue-cli?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.babelrc | 12 +
.env.example | 1 -
.eslintrc | 8 +-
.gitignore | 1 +
{src/assets => assets}/banner.gif | Bin
{src => assets}/styles/_variables.scss | 0
babel.config.js | 5 -
{src/components => components}/ActorCard.vue | 28 +-
.../components => components}/ChapterCard.vue | 28 +-
.../CharacterCard.vue | 24 +-
{src/components => components}/Footer.vue | 4 +-
{src/components => components}/Header.vue | 2 +-
{src/components => components}/Menu.vue | 70 +-
jest.config.js | 24 +-
src/App.vue => layouts/default.vue | 14 +-
locales/es.js | 131 +
middleware/README.md | 8 +
nuxt.config.js | 99 +
package-lock.json | 31618 ++++++++--------
package.json | 51 +-
pages/actors/_slug/index.vue | 166 +
.../Actors.vue => pages/actors/index.vue | 61 +-
pages/characters/_slug/index.vue | 169 +
.../characters/index.vue | 62 +-
src/views/Home.vue => pages/index.vue | 89 +-
.../_season_number/chapters/_slug/index.vue | 142 +-
.../Season.vue => pages/seasons/index.vue | 68 +-
plugins/README.md | 7 +
.../plugins => plugins}/anhqvClient/client.js | 0
{src/plugins => plugins}/anhqvClient/index.js | 4 +-
plugins/element-ui.js | 5 +
plugins/nuxt-anhqv-client.js | 6 +
{src/plugins => plugins}/vueAnhqvClient.js | 0
public/index.html | 14 -
server.js | 22 -
src/i18n.js | 23 -
src/locales/es.json | 132 -
src/main.js | 39 -
src/router/index.js | 86 -
src/store/index.js | 9 -
src/store/modules/index.js | 9 -
src/views/ActorDetail.vue | 130 -
src/views/CharacterDetail.vue | 126 -
.../images/actors/adria-collado.jpg | Bin
.../images/actors/antonio-gomez.jpg | Bin
.../images/actors/dani-ballesteros.jpg | Bin
.../images/actors/daniel-guzman.jpg | Bin
.../images/actors/desconocido.jpg | Bin
.../images/actors/edu-garcia.jpg | Bin
.../images/actors/eduardo-gomez.jpg | Bin
.../images/actors/emma-penella.jpg | Bin
.../images/actors/fernando-tejero.jpg | Bin
.../images/actors/gemma-cuervo.jpg | Bin
.../images/actors/guillermo-ortega.jpg | Bin
.../images/actors/jose-luis-gil.jpg | Bin
.../images/actors/joseba-apaolaza.jpg | Bin
.../images/actors/laura-pamplona.jpg | Bin
.../images/actors/loles-leon.jpg | Bin
.../images/actors/luis-merlo.jpg | Bin
.../images/actors/malena-alterio.jpg | Bin
.../images/actors/maria-adanez.jpg | Bin
.../images/actors/marivi-bilbao.jpg | Bin
.../images/actors/santiago-segura.jpg | Bin
.../images/actors/sofia-nieto.jpg | Bin
{public => static}/images/chapters/1x01.jpg | Bin
{public => static}/images/chapters/1x02.jpg | Bin
{public => static}/images/chapters/1x03.jpg | Bin
{public => static}/images/chapters/1x04.jpg | Bin
{public => static}/images/chapters/1x05.jpg | Bin
{public => static}/images/chapters/1x06.jpg | Bin
{public => static}/images/chapters/1x07.jpg | Bin
{public => static}/images/chapters/1x08.jpg | Bin
{public => static}/images/chapters/1x09.jpg | Bin
{public => static}/images/chapters/1x10.jpg | Bin
{public => static}/images/chapters/1x11.jpg | Bin
{public => static}/images/chapters/1x12.jpg | Bin
{public => static}/images/chapters/1x13.jpg | Bin
{public => static}/images/chapters/1x14.jpg | Bin
{public => static}/images/chapters/1x15.jpg | Bin
{public => static}/images/chapters/1x16.jpg | Bin
{public => static}/images/chapters/1x17.jpg | Bin
{public => static}/images/chapters/2x01.jpg | Bin
{public => static}/images/chapters/2x02.jpg | Bin
{public => static}/images/chapters/2x03.jpg | Bin
{public => static}/images/chapters/2x04.jpg | Bin
{public => static}/images/chapters/2x05.jpg | Bin
{public => static}/images/chapters/2x06.jpg | Bin
{public => static}/images/chapters/2x07.jpg | Bin
{public => static}/images/chapters/2x08.jpg | Bin
{public => static}/images/chapters/2x09.jpg | Bin
{public => static}/images/chapters/2x10.jpg | Bin
{public => static}/images/chapters/2x11.jpg | Bin
{public => static}/images/chapters/2x12.jpg | Bin
{public => static}/images/chapters/2x13.jpg | Bin
{public => static}/images/chapters/2x14.jpg | Bin
{public => static}/images/chapters/3x01.jpg | Bin
{public => static}/images/chapters/3x02.jpg | Bin
{public => static}/images/chapters/3x03.jpg | Bin
{public => static}/images/chapters/3x04.jpg | Bin
{public => static}/images/chapters/3x05.jpg | Bin
{public => static}/images/chapters/3x06.jpg | Bin
{public => static}/images/chapters/3x07.jpg | Bin
{public => static}/images/chapters/3x07b.jpg | Bin
{public => static}/images/chapters/3x08.jpg | Bin
{public => static}/images/chapters/3x09.jpg | Bin
{public => static}/images/chapters/3x10.jpg | Bin
{public => static}/images/chapters/3x11.jpg | Bin
{public => static}/images/chapters/3x12.jpg | Bin
{public => static}/images/chapters/3x13.jpg | Bin
{public => static}/images/chapters/3x14.jpg | Bin
{public => static}/images/chapters/3x15.jpg | Bin
{public => static}/images/chapters/3x16.jpg | Bin
{public => static}/images/chapters/3x17.jpg | Bin
{public => static}/images/chapters/3x18.jpg | Bin
{public => static}/images/chapters/3x19.jpg | Bin
{public => static}/images/chapters/3x20.jpg | Bin
{public => static}/images/chapters/3x21.jpg | Bin
{public => static}/images/chapters/3x22.jpg | Bin
{public => static}/images/chapters/3x23.jpg | Bin
{public => static}/images/chapters/3x24.jpg | Bin
{public => static}/images/chapters/3x25.jpg | Bin
{public => static}/images/chapters/3x25b.jpg | Bin
{public => static}/images/chapters/3x26.jpg | Bin
{public => static}/images/chapters/3x27.jpg | Bin
{public => static}/images/chapters/3x28.jpg | Bin
{public => static}/images/chapters/3x29.jpg | Bin
{public => static}/images/chapters/3x30.jpg | Bin
{public => static}/images/chapters/3x31.jpg | Bin
{public => static}/images/chapters/3x32.jpg | Bin
{public => static}/images/chapters/3x33.jpg | Bin
{public => static}/images/chapters/4x01.jpg | Bin
{public => static}/images/chapters/4x02.jpg | Bin
{public => static}/images/chapters/4x03.jpg | Bin
{public => static}/images/chapters/4x04.jpg | Bin
{public => static}/images/chapters/4x05.jpg | Bin
{public => static}/images/chapters/4x06.jpg | Bin
{public => static}/images/chapters/4x07.jpg | Bin
{public => static}/images/chapters/4x08.jpg | Bin
{public => static}/images/chapters/4x09.jpg | Bin
{public => static}/images/chapters/4x10.jpg | Bin
{public => static}/images/chapters/4x11.jpg | Bin
{public => static}/images/chapters/4x12.jpg | Bin
{public => static}/images/chapters/4x13.jpg | Bin
{public => static}/images/chapters/4x14.jpg | Bin
{public => static}/images/chapters/4x15.jpg | Bin
{public => static}/images/chapters/5x01.jpg | Bin
{public => static}/images/chapters/5x02.jpg | Bin
{public => static}/images/chapters/5x03.jpg | Bin
{public => static}/images/chapters/5x04.jpg | Bin
{public => static}/images/chapters/5x05.jpg | Bin
{public => static}/images/chapters/5x06.jpg | Bin
{public => static}/images/chapters/5x07.jpg | Bin
{public => static}/images/chapters/5x08.jpg | Bin
{public => static}/images/chapters/5x09.jpg | Bin
{public => static}/images/chapters/5x10.jpg | Bin
{public => static}/images/chapters/5x11.jpg | Bin
{public => static}/images/chapters/5x12.jpg | Bin
{public => static}/images/chapters/5x13.jpg | Bin
.../images/chapters/desconocido.jpg | Bin
.../agente_brigada_contra_socioadiccion.jpg | Bin
{public => static}/images/characters/alex.jpg | Bin
.../images/characters/alicia.jpg | Bin
.../images/characters/andres.jpg | Bin
.../images/characters/armando.jpg | Bin
{public => static}/images/characters/bea.jpg | Bin
.../images/characters/belen.jpg | Bin
.../images/characters/carlos.jpg | Bin
.../images/characters/carmen.jpg | Bin
.../images/characters/concha.jpg | Bin
{public => static}/images/characters/dani.jpg | Bin
.../images/characters/desconocido.jpg | Bin
.../images/characters/emilio.jpg | Bin
.../images/characters/esther.jpg | Bin
.../images/characters/exterminador_plagas.jpg | Bin
.../images/characters/fernando.jpg | Bin
.../funcionario_perrera_municipal.jpg | Bin
.../images/characters/isabel.jpg | Bin
.../images/characters/jefe_seguridad.jpg | Bin
.../images/characters/josemi.jpg | Bin
.../images/characters/juan_cuesta.jpg | Bin
.../images/characters/lucia.jpg | Bin
.../images/characters/mariano.jpg | Bin
.../images/characters/marisa.jpg | Bin
.../images/characters/mauri.jpg | Bin
.../images/characters/mozo_mudanza_1.jpg | Bin
.../images/characters/mozo_mudanza_2.jpg | Bin
.../images/characters/natalia.jpg | Bin
.../images/characters/nieves.jpg | Bin
.../images/characters/pablo.jpg | Bin
{public => static}/images/characters/paco.jpg | Bin
.../images/characters/paloma.jpg | Bin
.../images/characters/rebeca.jpg | Bin
.../images/characters/roberto.jpg | Bin
.../images/characters/santiago_segura.jpg | Bin
.../characters/tecnico_control_plagas.jpg | Bin
.../characters/tecnico_laboratorio_adn.jpg | Bin
.../images/characters/vendedor_alarmas.jpg | Bin
.../vendedor_cabina_hidromasajes.jpg | Bin
.../characters/vendedor_equipos_espionaje.jpg | Bin
.../characters/vendedor_ordenadores.jpg | Bin
.../characters/vendedor_puertas_blindadas.jpg | Bin
.../images/characters/vicenta.jpg | Bin
{public => static}/images/characters/yago.jpg | Bin
{public => static}/images/home.jpg | Bin
sitemap.xml => static/sitemap.xml | 0
{src/store/modules => store}/actors.js | 21 +-
{src/store/modules => store}/chapters.js | 21 +-
{src/store/modules => store}/characters.js | 22 +-
tests/unit/App.spec.js | 9 +-
tests/unit/components/ActorCard.spec.js | 13 +-
tests/unit/components/ChapterCard.spec.js | 17 +-
tests/unit/components/CharacterCard.spec.js | 13 +-
tests/unit/components/Footer.spec.js | 6 +-
tests/unit/components/Header.spec.js | 6 +-
tests/unit/components/Menu.spec.js | 107 +-
.../unit/{views => pages}/ActorDetail.spec.js | 89 +-
tests/unit/{views => pages}/Actors.spec.js | 78 +-
.../{views => pages}/ChapterDetail.spec.js | 88 +-
.../{views => pages}/CharacterDetail.spec.js | 89 +-
.../unit/{views => pages}/Characters.spec.js | 79 +-
tests/unit/{views => pages}/Home.spec.js | 8 +-
tests/unit/{views => pages}/Season.spec.js | 90 +-
.../plugins/anhqvClient/anhqvClient.spec.js | 2 +-
tests/unit/store/actors.spec.js | 7 +-
tests/unit/store/chapters.spec.js | 7 +-
tests/unit/store/characters.spec.js | 7 +-
tests/unit/utils/funcs.spec.js | 2 +-
{src/utils => utils}/constants.js | 0
{src/utils => utils}/funcs.js | 0
{src/utils => utils}/index.js | 0
vue.config.js | 20 -
231 files changed, 17412 insertions(+), 16886 deletions(-)
create mode 100644 .babelrc
rename {src/assets => assets}/banner.gif (100%)
rename {src => assets}/styles/_variables.scss (100%)
delete mode 100644 babel.config.js
rename {src/components => components}/ActorCard.vue (73%)
rename {src/components => components}/ChapterCard.vue (66%)
rename {src/components => components}/CharacterCard.vue (72%)
rename {src/components => components}/Footer.vue (94%)
rename {src/components => components}/Header.vue (95%)
rename {src/components => components}/Menu.vue (60%)
rename src/App.vue => layouts/default.vue (88%)
create mode 100644 locales/es.js
create mode 100644 middleware/README.md
create mode 100644 nuxt.config.js
create mode 100644 pages/actors/_slug/index.vue
rename src/views/Actors.vue => pages/actors/index.vue (57%)
create mode 100644 pages/characters/_slug/index.vue
rename src/views/Characters.vue => pages/characters/index.vue (57%)
rename src/views/Home.vue => pages/index.vue (73%)
rename src/views/ChapterDetail.vue => pages/seasons/_season_number/chapters/_slug/index.vue (60%)
rename src/views/Season.vue => pages/seasons/index.vue (59%)
create mode 100644 plugins/README.md
rename {src/plugins => plugins}/anhqvClient/client.js (100%)
rename {src/plugins => plugins}/anhqvClient/index.js (76%)
create mode 100644 plugins/element-ui.js
create mode 100644 plugins/nuxt-anhqv-client.js
rename {src/plugins => plugins}/vueAnhqvClient.js (100%)
delete mode 100644 public/index.html
delete mode 100644 server.js
delete mode 100644 src/i18n.js
delete mode 100644 src/locales/es.json
delete mode 100644 src/main.js
delete mode 100644 src/router/index.js
delete mode 100644 src/store/index.js
delete mode 100644 src/store/modules/index.js
delete mode 100644 src/views/ActorDetail.vue
delete mode 100644 src/views/CharacterDetail.vue
rename {public => static}/images/actors/adria-collado.jpg (100%)
rename {public => static}/images/actors/antonio-gomez.jpg (100%)
rename {public => static}/images/actors/dani-ballesteros.jpg (100%)
rename {public => static}/images/actors/daniel-guzman.jpg (100%)
rename {public => static}/images/actors/desconocido.jpg (100%)
rename {public => static}/images/actors/edu-garcia.jpg (100%)
rename {public => static}/images/actors/eduardo-gomez.jpg (100%)
rename {public => static}/images/actors/emma-penella.jpg (100%)
rename {public => static}/images/actors/fernando-tejero.jpg (100%)
rename {public => static}/images/actors/gemma-cuervo.jpg (100%)
rename {public => static}/images/actors/guillermo-ortega.jpg (100%)
rename {public => static}/images/actors/jose-luis-gil.jpg (100%)
rename {public => static}/images/actors/joseba-apaolaza.jpg (100%)
rename {public => static}/images/actors/laura-pamplona.jpg (100%)
rename {public => static}/images/actors/loles-leon.jpg (100%)
rename {public => static}/images/actors/luis-merlo.jpg (100%)
rename {public => static}/images/actors/malena-alterio.jpg (100%)
rename {public => static}/images/actors/maria-adanez.jpg (100%)
rename {public => static}/images/actors/marivi-bilbao.jpg (100%)
rename {public => static}/images/actors/santiago-segura.jpg (100%)
rename {public => static}/images/actors/sofia-nieto.jpg (100%)
rename {public => static}/images/chapters/1x01.jpg (100%)
rename {public => static}/images/chapters/1x02.jpg (100%)
rename {public => static}/images/chapters/1x03.jpg (100%)
rename {public => static}/images/chapters/1x04.jpg (100%)
rename {public => static}/images/chapters/1x05.jpg (100%)
rename {public => static}/images/chapters/1x06.jpg (100%)
rename {public => static}/images/chapters/1x07.jpg (100%)
rename {public => static}/images/chapters/1x08.jpg (100%)
rename {public => static}/images/chapters/1x09.jpg (100%)
rename {public => static}/images/chapters/1x10.jpg (100%)
rename {public => static}/images/chapters/1x11.jpg (100%)
rename {public => static}/images/chapters/1x12.jpg (100%)
rename {public => static}/images/chapters/1x13.jpg (100%)
rename {public => static}/images/chapters/1x14.jpg (100%)
rename {public => static}/images/chapters/1x15.jpg (100%)
rename {public => static}/images/chapters/1x16.jpg (100%)
rename {public => static}/images/chapters/1x17.jpg (100%)
rename {public => static}/images/chapters/2x01.jpg (100%)
rename {public => static}/images/chapters/2x02.jpg (100%)
rename {public => static}/images/chapters/2x03.jpg (100%)
rename {public => static}/images/chapters/2x04.jpg (100%)
rename {public => static}/images/chapters/2x05.jpg (100%)
rename {public => static}/images/chapters/2x06.jpg (100%)
rename {public => static}/images/chapters/2x07.jpg (100%)
rename {public => static}/images/chapters/2x08.jpg (100%)
rename {public => static}/images/chapters/2x09.jpg (100%)
rename {public => static}/images/chapters/2x10.jpg (100%)
rename {public => static}/images/chapters/2x11.jpg (100%)
rename {public => static}/images/chapters/2x12.jpg (100%)
rename {public => static}/images/chapters/2x13.jpg (100%)
rename {public => static}/images/chapters/2x14.jpg (100%)
rename {public => static}/images/chapters/3x01.jpg (100%)
rename {public => static}/images/chapters/3x02.jpg (100%)
rename {public => static}/images/chapters/3x03.jpg (100%)
rename {public => static}/images/chapters/3x04.jpg (100%)
rename {public => static}/images/chapters/3x05.jpg (100%)
rename {public => static}/images/chapters/3x06.jpg (100%)
rename {public => static}/images/chapters/3x07.jpg (100%)
rename {public => static}/images/chapters/3x07b.jpg (100%)
rename {public => static}/images/chapters/3x08.jpg (100%)
rename {public => static}/images/chapters/3x09.jpg (100%)
rename {public => static}/images/chapters/3x10.jpg (100%)
rename {public => static}/images/chapters/3x11.jpg (100%)
rename {public => static}/images/chapters/3x12.jpg (100%)
rename {public => static}/images/chapters/3x13.jpg (100%)
rename {public => static}/images/chapters/3x14.jpg (100%)
rename {public => static}/images/chapters/3x15.jpg (100%)
rename {public => static}/images/chapters/3x16.jpg (100%)
rename {public => static}/images/chapters/3x17.jpg (100%)
rename {public => static}/images/chapters/3x18.jpg (100%)
rename {public => static}/images/chapters/3x19.jpg (100%)
rename {public => static}/images/chapters/3x20.jpg (100%)
rename {public => static}/images/chapters/3x21.jpg (100%)
rename {public => static}/images/chapters/3x22.jpg (100%)
rename {public => static}/images/chapters/3x23.jpg (100%)
rename {public => static}/images/chapters/3x24.jpg (100%)
rename {public => static}/images/chapters/3x25.jpg (100%)
rename {public => static}/images/chapters/3x25b.jpg (100%)
rename {public => static}/images/chapters/3x26.jpg (100%)
rename {public => static}/images/chapters/3x27.jpg (100%)
rename {public => static}/images/chapters/3x28.jpg (100%)
rename {public => static}/images/chapters/3x29.jpg (100%)
rename {public => static}/images/chapters/3x30.jpg (100%)
rename {public => static}/images/chapters/3x31.jpg (100%)
rename {public => static}/images/chapters/3x32.jpg (100%)
rename {public => static}/images/chapters/3x33.jpg (100%)
rename {public => static}/images/chapters/4x01.jpg (100%)
rename {public => static}/images/chapters/4x02.jpg (100%)
rename {public => static}/images/chapters/4x03.jpg (100%)
rename {public => static}/images/chapters/4x04.jpg (100%)
rename {public => static}/images/chapters/4x05.jpg (100%)
rename {public => static}/images/chapters/4x06.jpg (100%)
rename {public => static}/images/chapters/4x07.jpg (100%)
rename {public => static}/images/chapters/4x08.jpg (100%)
rename {public => static}/images/chapters/4x09.jpg (100%)
rename {public => static}/images/chapters/4x10.jpg (100%)
rename {public => static}/images/chapters/4x11.jpg (100%)
rename {public => static}/images/chapters/4x12.jpg (100%)
rename {public => static}/images/chapters/4x13.jpg (100%)
rename {public => static}/images/chapters/4x14.jpg (100%)
rename {public => static}/images/chapters/4x15.jpg (100%)
rename {public => static}/images/chapters/5x01.jpg (100%)
rename {public => static}/images/chapters/5x02.jpg (100%)
rename {public => static}/images/chapters/5x03.jpg (100%)
rename {public => static}/images/chapters/5x04.jpg (100%)
rename {public => static}/images/chapters/5x05.jpg (100%)
rename {public => static}/images/chapters/5x06.jpg (100%)
rename {public => static}/images/chapters/5x07.jpg (100%)
rename {public => static}/images/chapters/5x08.jpg (100%)
rename {public => static}/images/chapters/5x09.jpg (100%)
rename {public => static}/images/chapters/5x10.jpg (100%)
rename {public => static}/images/chapters/5x11.jpg (100%)
rename {public => static}/images/chapters/5x12.jpg (100%)
rename {public => static}/images/chapters/5x13.jpg (100%)
rename {public => static}/images/chapters/desconocido.jpg (100%)
rename {public => static}/images/characters/agente_brigada_contra_socioadiccion.jpg (100%)
rename {public => static}/images/characters/alex.jpg (100%)
rename {public => static}/images/characters/alicia.jpg (100%)
rename {public => static}/images/characters/andres.jpg (100%)
rename {public => static}/images/characters/armando.jpg (100%)
rename {public => static}/images/characters/bea.jpg (100%)
rename {public => static}/images/characters/belen.jpg (100%)
rename {public => static}/images/characters/carlos.jpg (100%)
rename {public => static}/images/characters/carmen.jpg (100%)
rename {public => static}/images/characters/concha.jpg (100%)
rename {public => static}/images/characters/dani.jpg (100%)
rename {public => static}/images/characters/desconocido.jpg (100%)
rename {public => static}/images/characters/emilio.jpg (100%)
rename {public => static}/images/characters/esther.jpg (100%)
rename {public => static}/images/characters/exterminador_plagas.jpg (100%)
rename {public => static}/images/characters/fernando.jpg (100%)
rename {public => static}/images/characters/funcionario_perrera_municipal.jpg (100%)
rename {public => static}/images/characters/isabel.jpg (100%)
rename {public => static}/images/characters/jefe_seguridad.jpg (100%)
rename {public => static}/images/characters/josemi.jpg (100%)
rename {public => static}/images/characters/juan_cuesta.jpg (100%)
rename {public => static}/images/characters/lucia.jpg (100%)
rename {public => static}/images/characters/mariano.jpg (100%)
rename {public => static}/images/characters/marisa.jpg (100%)
rename {public => static}/images/characters/mauri.jpg (100%)
rename {public => static}/images/characters/mozo_mudanza_1.jpg (100%)
rename {public => static}/images/characters/mozo_mudanza_2.jpg (100%)
rename {public => static}/images/characters/natalia.jpg (100%)
rename {public => static}/images/characters/nieves.jpg (100%)
rename {public => static}/images/characters/pablo.jpg (100%)
rename {public => static}/images/characters/paco.jpg (100%)
rename {public => static}/images/characters/paloma.jpg (100%)
rename {public => static}/images/characters/rebeca.jpg (100%)
rename {public => static}/images/characters/roberto.jpg (100%)
rename {public => static}/images/characters/santiago_segura.jpg (100%)
rename {public => static}/images/characters/tecnico_control_plagas.jpg (100%)
rename {public => static}/images/characters/tecnico_laboratorio_adn.jpg (100%)
rename {public => static}/images/characters/vendedor_alarmas.jpg (100%)
rename {public => static}/images/characters/vendedor_cabina_hidromasajes.jpg (100%)
rename {public => static}/images/characters/vendedor_equipos_espionaje.jpg (100%)
rename {public => static}/images/characters/vendedor_ordenadores.jpg (100%)
rename {public => static}/images/characters/vendedor_puertas_blindadas.jpg (100%)
rename {public => static}/images/characters/vicenta.jpg (100%)
rename {public => static}/images/characters/yago.jpg (100%)
rename {public => static}/images/home.jpg (100%)
rename sitemap.xml => static/sitemap.xml (100%)
rename {src/store/modules => store}/actors.js (75%)
rename {src/store/modules => store}/chapters.js (76%)
rename {src/store/modules => store}/characters.js (76%)
rename tests/unit/{views => pages}/ActorDetail.spec.js (57%)
rename tests/unit/{views => pages}/Actors.spec.js (52%)
rename tests/unit/{views => pages}/ChapterDetail.spec.js (56%)
rename tests/unit/{views => pages}/CharacterDetail.spec.js (57%)
rename tests/unit/{views => pages}/Characters.spec.js (52%)
rename tests/unit/{views => pages}/Home.spec.js (70%)
rename tests/unit/{views => pages}/Season.spec.js (54%)
rename {src/utils => utils}/constants.js (100%)
rename {src/utils => utils}/funcs.js (100%)
rename {src/utils => utils}/index.js (100%)
delete mode 100644 vue.config.js
diff --git a/.babelrc b/.babelrc
new file mode 100644
index 0000000..394c543
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,12 @@
+{
+ "presets": [
+ [
+ "@babel/preset-env",
+ {
+ "targets": {
+ "node": "current"
+ }
+ }
+ ]
+ ]
+}
diff --git a/.env.example b/.env.example
index 8cf1a3b..9d24c26 100644
--- a/.env.example
+++ b/.env.example
@@ -1,2 +1 @@
VUE_APP_API_URL=url/to/api/
-PRERENDER_TOKEN=
diff --git a/.eslintrc b/.eslintrc
index 7b2355a..914fbbc 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,11 +1,12 @@
{
"root": true,
"env": {
+ "browser": true,
"node": true
},
"extends": [
- "plugin:vue/essential",
- "eslint:recommended",
+ "@nuxtjs",
+ "plugin:nuxt/recommended",
"airbnb-base"
],
"parserOptions": {
@@ -31,7 +32,8 @@
],
"no-debugger": [
"warn"
- ]
+ ],
+ "vue/no-v-html": "off"
},
"overrides": [
{
diff --git a/.gitignore b/.gitignore
index 6ea0f4a..7963b38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
+.nuxt
# local env files
.env.local
diff --git a/src/assets/banner.gif b/assets/banner.gif
similarity index 100%
rename from src/assets/banner.gif
rename to assets/banner.gif
diff --git a/src/styles/_variables.scss b/assets/styles/_variables.scss
similarity index 100%
rename from src/styles/_variables.scss
rename to assets/styles/_variables.scss
diff --git a/babel.config.js b/babel.config.js
deleted file mode 100644
index 757ff9b..0000000
--- a/babel.config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- presets: [
- '@vue/cli-plugin-babel/preset',
- ],
-};
diff --git a/src/components/ActorCard.vue b/components/ActorCard.vue
similarity index 73%
rename from src/components/ActorCard.vue
rename to components/ActorCard.vue
index 9f2f5da..f839fa1 100644
--- a/src/components/ActorCard.vue
+++ b/components/ActorCard.vue
@@ -2,29 +2,32 @@
+ :body-style="{ padding: '0px' }"
+ >
-
+
+ style="padding: 14px;"
+ >
- {{actor.shortname}}
+ {{ actor.shortname }}
- {{detailButtonText}}
+ @click="goToDetail()"
+ >
+ {{ detailButtonText }}
-
+ size="2x"
+ />
@@ -33,7 +36,12 @@
+
+
diff --git a/src/views/Actors.vue b/pages/actors/index.vue
similarity index 57%
rename from src/views/Actors.vue
rename to pages/actors/index.vue
index 820a08f..df8378c 100644
--- a/src/views/Actors.vue
+++ b/pages/actors/index.vue
@@ -5,17 +5,18 @@
+ :gutter="gutter"
+ >
-
-
+ >
+
@@ -25,43 +26,55 @@
import { mapState } from 'vuex';
import { Loading } from 'element-ui';
-import ActorCard from '../components/ActorCard.vue';
+import ActorCard from '../../components/ActorCard.vue';
-import utils from '../utils';
+import utils from '../../utils';
export default {
name: 'Actors',
components: {
ActorCard,
},
- data() {
- return {
- gutter: utils.VIEWS.ACTORS.GUTTER.DEFAULT,
- };
+ nuxtI18n: {
+ paths: {
+ es: '/actores',
+ },
},
- created() {
- window.addEventListener('resize', this.handleResize);
- this.handleResize();
-
- this.loadingInstance = Loading.service({
- target: utils.LOADING.QUERY_SELECTOR,
- background: 'rgba(0, 0, 0, 0.8)',
- });
+ async fetch() {
+ if (process.browser) {
+ this.loadingInstance = Loading.service({
+ target: utils.LOADING.QUERY_SELECTOR,
+ background: 'rgba(0, 0, 0, 0.8)',
+ });
+ }
- this.$store.dispatch('actors/getAll')
+ return this.$store.dispatch('actors/getAll')
.finally(() => {
- this.loadingInstance.close();
+ if (this.loadingInstance) this.loadingInstance.close();
});
},
- beforeDestroy() {
- this.loadingInstance.close();
- window.removeEventListener('resize', this.handleResize);
+ data() {
+ return {
+ gutter: utils.VIEWS.ACTORS.GUTTER.DEFAULT,
+ };
},
computed: {
...mapState('actors', {
actors: 'all',
}),
},
+ created() {
+ if (process.browser) {
+ // eslint-disable-next-line nuxt/no-globals-in-created
+ window.addEventListener('resize', this.handleResize);
+ this.handleResize();
+ }
+ },
+ beforeDestroy() {
+ if (this.loadingInstance) this.loadingInstance.close();
+ window.removeEventListener('resize', this.handleResize);
+ this.$store.dispatch('actors/destroyAll');
+ },
methods: {
handleResize() {
if (utils.isMobile()) {
diff --git a/pages/characters/_slug/index.vue b/pages/characters/_slug/index.vue
new file mode 100644
index 0000000..93d8a8e
--- /dev/null
+++ b/pages/characters/_slug/index.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+ {{ characterInfoTitle }}
+
+
+
+
+
+
+
+
+
+
+ {{ nameLabel }}
+
+
+ {{ character.name }}
+
+
+
+
+
+
+
+ {{ surnameLabel }}
+
+
+ {{ character.surname }}
+
+
+
+
+
+
+
+ {{ secondSurnameLabel }}
+
+
+ {{ character.second_surname }}
+
+
+
+
+
+
+
+ {{ shortnameLabel }}
+
+
+ {{ character.shortname }}
+
+
+
+
+
+
+
+ {{ nicknameLabel }}
+
+
+ {{ character.nickname }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/Characters.vue b/pages/characters/index.vue
similarity index 57%
rename from src/views/Characters.vue
rename to pages/characters/index.vue
index a77c6ef..25ca164 100644
--- a/src/views/Characters.vue
+++ b/pages/characters/index.vue
@@ -5,17 +5,18 @@
+ :gutter="gutter"
+ >
-
-
+ >
+
@@ -25,44 +26,55 @@
import { mapState } from 'vuex';
import { Loading } from 'element-ui';
-import CharacterCard from '../components/CharacterCard.vue';
+import CharacterCard from '../../components/CharacterCard.vue';
-import utils from '../utils';
+import utils from '../../utils';
export default {
name: 'Characters',
components: {
CharacterCard,
},
- data() {
- return {
- gutter: utils.VIEWS.CHARACTERS.GUTTER.DEFAULT,
- };
+ nuxtI18n: {
+ paths: {
+ es: '/personajes',
+ },
},
- created() {
- window.addEventListener('resize', this.handleResize);
- this.handleResize();
-
- this.loadingInstance = Loading.service({
- target: utils.LOADING.QUERY_SELECTOR,
- background: 'rgba(0, 0, 0, 0.8)',
- });
+ async fetch() {
+ if (process.browser) {
+ this.loadingInstance = Loading.service({
+ target: utils.LOADING.QUERY_SELECTOR,
+ background: 'rgba(0, 0, 0, 0.8)',
+ });
+ }
- this.$store.dispatch('characters/getAll')
+ return this.$store.dispatch('characters/getAll')
.finally(() => {
- this.loadingInstance.close();
- window.prerenderReady = true;
+ if (this.loadingInstance) this.loadingInstance.close();
});
},
- beforeDestroy() {
- this.loadingInstance.close();
- window.removeEventListener('resize', this.handleResize);
+ data() {
+ return {
+ gutter: utils.VIEWS.CHARACTERS.GUTTER.DEFAULT,
+ };
},
computed: {
...mapState('characters', {
characters: 'all',
}),
},
+ created() {
+ if (process.browser) {
+ // eslint-disable-next-line nuxt/no-globals-in-created
+ window.addEventListener('resize', this.handleResize);
+ this.handleResize();
+ }
+ },
+ beforeDestroy() {
+ if (this.loadingInstance) this.loadingInstance.close();
+ window.removeEventListener('resize', this.handleResize);
+ this.$store.dispatch('characters/destroyAll');
+ },
methods: {
handleResize() {
if (utils.isMobile()) {
diff --git a/src/views/Home.vue b/pages/index.vue
similarity index 73%
rename from src/views/Home.vue
rename to pages/index.vue
index 87af5e0..476579e 100644
--- a/src/views/Home.vue
+++ b/pages/index.vue
@@ -1,101 +1,129 @@
-
+ :gutter="20"
+ >
+
+ :sm="8"
+ >
-
{{ charactersTitle }}
-
+
+ {{ charactersTitle }}
+
+
+ :sm="8"
+ >
-
{{ donateTitle }}
-
+
+ {{ donateTitle }}
+
+
+ :sm="8"
+ >
-
{{ chaptersTitle }}
-
+
+ {{ chaptersTitle }}
+
+
+ :xs="24"
+ >
-
{{ referencesTitle }}
-
+
+ {{ referencesTitle }}
+
+
+ :gutter="20"
+ >
+ :lg="12"
+ >
-
{{anhqvText}}
+
+ {{ anhqvText }}
+
+ :lg="12"
+ >
-
{{escenasAnhqvText}}
+
+ {{ escenasAnhqvText }}
+
@@ -124,7 +152,6 @@ export default {
};
},
created() {
- window.prerenderReady = true;
},
};
diff --git a/src/views/ChapterDetail.vue b/pages/seasons/_season_number/chapters/_slug/index.vue
similarity index 60%
rename from src/views/ChapterDetail.vue
rename to pages/seasons/_season_number/chapters/_slug/index.vue
index fd447c3..c83ecf6 100644
--- a/src/views/ChapterDetail.vue
+++ b/pages/seasons/_season_number/chapters/_slug/index.vue
@@ -1,10 +1,13 @@
+ id="chapter-info"
+ >
-
{{chapterInfoTitle}}
+
+ {{ chapterInfoTitle }}
+
-
+ :lg="6"
+ >
+
+ :lg="{ span: 14, offset: 2 }"
+ >
- {{nameLabel}}
- {{chapter.name}}
-
+ {{ nameLabel }}
+
+ {{ chapter.name }}
+
+
+
+
- {{seasonLabel}}
- {{chapter.season}}
-
+ {{ seasonLabel }}
+
+ {{ chapter.season }}
+
+
+
+
- {{durationLabel}}
- {{chapter.parsed_duration}}
-
+ {{ durationLabel }}
+
+ {{ chapter.parsed_duration }}
+
+
+
+
- {{releaseDateLabel}}
+ {{ releaseDateLabel }}
- {{chapter.parsed_release_date}}
+ class="bold"
+ >
+ {{ chapter.parsed_release_date }}
+
+
+
-
- {{summaryLabel}}
-
-
+ {{ summaryLabel }}
+
+
+
+
+ id="chapter-video"
+ >
-
{{videoTitle}}
+
+ {{ videoTitle }}
+
- {{ loadingText }}
+
+ {{ loadingText }}
+
+ }"
+ >
+ class="embed-container"
+ >
+ allowfullscreen
+ />
- {{ unavailableText }}
+
+ {{ unavailableText }}
+
@@ -99,11 +130,29 @@
import { mapState } from 'vuex';
import { Loading } from 'element-ui';
-import utils from '../utils';
+import utils from '../../../../../utils';
export default {
name: 'ChapterDetail',
components: {},
+ nuxtI18n: {
+ paths: {
+ es: '/temporadas/:season_number/capitulos/:slug',
+ },
+ },
+ async fetch() {
+ if (process.browser) {
+ this.loadingInstance = Loading.service({
+ target: utils.LOADING.QUERY_SELECTOR,
+ background: 'rgba(0, 0, 0, 0.8)',
+ });
+ }
+
+ return this.$store.dispatch('chapters/getBySlug', { slug: this.$route.params.slug })
+ .finally(() => {
+ if (this.loadingInstance) this.loadingInstance.close();
+ });
+ },
data() {
return {
avatarSize: 250,
@@ -118,31 +167,23 @@ export default {
unavailableText: this.$t('COMMON.UNAVAILABLE'),
};
},
+ computed: {
+ ...mapState('chapters', {
+ chapter: 'current',
+ }),
+ },
created() {
- this.loadingInstance = Loading.service({
- target: utils.LOADING.QUERY_SELECTOR,
- background: 'rgba(0, 0, 0, 0.8)',
- });
-
- window.addEventListener('resize', this.handleResize);
- this.handleResize();
-
- this.$store.dispatch('chapters/getBySlug', { slug: this.$route.params.chapter_slug })
- .finally(() => {
- this.loadingInstance.close();
- window.prerenderReady = true;
- });
+ if (process.browser) {
+ // eslint-disable-next-line nuxt/no-globals-in-created
+ window.addEventListener('resize', this.handleResize);
+ this.handleResize();
+ }
},
beforeDestroy() {
- this.loadingInstance.close();
+ if (this.loadingInstance) this.loadingInstance.close();
window.removeEventListener('resize', this.handleResize);
this.$store.dispatch('chapters/destroyCurrent');
},
- computed: {
- ...mapState('chapters', {
- chapter: 'current',
- }),
- },
methods: {
handleResize() {
if (utils.isMobile()) {
@@ -151,6 +192,9 @@ export default {
this.avatarSize = 250;
}
},
+ loading() {
+ return this.loadingInstance && this.loadingInstance.visible;
+ },
},
};
diff --git a/src/views/Season.vue b/pages/seasons/index.vue
similarity index 59%
rename from src/views/Season.vue
rename to pages/seasons/index.vue
index 98238f8..0879a18 100644
--- a/src/views/Season.vue
+++ b/pages/seasons/index.vue
@@ -2,17 +2,18 @@
+ :gutter="gutter"
+ >
-
-
+ >
+
@@ -22,40 +23,55 @@
import { mapState } from 'vuex';
import { Loading } from 'element-ui';
-import utils from '../utils';
-import ChapterCard from '../components/ChapterCard.vue';
+import utils from '../../utils';
+import ChapterCard from '../../components/ChapterCard.vue';
export default {
name: 'Season',
- data() {
- return {
- gutter: 50,
- detailButtonText: 'Detalle',
- };
- },
components: {
ChapterCard,
},
- created() {
- window.addEventListener('resize', this.handleResize);
- this.handleResize();
-
- this.loadingInstance = Loading.service({
- target: utils.LOADING.QUERY_SELECTOR,
- background: 'rgba(0, 0, 0, 0.8)',
- });
+ nuxtI18n: {
+ paths: {
+ es: '/temporadas/:season_number',
+ },
+ },
+ async fetch() {
+ if (process.browser) {
+ this.loadingInstance = Loading.service({
+ target: utils.LOADING.QUERY_SELECTOR,
+ background: 'rgba(0, 0, 0, 0.8)',
+ });
+ }
- this.$store.dispatch('chapters/getAll', { season: this.$route.params.season_number })
+ return this.$store.dispatch('chapters/getAll', { season: this.$route.params.season_number })
.finally(() => {
- this.loadingInstance.close();
- window.prerenderReady = true;
+ if (this.loadingInstance) this.loadingInstance.close();
});
},
+ data() {
+ return {
+ gutter: 50,
+ detailButtonText: this.$t('VIEWS.SEASONS.SEE_DETAIL.TEXT'),
+ };
+ },
computed: {
...mapState('chapters', {
chapters: 'all',
}),
},
+ created() {
+ if (process.browser) {
+ // eslint-disable-next-line nuxt/no-globals-in-created
+ window.addEventListener('resize', this.handleResize);
+ this.handleResize();
+ }
+ },
+ beforeDestroy() {
+ if (this.loadingInstance) this.loadingInstance.close();
+ window.removeEventListener('resize', this.handleResize);
+ this.$store.dispatch('chapters/destroyAll');
+ },
methods: {
handleResize() {
if (utils.isMobile()) {
@@ -65,10 +81,6 @@ export default {
}
},
},
- beforeDestroy() {
- this.loadingInstance.close();
- window.removeEventListener('resize', this.handleResize);
- },
};
diff --git a/plugins/README.md b/plugins/README.md
new file mode 100644
index 0000000..ca1f9d8
--- /dev/null
+++ b/plugins/README.md
@@ -0,0 +1,7 @@
+# PLUGINS
+
+**This directory is not required, you can delete it if you don't want to use it.**
+
+This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
+
+More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
diff --git a/src/plugins/anhqvClient/client.js b/plugins/anhqvClient/client.js
similarity index 100%
rename from src/plugins/anhqvClient/client.js
rename to plugins/anhqvClient/client.js
diff --git a/src/plugins/anhqvClient/index.js b/plugins/anhqvClient/index.js
similarity index 76%
rename from src/plugins/anhqvClient/index.js
rename to plugins/anhqvClient/index.js
index 8587dbf..1f11fa5 100644
--- a/src/plugins/anhqvClient/index.js
+++ b/plugins/anhqvClient/index.js
@@ -1,10 +1,10 @@
const axios = require('axios');
-const axiosAdapter = require('axios/lib/adapters/xhr');
+// const axiosAdapter = require('axios/lib/adapters/xhr');
const client = require('./client.js');
module.exports = (config) => {
- axios.defaults.adapter = axiosAdapter;
+ // axios.defaults.adapter = axiosAdapter;
axios.defaults.baseURL = config.endpoint;
axios.defaults.headers.common['Content-Type'] = 'application/json';
diff --git a/plugins/element-ui.js b/plugins/element-ui.js
new file mode 100644
index 0000000..0cad100
--- /dev/null
+++ b/plugins/element-ui.js
@@ -0,0 +1,5 @@
+import Vue from 'vue';
+import Element from 'element-ui';
+import locale from 'element-ui/lib/locale/lang/en';
+
+Vue.use(Element, { locale });
diff --git a/plugins/nuxt-anhqv-client.js b/plugins/nuxt-anhqv-client.js
new file mode 100644
index 0000000..70f244e
--- /dev/null
+++ b/plugins/nuxt-anhqv-client.js
@@ -0,0 +1,6 @@
+import Vue from 'vue';
+import anhqvClient from './vueAnhqvClient';
+
+Vue.use(anhqvClient, {
+ endpoint: process.env.VUE_APP_API_URL,
+});
diff --git a/src/plugins/vueAnhqvClient.js b/plugins/vueAnhqvClient.js
similarity index 100%
rename from src/plugins/vueAnhqvClient.js
rename to plugins/vueAnhqvClient.js
diff --git a/public/index.html b/public/index.html
deleted file mode 100644
index e434493..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
- <%= htmlWebpackPlugin.options.title %>
-
-
-
-
-
-
diff --git a/server.js b/server.js
deleted file mode 100644
index 4bc5a4e..0000000
--- a/server.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const express = require('express');
-const path = require('path');
-
-const port = process.env.PORT || 8080;
-const app = express();
-
-app.use(express.static(path.resolve(__dirname, 'dist')));
-
-app.get('/sitemap.xml', (req, res) => {
- res.sendFile(path.resolve(__dirname, 'sitemap.xml'));
-});
-
-app.use(require('prerender-node').set('prerenderToken', process.env.PRERENDER_TOKEN));
-
-app.get('*', (req, res) => {
- res.sendFile(path.resolve(__dirname, 'dist', 'index.html'));
-});
-
-app.listen(port, () => {
- // eslint-disable-next-line no-console
- console.log('App listening on port:', port);
-});
diff --git a/src/i18n.js b/src/i18n.js
deleted file mode 100644
index 3a617f3..0000000
--- a/src/i18n.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import Vue from 'vue';
-import VueI18n from 'vue-i18n';
-
-Vue.use(VueI18n);
-
-function loadLocaleMessages() {
- const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i);
- const messages = {};
- locales.keys().forEach((key) => {
- const matched = key.match(/([A-Za-z0-9-_]+)\./i);
- if (matched && matched.length > 1) {
- const locale = matched[1];
- messages[locale] = locales(key);
- }
- });
- return messages;
-}
-
-export default new VueI18n({
- locale: process.env.VUE_APP_I18N_LOCALE || 'es',
- fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'es',
- messages: loadLocaleMessages(),
-});
diff --git a/src/locales/es.json b/src/locales/es.json
deleted file mode 100644
index 6de3485..0000000
--- a/src/locales/es.json
+++ /dev/null
@@ -1,132 +0,0 @@
-{
- "COMMON": {
- "LOADING": "Cargando...",
- "UNAVAILABLE": "No disponible",
- "ADBLOCK": {
- "TITLE": "🛑 AdBlock detectado",
- "TEXT": "Este sitio web tiene como única financiación los anuncios de Google AdSense. Para visitar este sitio web, por favor, desactiva AdBlock."
- }
- },
- "MENU": {
- "ACTORS": {
- "TEXT": "Actores"
- },
- "CHARACTERS": {
- "TEXT": "Personajes"
- },
- "HOME": {
- "TEXT": "Inicio"
- },
- "SEASONS": {
- "TEXT": "Temporadas",
- "FIRST_SEASON": {
- "TEXT": "1ª Temporada"
- },
- "SECOND_SEASON": {
- "TEXT": "2ª Temporada"
- },
- "THIRD_SEASON": {
- "TEXT": "3ª Temporada"
- },
- "FOURTH_SEASON": {
- "TEXT": "4ª Temporada"
- },
- "FIFTH_SEASON": {
- "TEXT": "5ª Temporada"
- }
- }
- },
- "VIEWS": {
- "HOME": {
- "TITLE": "Inicio",
- "WELCOME": {
- "TEXT": "Bienvenido a la Web de la Comunidad más loca de la TV. En esta web encontrarás todo tipo de información y estadísticas de la famosa serie de TV Aquí no hay quien viva : personajes, actores, capítulos... y mucho más.
"
- },
- "CHARACTERS": {
- "TITLE": "Personajes",
- "TEXT": "Disponemos de una amplia galería con la información de todos los personajes que aparecen en la serie, incluyendo personajes con apariciones puntuales.
"
- },
- "DONATE": {
- "TITLE": "Haz tu donación",
- "TEXT": "Esta web es de acceso totalmente gratuito, pero conlleva una serie de gastos como el dominio y el hosting. Si quieres realizar una pequeña aportación para sufragar los mismos será bienvenida.
"
- },
- "CHAPTERS": {
- "TITLE": "Capítulos",
- "TEXT": "Se pueden ver detalles de todos los capítulos de la serie agrupados por temporada, así como los capítulos en vídeo y curiosidades de los mismos.
"
- },
- "REFERENCES": {
- "TITLE": "Referencias",
- "TEXT": "A continuación destacamos una serie de webs y perfiles en RRSS que hemos considerado interesantes y que han sido de gran utilidad para el desarrollo de esta web.
",
- "LIST": {
- "ANHQV": {
- "TEXT": "Web oficial de la serie en la que encontrarás mucha información y curiosidades."
- },
- "ESCENASANHQV": {
- "TEXT": "Cuenta que dispone de multitud de escenas y memes de la serie. Síguela en Twitter e Instagram."
- }
- }
- }
- },
- "CHARACTERS": {
- "TITLE": "Personajes",
- "SEE_DETAIL": {
- "TEXT": "Detalle"
- },
- "DETAIL": {
- "TITLE": "Personaje | {character}",
- "INFO": {
- "TITLE": "Datos del personaje",
- "NAME": "Nombre",
- "SURNAME": "Primer apellido",
- "SECOND_SURNAME": "Segundo apellido",
- "SHORTNAME": "Nombre corto",
- "NICKNAME": "Apodo"
- }
- }
- },
- "ACTORS": {
- "TITLE": "Actores",
- "SEE_DETAIL": {
- "TEXT": "Detalle"
- },
- "DETAIL": {
- "TITLE": "Actor | {actor}",
- "INFO": {
- "TITLE": "Datos del actor",
- "NAME": "Nombre",
- "SURNAME": "Primer apellido",
- "SECOND_SURNAME": "Segundo apellido",
- "SHORTNAME": "Nombre artístico",
- "BIRTHDATE": "Fecha de nacimiento",
- "DEATHDATE": "Fecha de fallecimiento"
- }
- }
- },
- "CHAPTERS": {
- "SEE_DETAIL": {
- "TEXT": "Detalle"
- }
- },
- "SEASONS": {
- "DETAIL": {
- "TITLE": "Temporada {number}",
- "CHAPTERS": {
- "DETAIL": {
- "TITLE": "Capítulo {slug}",
- "INFO": {
- "TITLE": "Datos del capítulo",
- "NAME": "Capítulo",
- "SEASON": "Temporada",
- "DURATION": "Duración",
- "RELEASE_DATE": "Fecha de estreno",
- "SUMMARY": "Sinopsis"
- },
- "VIDEO": {
- "TITLE": "Vídeo del capítulo"
- }
- }
- }
- }
- }
- }
-}
diff --git a/src/main.js b/src/main.js
deleted file mode 100644
index 5922daf..0000000
--- a/src/main.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import ElementUI from 'element-ui';
-import Adsense from 'vue-google-adsense/dist/Adsense.min';
-import { library } from '@fortawesome/fontawesome-svg-core';
-import { fas } from '@fortawesome/free-solid-svg-icons';
-import { fab } from '@fortawesome/free-brands-svg-icons';
-import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
-import App from './App.vue';
-import store from './store';
-import VueAnhqvClient from './plugins/vueAnhqvClient';
-
-import 'element-ui/lib/theme-chalk/index.css';
-import i18n from './i18n';
-
-import router from './router';
-
-library.add(fas);
-library.add(fab);
-
-Vue.component('font-awesome-icon', FontAwesomeIcon);
-
-
-Vue.use(require('vue-script2'));
-
-Vue.use(Adsense);
-
-Vue.use(ElementUI);
-Vue.use(VueAnhqvClient, {
- endpoint: process.env.VUE_APP_API_URL,
-});
-
-Vue.config.productionTip = false;
-
-new Vue({
- i18n,
- router,
- store,
- render: (h) => h(App),
-}).$mount('#app');
diff --git a/src/router/index.js b/src/router/index.js
deleted file mode 100644
index 8c275dd..0000000
--- a/src/router/index.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import Vue from 'vue';
-import Router from 'vue-router';
-
-import i18n from '../i18n';
-import utils from '../utils';
-
-Vue.use(Router);
-
-const router = new Router({
- mode: 'history',
- base: '/',
- routes: [
- {
- path: '/',
- name: 'Home',
- component: () => import('@/views/Home'),
- children: [],
- meta: {
- title: () => i18n.t('VIEWS.HOME.TITLE'),
- },
- }, {
- path: '/personajes',
- name: 'Characters',
- component: () => import('@/views/Characters'),
- children: [],
- meta: {
- title: () => i18n.t('VIEWS.CHARACTERS.TITLE'),
- },
- }, {
- path: '/personajes/:slug',
- name: 'CharacterDetail',
- component: () => import('@/views/CharacterDetail'),
- children: [],
- meta: {
- title: ({ route }) => i18n.t('VIEWS.CHARACTERS.DETAIL.TITLE', {
- character: utils.slugToText(route.params.slug),
- }),
- },
- }, {
- path: '/actores',
- name: 'Actors',
- component: () => import('@/views/Actors'),
- children: [],
- meta: {
- title: () => i18n.t('VIEWS.ACTORS.TITLE'),
- },
- },
- {
- path: '/actores/:slug',
- name: 'ActorDetail',
- component: () => import('@/views/ActorDetail'),
- children: [],
- meta: {
- title: ({ route }) => i18n.t('VIEWS.ACTORS.DETAIL.TITLE', {
- actor: utils.slugToText(route.params.slug),
- }),
- },
- },
- {
- path: '/temporadas/:season_number',
- name: 'SeasonDetails',
- component: () => import('@/views/Season'),
- children: [],
- meta: {
- title: ({ route }) => i18n.t('VIEWS.SEASONS.DETAIL.TITLE', { number: route.params.season_number }),
- },
- },
- {
- path: '/temporadas/:season_number/capitulos/:chapter_slug',
- name: 'ChapterDetail',
- component: () => import('@/views/ChapterDetail'),
- children: [],
- meta: {
- title: ({ route }) => i18n.t('VIEWS.SEASONS.DETAIL.CHAPTERS.DETAIL.TITLE', { slug: utils.chapterSlugToText(route.params.chapter_slug) }),
- },
- },
- ],
-});
-
-router.beforeEach((to, from, next) => {
- const element = document.querySelector(utils.LAYOUT.MAIN.QUERY_SELECTOR);
- if (element) element.scrollTop = 0;
- next();
-});
-
-export default router;
diff --git a/src/store/index.js b/src/store/index.js
deleted file mode 100644
index ab15337..0000000
--- a/src/store/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import Vuex from 'vuex';
-import Vue from 'vue';
-import modules from './modules';
-
-Vue.use(Vuex);
-export default new Vuex.Store({
- modules,
- strict: process.env.NODE_ENV !== 'production',
-});
diff --git a/src/store/modules/index.js b/src/store/modules/index.js
deleted file mode 100644
index f4a490e..0000000
--- a/src/store/modules/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const files = require.context('.', false, /\.js$/);
-const modules = {};
-
-files.keys().forEach((file) => {
- if (file === './index.js') return;
- modules[file.replace(/(\.\/|\.js)/g, '')] = files(file).default;
-});
-
-export default modules;
diff --git a/src/views/ActorDetail.vue b/src/views/ActorDetail.vue
deleted file mode 100644
index 8454dc6..0000000
--- a/src/views/ActorDetail.vue
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{nameLabel}}
- {{actor.name}}
-
-
-
- {{surnameLabel}}
- {{actor.surname}}
-
-
-
- {{secondSurnameLabel}}
- {{actor.second_surname}}
-
-
-
- {{shortnameLabel}}
- {{actor.shortname}}
-
-
-
- {{birthdateLabel}}
- {{actor.parsed_birthdate}}
-
-
-
- {{deathdateLabel}}
- {{actor.parsed_deathdate}}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/CharacterDetail.vue b/src/views/CharacterDetail.vue
deleted file mode 100644
index 6f48366..0000000
--- a/src/views/CharacterDetail.vue
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
{{characterInfoTitle}}
-
-
-
-
-
-
-
-
- {{nameLabel}}
- {{character.name}}
-
-
-
- {{surnameLabel}}
- {{character.surname}}
-
-
-
- {{secondSurnameLabel}}
- {{character.second_surname}}
-
-
-
- {{shortnameLabel}}
- {{character.shortname}}
-
-
-
- {{nicknameLabel}}
- {{character.nickname}}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/public/images/actors/adria-collado.jpg b/static/images/actors/adria-collado.jpg
similarity index 100%
rename from public/images/actors/adria-collado.jpg
rename to static/images/actors/adria-collado.jpg
diff --git a/public/images/actors/antonio-gomez.jpg b/static/images/actors/antonio-gomez.jpg
similarity index 100%
rename from public/images/actors/antonio-gomez.jpg
rename to static/images/actors/antonio-gomez.jpg
diff --git a/public/images/actors/dani-ballesteros.jpg b/static/images/actors/dani-ballesteros.jpg
similarity index 100%
rename from public/images/actors/dani-ballesteros.jpg
rename to static/images/actors/dani-ballesteros.jpg
diff --git a/public/images/actors/daniel-guzman.jpg b/static/images/actors/daniel-guzman.jpg
similarity index 100%
rename from public/images/actors/daniel-guzman.jpg
rename to static/images/actors/daniel-guzman.jpg
diff --git a/public/images/actors/desconocido.jpg b/static/images/actors/desconocido.jpg
similarity index 100%
rename from public/images/actors/desconocido.jpg
rename to static/images/actors/desconocido.jpg
diff --git a/public/images/actors/edu-garcia.jpg b/static/images/actors/edu-garcia.jpg
similarity index 100%
rename from public/images/actors/edu-garcia.jpg
rename to static/images/actors/edu-garcia.jpg
diff --git a/public/images/actors/eduardo-gomez.jpg b/static/images/actors/eduardo-gomez.jpg
similarity index 100%
rename from public/images/actors/eduardo-gomez.jpg
rename to static/images/actors/eduardo-gomez.jpg
diff --git a/public/images/actors/emma-penella.jpg b/static/images/actors/emma-penella.jpg
similarity index 100%
rename from public/images/actors/emma-penella.jpg
rename to static/images/actors/emma-penella.jpg
diff --git a/public/images/actors/fernando-tejero.jpg b/static/images/actors/fernando-tejero.jpg
similarity index 100%
rename from public/images/actors/fernando-tejero.jpg
rename to static/images/actors/fernando-tejero.jpg
diff --git a/public/images/actors/gemma-cuervo.jpg b/static/images/actors/gemma-cuervo.jpg
similarity index 100%
rename from public/images/actors/gemma-cuervo.jpg
rename to static/images/actors/gemma-cuervo.jpg
diff --git a/public/images/actors/guillermo-ortega.jpg b/static/images/actors/guillermo-ortega.jpg
similarity index 100%
rename from public/images/actors/guillermo-ortega.jpg
rename to static/images/actors/guillermo-ortega.jpg
diff --git a/public/images/actors/jose-luis-gil.jpg b/static/images/actors/jose-luis-gil.jpg
similarity index 100%
rename from public/images/actors/jose-luis-gil.jpg
rename to static/images/actors/jose-luis-gil.jpg
diff --git a/public/images/actors/joseba-apaolaza.jpg b/static/images/actors/joseba-apaolaza.jpg
similarity index 100%
rename from public/images/actors/joseba-apaolaza.jpg
rename to static/images/actors/joseba-apaolaza.jpg
diff --git a/public/images/actors/laura-pamplona.jpg b/static/images/actors/laura-pamplona.jpg
similarity index 100%
rename from public/images/actors/laura-pamplona.jpg
rename to static/images/actors/laura-pamplona.jpg
diff --git a/public/images/actors/loles-leon.jpg b/static/images/actors/loles-leon.jpg
similarity index 100%
rename from public/images/actors/loles-leon.jpg
rename to static/images/actors/loles-leon.jpg
diff --git a/public/images/actors/luis-merlo.jpg b/static/images/actors/luis-merlo.jpg
similarity index 100%
rename from public/images/actors/luis-merlo.jpg
rename to static/images/actors/luis-merlo.jpg
diff --git a/public/images/actors/malena-alterio.jpg b/static/images/actors/malena-alterio.jpg
similarity index 100%
rename from public/images/actors/malena-alterio.jpg
rename to static/images/actors/malena-alterio.jpg
diff --git a/public/images/actors/maria-adanez.jpg b/static/images/actors/maria-adanez.jpg
similarity index 100%
rename from public/images/actors/maria-adanez.jpg
rename to static/images/actors/maria-adanez.jpg
diff --git a/public/images/actors/marivi-bilbao.jpg b/static/images/actors/marivi-bilbao.jpg
similarity index 100%
rename from public/images/actors/marivi-bilbao.jpg
rename to static/images/actors/marivi-bilbao.jpg
diff --git a/public/images/actors/santiago-segura.jpg b/static/images/actors/santiago-segura.jpg
similarity index 100%
rename from public/images/actors/santiago-segura.jpg
rename to static/images/actors/santiago-segura.jpg
diff --git a/public/images/actors/sofia-nieto.jpg b/static/images/actors/sofia-nieto.jpg
similarity index 100%
rename from public/images/actors/sofia-nieto.jpg
rename to static/images/actors/sofia-nieto.jpg
diff --git a/public/images/chapters/1x01.jpg b/static/images/chapters/1x01.jpg
similarity index 100%
rename from public/images/chapters/1x01.jpg
rename to static/images/chapters/1x01.jpg
diff --git a/public/images/chapters/1x02.jpg b/static/images/chapters/1x02.jpg
similarity index 100%
rename from public/images/chapters/1x02.jpg
rename to static/images/chapters/1x02.jpg
diff --git a/public/images/chapters/1x03.jpg b/static/images/chapters/1x03.jpg
similarity index 100%
rename from public/images/chapters/1x03.jpg
rename to static/images/chapters/1x03.jpg
diff --git a/public/images/chapters/1x04.jpg b/static/images/chapters/1x04.jpg
similarity index 100%
rename from public/images/chapters/1x04.jpg
rename to static/images/chapters/1x04.jpg
diff --git a/public/images/chapters/1x05.jpg b/static/images/chapters/1x05.jpg
similarity index 100%
rename from public/images/chapters/1x05.jpg
rename to static/images/chapters/1x05.jpg
diff --git a/public/images/chapters/1x06.jpg b/static/images/chapters/1x06.jpg
similarity index 100%
rename from public/images/chapters/1x06.jpg
rename to static/images/chapters/1x06.jpg
diff --git a/public/images/chapters/1x07.jpg b/static/images/chapters/1x07.jpg
similarity index 100%
rename from public/images/chapters/1x07.jpg
rename to static/images/chapters/1x07.jpg
diff --git a/public/images/chapters/1x08.jpg b/static/images/chapters/1x08.jpg
similarity index 100%
rename from public/images/chapters/1x08.jpg
rename to static/images/chapters/1x08.jpg
diff --git a/public/images/chapters/1x09.jpg b/static/images/chapters/1x09.jpg
similarity index 100%
rename from public/images/chapters/1x09.jpg
rename to static/images/chapters/1x09.jpg
diff --git a/public/images/chapters/1x10.jpg b/static/images/chapters/1x10.jpg
similarity index 100%
rename from public/images/chapters/1x10.jpg
rename to static/images/chapters/1x10.jpg
diff --git a/public/images/chapters/1x11.jpg b/static/images/chapters/1x11.jpg
similarity index 100%
rename from public/images/chapters/1x11.jpg
rename to static/images/chapters/1x11.jpg
diff --git a/public/images/chapters/1x12.jpg b/static/images/chapters/1x12.jpg
similarity index 100%
rename from public/images/chapters/1x12.jpg
rename to static/images/chapters/1x12.jpg
diff --git a/public/images/chapters/1x13.jpg b/static/images/chapters/1x13.jpg
similarity index 100%
rename from public/images/chapters/1x13.jpg
rename to static/images/chapters/1x13.jpg
diff --git a/public/images/chapters/1x14.jpg b/static/images/chapters/1x14.jpg
similarity index 100%
rename from public/images/chapters/1x14.jpg
rename to static/images/chapters/1x14.jpg
diff --git a/public/images/chapters/1x15.jpg b/static/images/chapters/1x15.jpg
similarity index 100%
rename from public/images/chapters/1x15.jpg
rename to static/images/chapters/1x15.jpg
diff --git a/public/images/chapters/1x16.jpg b/static/images/chapters/1x16.jpg
similarity index 100%
rename from public/images/chapters/1x16.jpg
rename to static/images/chapters/1x16.jpg
diff --git a/public/images/chapters/1x17.jpg b/static/images/chapters/1x17.jpg
similarity index 100%
rename from public/images/chapters/1x17.jpg
rename to static/images/chapters/1x17.jpg
diff --git a/public/images/chapters/2x01.jpg b/static/images/chapters/2x01.jpg
similarity index 100%
rename from public/images/chapters/2x01.jpg
rename to static/images/chapters/2x01.jpg
diff --git a/public/images/chapters/2x02.jpg b/static/images/chapters/2x02.jpg
similarity index 100%
rename from public/images/chapters/2x02.jpg
rename to static/images/chapters/2x02.jpg
diff --git a/public/images/chapters/2x03.jpg b/static/images/chapters/2x03.jpg
similarity index 100%
rename from public/images/chapters/2x03.jpg
rename to static/images/chapters/2x03.jpg
diff --git a/public/images/chapters/2x04.jpg b/static/images/chapters/2x04.jpg
similarity index 100%
rename from public/images/chapters/2x04.jpg
rename to static/images/chapters/2x04.jpg
diff --git a/public/images/chapters/2x05.jpg b/static/images/chapters/2x05.jpg
similarity index 100%
rename from public/images/chapters/2x05.jpg
rename to static/images/chapters/2x05.jpg
diff --git a/public/images/chapters/2x06.jpg b/static/images/chapters/2x06.jpg
similarity index 100%
rename from public/images/chapters/2x06.jpg
rename to static/images/chapters/2x06.jpg
diff --git a/public/images/chapters/2x07.jpg b/static/images/chapters/2x07.jpg
similarity index 100%
rename from public/images/chapters/2x07.jpg
rename to static/images/chapters/2x07.jpg
diff --git a/public/images/chapters/2x08.jpg b/static/images/chapters/2x08.jpg
similarity index 100%
rename from public/images/chapters/2x08.jpg
rename to static/images/chapters/2x08.jpg
diff --git a/public/images/chapters/2x09.jpg b/static/images/chapters/2x09.jpg
similarity index 100%
rename from public/images/chapters/2x09.jpg
rename to static/images/chapters/2x09.jpg
diff --git a/public/images/chapters/2x10.jpg b/static/images/chapters/2x10.jpg
similarity index 100%
rename from public/images/chapters/2x10.jpg
rename to static/images/chapters/2x10.jpg
diff --git a/public/images/chapters/2x11.jpg b/static/images/chapters/2x11.jpg
similarity index 100%
rename from public/images/chapters/2x11.jpg
rename to static/images/chapters/2x11.jpg
diff --git a/public/images/chapters/2x12.jpg b/static/images/chapters/2x12.jpg
similarity index 100%
rename from public/images/chapters/2x12.jpg
rename to static/images/chapters/2x12.jpg
diff --git a/public/images/chapters/2x13.jpg b/static/images/chapters/2x13.jpg
similarity index 100%
rename from public/images/chapters/2x13.jpg
rename to static/images/chapters/2x13.jpg
diff --git a/public/images/chapters/2x14.jpg b/static/images/chapters/2x14.jpg
similarity index 100%
rename from public/images/chapters/2x14.jpg
rename to static/images/chapters/2x14.jpg
diff --git a/public/images/chapters/3x01.jpg b/static/images/chapters/3x01.jpg
similarity index 100%
rename from public/images/chapters/3x01.jpg
rename to static/images/chapters/3x01.jpg
diff --git a/public/images/chapters/3x02.jpg b/static/images/chapters/3x02.jpg
similarity index 100%
rename from public/images/chapters/3x02.jpg
rename to static/images/chapters/3x02.jpg
diff --git a/public/images/chapters/3x03.jpg b/static/images/chapters/3x03.jpg
similarity index 100%
rename from public/images/chapters/3x03.jpg
rename to static/images/chapters/3x03.jpg
diff --git a/public/images/chapters/3x04.jpg b/static/images/chapters/3x04.jpg
similarity index 100%
rename from public/images/chapters/3x04.jpg
rename to static/images/chapters/3x04.jpg
diff --git a/public/images/chapters/3x05.jpg b/static/images/chapters/3x05.jpg
similarity index 100%
rename from public/images/chapters/3x05.jpg
rename to static/images/chapters/3x05.jpg
diff --git a/public/images/chapters/3x06.jpg b/static/images/chapters/3x06.jpg
similarity index 100%
rename from public/images/chapters/3x06.jpg
rename to static/images/chapters/3x06.jpg
diff --git a/public/images/chapters/3x07.jpg b/static/images/chapters/3x07.jpg
similarity index 100%
rename from public/images/chapters/3x07.jpg
rename to static/images/chapters/3x07.jpg
diff --git a/public/images/chapters/3x07b.jpg b/static/images/chapters/3x07b.jpg
similarity index 100%
rename from public/images/chapters/3x07b.jpg
rename to static/images/chapters/3x07b.jpg
diff --git a/public/images/chapters/3x08.jpg b/static/images/chapters/3x08.jpg
similarity index 100%
rename from public/images/chapters/3x08.jpg
rename to static/images/chapters/3x08.jpg
diff --git a/public/images/chapters/3x09.jpg b/static/images/chapters/3x09.jpg
similarity index 100%
rename from public/images/chapters/3x09.jpg
rename to static/images/chapters/3x09.jpg
diff --git a/public/images/chapters/3x10.jpg b/static/images/chapters/3x10.jpg
similarity index 100%
rename from public/images/chapters/3x10.jpg
rename to static/images/chapters/3x10.jpg
diff --git a/public/images/chapters/3x11.jpg b/static/images/chapters/3x11.jpg
similarity index 100%
rename from public/images/chapters/3x11.jpg
rename to static/images/chapters/3x11.jpg
diff --git a/public/images/chapters/3x12.jpg b/static/images/chapters/3x12.jpg
similarity index 100%
rename from public/images/chapters/3x12.jpg
rename to static/images/chapters/3x12.jpg
diff --git a/public/images/chapters/3x13.jpg b/static/images/chapters/3x13.jpg
similarity index 100%
rename from public/images/chapters/3x13.jpg
rename to static/images/chapters/3x13.jpg
diff --git a/public/images/chapters/3x14.jpg b/static/images/chapters/3x14.jpg
similarity index 100%
rename from public/images/chapters/3x14.jpg
rename to static/images/chapters/3x14.jpg
diff --git a/public/images/chapters/3x15.jpg b/static/images/chapters/3x15.jpg
similarity index 100%
rename from public/images/chapters/3x15.jpg
rename to static/images/chapters/3x15.jpg
diff --git a/public/images/chapters/3x16.jpg b/static/images/chapters/3x16.jpg
similarity index 100%
rename from public/images/chapters/3x16.jpg
rename to static/images/chapters/3x16.jpg
diff --git a/public/images/chapters/3x17.jpg b/static/images/chapters/3x17.jpg
similarity index 100%
rename from public/images/chapters/3x17.jpg
rename to static/images/chapters/3x17.jpg
diff --git a/public/images/chapters/3x18.jpg b/static/images/chapters/3x18.jpg
similarity index 100%
rename from public/images/chapters/3x18.jpg
rename to static/images/chapters/3x18.jpg
diff --git a/public/images/chapters/3x19.jpg b/static/images/chapters/3x19.jpg
similarity index 100%
rename from public/images/chapters/3x19.jpg
rename to static/images/chapters/3x19.jpg
diff --git a/public/images/chapters/3x20.jpg b/static/images/chapters/3x20.jpg
similarity index 100%
rename from public/images/chapters/3x20.jpg
rename to static/images/chapters/3x20.jpg
diff --git a/public/images/chapters/3x21.jpg b/static/images/chapters/3x21.jpg
similarity index 100%
rename from public/images/chapters/3x21.jpg
rename to static/images/chapters/3x21.jpg
diff --git a/public/images/chapters/3x22.jpg b/static/images/chapters/3x22.jpg
similarity index 100%
rename from public/images/chapters/3x22.jpg
rename to static/images/chapters/3x22.jpg
diff --git a/public/images/chapters/3x23.jpg b/static/images/chapters/3x23.jpg
similarity index 100%
rename from public/images/chapters/3x23.jpg
rename to static/images/chapters/3x23.jpg
diff --git a/public/images/chapters/3x24.jpg b/static/images/chapters/3x24.jpg
similarity index 100%
rename from public/images/chapters/3x24.jpg
rename to static/images/chapters/3x24.jpg
diff --git a/public/images/chapters/3x25.jpg b/static/images/chapters/3x25.jpg
similarity index 100%
rename from public/images/chapters/3x25.jpg
rename to static/images/chapters/3x25.jpg
diff --git a/public/images/chapters/3x25b.jpg b/static/images/chapters/3x25b.jpg
similarity index 100%
rename from public/images/chapters/3x25b.jpg
rename to static/images/chapters/3x25b.jpg
diff --git a/public/images/chapters/3x26.jpg b/static/images/chapters/3x26.jpg
similarity index 100%
rename from public/images/chapters/3x26.jpg
rename to static/images/chapters/3x26.jpg
diff --git a/public/images/chapters/3x27.jpg b/static/images/chapters/3x27.jpg
similarity index 100%
rename from public/images/chapters/3x27.jpg
rename to static/images/chapters/3x27.jpg
diff --git a/public/images/chapters/3x28.jpg b/static/images/chapters/3x28.jpg
similarity index 100%
rename from public/images/chapters/3x28.jpg
rename to static/images/chapters/3x28.jpg
diff --git a/public/images/chapters/3x29.jpg b/static/images/chapters/3x29.jpg
similarity index 100%
rename from public/images/chapters/3x29.jpg
rename to static/images/chapters/3x29.jpg
diff --git a/public/images/chapters/3x30.jpg b/static/images/chapters/3x30.jpg
similarity index 100%
rename from public/images/chapters/3x30.jpg
rename to static/images/chapters/3x30.jpg
diff --git a/public/images/chapters/3x31.jpg b/static/images/chapters/3x31.jpg
similarity index 100%
rename from public/images/chapters/3x31.jpg
rename to static/images/chapters/3x31.jpg
diff --git a/public/images/chapters/3x32.jpg b/static/images/chapters/3x32.jpg
similarity index 100%
rename from public/images/chapters/3x32.jpg
rename to static/images/chapters/3x32.jpg
diff --git a/public/images/chapters/3x33.jpg b/static/images/chapters/3x33.jpg
similarity index 100%
rename from public/images/chapters/3x33.jpg
rename to static/images/chapters/3x33.jpg
diff --git a/public/images/chapters/4x01.jpg b/static/images/chapters/4x01.jpg
similarity index 100%
rename from public/images/chapters/4x01.jpg
rename to static/images/chapters/4x01.jpg
diff --git a/public/images/chapters/4x02.jpg b/static/images/chapters/4x02.jpg
similarity index 100%
rename from public/images/chapters/4x02.jpg
rename to static/images/chapters/4x02.jpg
diff --git a/public/images/chapters/4x03.jpg b/static/images/chapters/4x03.jpg
similarity index 100%
rename from public/images/chapters/4x03.jpg
rename to static/images/chapters/4x03.jpg
diff --git a/public/images/chapters/4x04.jpg b/static/images/chapters/4x04.jpg
similarity index 100%
rename from public/images/chapters/4x04.jpg
rename to static/images/chapters/4x04.jpg
diff --git a/public/images/chapters/4x05.jpg b/static/images/chapters/4x05.jpg
similarity index 100%
rename from public/images/chapters/4x05.jpg
rename to static/images/chapters/4x05.jpg
diff --git a/public/images/chapters/4x06.jpg b/static/images/chapters/4x06.jpg
similarity index 100%
rename from public/images/chapters/4x06.jpg
rename to static/images/chapters/4x06.jpg
diff --git a/public/images/chapters/4x07.jpg b/static/images/chapters/4x07.jpg
similarity index 100%
rename from public/images/chapters/4x07.jpg
rename to static/images/chapters/4x07.jpg
diff --git a/public/images/chapters/4x08.jpg b/static/images/chapters/4x08.jpg
similarity index 100%
rename from public/images/chapters/4x08.jpg
rename to static/images/chapters/4x08.jpg
diff --git a/public/images/chapters/4x09.jpg b/static/images/chapters/4x09.jpg
similarity index 100%
rename from public/images/chapters/4x09.jpg
rename to static/images/chapters/4x09.jpg
diff --git a/public/images/chapters/4x10.jpg b/static/images/chapters/4x10.jpg
similarity index 100%
rename from public/images/chapters/4x10.jpg
rename to static/images/chapters/4x10.jpg
diff --git a/public/images/chapters/4x11.jpg b/static/images/chapters/4x11.jpg
similarity index 100%
rename from public/images/chapters/4x11.jpg
rename to static/images/chapters/4x11.jpg
diff --git a/public/images/chapters/4x12.jpg b/static/images/chapters/4x12.jpg
similarity index 100%
rename from public/images/chapters/4x12.jpg
rename to static/images/chapters/4x12.jpg
diff --git a/public/images/chapters/4x13.jpg b/static/images/chapters/4x13.jpg
similarity index 100%
rename from public/images/chapters/4x13.jpg
rename to static/images/chapters/4x13.jpg
diff --git a/public/images/chapters/4x14.jpg b/static/images/chapters/4x14.jpg
similarity index 100%
rename from public/images/chapters/4x14.jpg
rename to static/images/chapters/4x14.jpg
diff --git a/public/images/chapters/4x15.jpg b/static/images/chapters/4x15.jpg
similarity index 100%
rename from public/images/chapters/4x15.jpg
rename to static/images/chapters/4x15.jpg
diff --git a/public/images/chapters/5x01.jpg b/static/images/chapters/5x01.jpg
similarity index 100%
rename from public/images/chapters/5x01.jpg
rename to static/images/chapters/5x01.jpg
diff --git a/public/images/chapters/5x02.jpg b/static/images/chapters/5x02.jpg
similarity index 100%
rename from public/images/chapters/5x02.jpg
rename to static/images/chapters/5x02.jpg
diff --git a/public/images/chapters/5x03.jpg b/static/images/chapters/5x03.jpg
similarity index 100%
rename from public/images/chapters/5x03.jpg
rename to static/images/chapters/5x03.jpg
diff --git a/public/images/chapters/5x04.jpg b/static/images/chapters/5x04.jpg
similarity index 100%
rename from public/images/chapters/5x04.jpg
rename to static/images/chapters/5x04.jpg
diff --git a/public/images/chapters/5x05.jpg b/static/images/chapters/5x05.jpg
similarity index 100%
rename from public/images/chapters/5x05.jpg
rename to static/images/chapters/5x05.jpg
diff --git a/public/images/chapters/5x06.jpg b/static/images/chapters/5x06.jpg
similarity index 100%
rename from public/images/chapters/5x06.jpg
rename to static/images/chapters/5x06.jpg
diff --git a/public/images/chapters/5x07.jpg b/static/images/chapters/5x07.jpg
similarity index 100%
rename from public/images/chapters/5x07.jpg
rename to static/images/chapters/5x07.jpg
diff --git a/public/images/chapters/5x08.jpg b/static/images/chapters/5x08.jpg
similarity index 100%
rename from public/images/chapters/5x08.jpg
rename to static/images/chapters/5x08.jpg
diff --git a/public/images/chapters/5x09.jpg b/static/images/chapters/5x09.jpg
similarity index 100%
rename from public/images/chapters/5x09.jpg
rename to static/images/chapters/5x09.jpg
diff --git a/public/images/chapters/5x10.jpg b/static/images/chapters/5x10.jpg
similarity index 100%
rename from public/images/chapters/5x10.jpg
rename to static/images/chapters/5x10.jpg
diff --git a/public/images/chapters/5x11.jpg b/static/images/chapters/5x11.jpg
similarity index 100%
rename from public/images/chapters/5x11.jpg
rename to static/images/chapters/5x11.jpg
diff --git a/public/images/chapters/5x12.jpg b/static/images/chapters/5x12.jpg
similarity index 100%
rename from public/images/chapters/5x12.jpg
rename to static/images/chapters/5x12.jpg
diff --git a/public/images/chapters/5x13.jpg b/static/images/chapters/5x13.jpg
similarity index 100%
rename from public/images/chapters/5x13.jpg
rename to static/images/chapters/5x13.jpg
diff --git a/public/images/chapters/desconocido.jpg b/static/images/chapters/desconocido.jpg
similarity index 100%
rename from public/images/chapters/desconocido.jpg
rename to static/images/chapters/desconocido.jpg
diff --git a/public/images/characters/agente_brigada_contra_socioadiccion.jpg b/static/images/characters/agente_brigada_contra_socioadiccion.jpg
similarity index 100%
rename from public/images/characters/agente_brigada_contra_socioadiccion.jpg
rename to static/images/characters/agente_brigada_contra_socioadiccion.jpg
diff --git a/public/images/characters/alex.jpg b/static/images/characters/alex.jpg
similarity index 100%
rename from public/images/characters/alex.jpg
rename to static/images/characters/alex.jpg
diff --git a/public/images/characters/alicia.jpg b/static/images/characters/alicia.jpg
similarity index 100%
rename from public/images/characters/alicia.jpg
rename to static/images/characters/alicia.jpg
diff --git a/public/images/characters/andres.jpg b/static/images/characters/andres.jpg
similarity index 100%
rename from public/images/characters/andres.jpg
rename to static/images/characters/andres.jpg
diff --git a/public/images/characters/armando.jpg b/static/images/characters/armando.jpg
similarity index 100%
rename from public/images/characters/armando.jpg
rename to static/images/characters/armando.jpg
diff --git a/public/images/characters/bea.jpg b/static/images/characters/bea.jpg
similarity index 100%
rename from public/images/characters/bea.jpg
rename to static/images/characters/bea.jpg
diff --git a/public/images/characters/belen.jpg b/static/images/characters/belen.jpg
similarity index 100%
rename from public/images/characters/belen.jpg
rename to static/images/characters/belen.jpg
diff --git a/public/images/characters/carlos.jpg b/static/images/characters/carlos.jpg
similarity index 100%
rename from public/images/characters/carlos.jpg
rename to static/images/characters/carlos.jpg
diff --git a/public/images/characters/carmen.jpg b/static/images/characters/carmen.jpg
similarity index 100%
rename from public/images/characters/carmen.jpg
rename to static/images/characters/carmen.jpg
diff --git a/public/images/characters/concha.jpg b/static/images/characters/concha.jpg
similarity index 100%
rename from public/images/characters/concha.jpg
rename to static/images/characters/concha.jpg
diff --git a/public/images/characters/dani.jpg b/static/images/characters/dani.jpg
similarity index 100%
rename from public/images/characters/dani.jpg
rename to static/images/characters/dani.jpg
diff --git a/public/images/characters/desconocido.jpg b/static/images/characters/desconocido.jpg
similarity index 100%
rename from public/images/characters/desconocido.jpg
rename to static/images/characters/desconocido.jpg
diff --git a/public/images/characters/emilio.jpg b/static/images/characters/emilio.jpg
similarity index 100%
rename from public/images/characters/emilio.jpg
rename to static/images/characters/emilio.jpg
diff --git a/public/images/characters/esther.jpg b/static/images/characters/esther.jpg
similarity index 100%
rename from public/images/characters/esther.jpg
rename to static/images/characters/esther.jpg
diff --git a/public/images/characters/exterminador_plagas.jpg b/static/images/characters/exterminador_plagas.jpg
similarity index 100%
rename from public/images/characters/exterminador_plagas.jpg
rename to static/images/characters/exterminador_plagas.jpg
diff --git a/public/images/characters/fernando.jpg b/static/images/characters/fernando.jpg
similarity index 100%
rename from public/images/characters/fernando.jpg
rename to static/images/characters/fernando.jpg
diff --git a/public/images/characters/funcionario_perrera_municipal.jpg b/static/images/characters/funcionario_perrera_municipal.jpg
similarity index 100%
rename from public/images/characters/funcionario_perrera_municipal.jpg
rename to static/images/characters/funcionario_perrera_municipal.jpg
diff --git a/public/images/characters/isabel.jpg b/static/images/characters/isabel.jpg
similarity index 100%
rename from public/images/characters/isabel.jpg
rename to static/images/characters/isabel.jpg
diff --git a/public/images/characters/jefe_seguridad.jpg b/static/images/characters/jefe_seguridad.jpg
similarity index 100%
rename from public/images/characters/jefe_seguridad.jpg
rename to static/images/characters/jefe_seguridad.jpg
diff --git a/public/images/characters/josemi.jpg b/static/images/characters/josemi.jpg
similarity index 100%
rename from public/images/characters/josemi.jpg
rename to static/images/characters/josemi.jpg
diff --git a/public/images/characters/juan_cuesta.jpg b/static/images/characters/juan_cuesta.jpg
similarity index 100%
rename from public/images/characters/juan_cuesta.jpg
rename to static/images/characters/juan_cuesta.jpg
diff --git a/public/images/characters/lucia.jpg b/static/images/characters/lucia.jpg
similarity index 100%
rename from public/images/characters/lucia.jpg
rename to static/images/characters/lucia.jpg
diff --git a/public/images/characters/mariano.jpg b/static/images/characters/mariano.jpg
similarity index 100%
rename from public/images/characters/mariano.jpg
rename to static/images/characters/mariano.jpg
diff --git a/public/images/characters/marisa.jpg b/static/images/characters/marisa.jpg
similarity index 100%
rename from public/images/characters/marisa.jpg
rename to static/images/characters/marisa.jpg
diff --git a/public/images/characters/mauri.jpg b/static/images/characters/mauri.jpg
similarity index 100%
rename from public/images/characters/mauri.jpg
rename to static/images/characters/mauri.jpg
diff --git a/public/images/characters/mozo_mudanza_1.jpg b/static/images/characters/mozo_mudanza_1.jpg
similarity index 100%
rename from public/images/characters/mozo_mudanza_1.jpg
rename to static/images/characters/mozo_mudanza_1.jpg
diff --git a/public/images/characters/mozo_mudanza_2.jpg b/static/images/characters/mozo_mudanza_2.jpg
similarity index 100%
rename from public/images/characters/mozo_mudanza_2.jpg
rename to static/images/characters/mozo_mudanza_2.jpg
diff --git a/public/images/characters/natalia.jpg b/static/images/characters/natalia.jpg
similarity index 100%
rename from public/images/characters/natalia.jpg
rename to static/images/characters/natalia.jpg
diff --git a/public/images/characters/nieves.jpg b/static/images/characters/nieves.jpg
similarity index 100%
rename from public/images/characters/nieves.jpg
rename to static/images/characters/nieves.jpg
diff --git a/public/images/characters/pablo.jpg b/static/images/characters/pablo.jpg
similarity index 100%
rename from public/images/characters/pablo.jpg
rename to static/images/characters/pablo.jpg
diff --git a/public/images/characters/paco.jpg b/static/images/characters/paco.jpg
similarity index 100%
rename from public/images/characters/paco.jpg
rename to static/images/characters/paco.jpg
diff --git a/public/images/characters/paloma.jpg b/static/images/characters/paloma.jpg
similarity index 100%
rename from public/images/characters/paloma.jpg
rename to static/images/characters/paloma.jpg
diff --git a/public/images/characters/rebeca.jpg b/static/images/characters/rebeca.jpg
similarity index 100%
rename from public/images/characters/rebeca.jpg
rename to static/images/characters/rebeca.jpg
diff --git a/public/images/characters/roberto.jpg b/static/images/characters/roberto.jpg
similarity index 100%
rename from public/images/characters/roberto.jpg
rename to static/images/characters/roberto.jpg
diff --git a/public/images/characters/santiago_segura.jpg b/static/images/characters/santiago_segura.jpg
similarity index 100%
rename from public/images/characters/santiago_segura.jpg
rename to static/images/characters/santiago_segura.jpg
diff --git a/public/images/characters/tecnico_control_plagas.jpg b/static/images/characters/tecnico_control_plagas.jpg
similarity index 100%
rename from public/images/characters/tecnico_control_plagas.jpg
rename to static/images/characters/tecnico_control_plagas.jpg
diff --git a/public/images/characters/tecnico_laboratorio_adn.jpg b/static/images/characters/tecnico_laboratorio_adn.jpg
similarity index 100%
rename from public/images/characters/tecnico_laboratorio_adn.jpg
rename to static/images/characters/tecnico_laboratorio_adn.jpg
diff --git a/public/images/characters/vendedor_alarmas.jpg b/static/images/characters/vendedor_alarmas.jpg
similarity index 100%
rename from public/images/characters/vendedor_alarmas.jpg
rename to static/images/characters/vendedor_alarmas.jpg
diff --git a/public/images/characters/vendedor_cabina_hidromasajes.jpg b/static/images/characters/vendedor_cabina_hidromasajes.jpg
similarity index 100%
rename from public/images/characters/vendedor_cabina_hidromasajes.jpg
rename to static/images/characters/vendedor_cabina_hidromasajes.jpg
diff --git a/public/images/characters/vendedor_equipos_espionaje.jpg b/static/images/characters/vendedor_equipos_espionaje.jpg
similarity index 100%
rename from public/images/characters/vendedor_equipos_espionaje.jpg
rename to static/images/characters/vendedor_equipos_espionaje.jpg
diff --git a/public/images/characters/vendedor_ordenadores.jpg b/static/images/characters/vendedor_ordenadores.jpg
similarity index 100%
rename from public/images/characters/vendedor_ordenadores.jpg
rename to static/images/characters/vendedor_ordenadores.jpg
diff --git a/public/images/characters/vendedor_puertas_blindadas.jpg b/static/images/characters/vendedor_puertas_blindadas.jpg
similarity index 100%
rename from public/images/characters/vendedor_puertas_blindadas.jpg
rename to static/images/characters/vendedor_puertas_blindadas.jpg
diff --git a/public/images/characters/vicenta.jpg b/static/images/characters/vicenta.jpg
similarity index 100%
rename from public/images/characters/vicenta.jpg
rename to static/images/characters/vicenta.jpg
diff --git a/public/images/characters/yago.jpg b/static/images/characters/yago.jpg
similarity index 100%
rename from public/images/characters/yago.jpg
rename to static/images/characters/yago.jpg
diff --git a/public/images/home.jpg b/static/images/home.jpg
similarity index 100%
rename from public/images/home.jpg
rename to static/images/home.jpg
diff --git a/sitemap.xml b/static/sitemap.xml
similarity index 100%
rename from sitemap.xml
rename to static/sitemap.xml
diff --git a/src/store/modules/actors.js b/store/actors.js
similarity index 75%
rename from src/store/modules/actors.js
rename to store/actors.js
index 91a1ad7..9b8f562 100644
--- a/src/store/modules/actors.js
+++ b/store/actors.js
@@ -1,13 +1,13 @@
import Vue from 'vue';
-const state = {
+export const state = () => ({
all: [],
current: {},
-};
+});
-const getters = {};
+export const getters = {};
-const actions = {
+export const actions = {
getAll({ commit }) {
return Vue.anhqvClient.getActors()
.then((actors) => commit('setAll', actors.data));
@@ -19,9 +19,12 @@ const actions = {
destroyCurrent({ commit }) {
return commit('setCurrent', {});
},
+ destroyAll({ commit }) {
+ return commit('setAll', []);
+ },
};
-const mutations = {
+export const mutations = {
setAll(state, actors) {
Vue.set(state, 'all', actors);
},
@@ -29,11 +32,3 @@ const mutations = {
Vue.set(state, 'current', actor);
},
};
-
-export default {
- namespaced: true,
- state,
- getters,
- actions,
- mutations,
-};
diff --git a/src/store/modules/chapters.js b/store/chapters.js
similarity index 76%
rename from src/store/modules/chapters.js
rename to store/chapters.js
index dcdb9ca..af43f33 100644
--- a/src/store/modules/chapters.js
+++ b/store/chapters.js
@@ -1,13 +1,13 @@
import Vue from 'vue';
-const state = {
+export const state = () => ({
all: [],
current: {},
-};
+});
-const getters = {};
+export const getters = {};
-const actions = {
+export const actions = {
getAll({ commit }, params) {
return Vue.anhqvClient.getChapters(params)
.then((chapters) => commit('setAll', chapters.data));
@@ -19,9 +19,12 @@ const actions = {
destroyCurrent({ commit }) {
return commit('setCurrent', {});
},
+ destroyAll({ commit }) {
+ return commit('setAll', []);
+ },
};
-const mutations = {
+export const mutations = {
setAll(state, chapters) {
Vue.set(state, 'all', chapters);
},
@@ -29,11 +32,3 @@ const mutations = {
Vue.set(state, 'current', chapter);
},
};
-
-export default {
- namespaced: true,
- state,
- getters,
- actions,
- mutations,
-};
diff --git a/src/store/modules/characters.js b/store/characters.js
similarity index 76%
rename from src/store/modules/characters.js
rename to store/characters.js
index 21b4884..3085c23 100644
--- a/src/store/modules/characters.js
+++ b/store/characters.js
@@ -1,13 +1,14 @@
+
import Vue from 'vue';
-const state = {
+export const state = () => ({
all: [],
current: {},
-};
+});
-const getters = {};
+export const getters = {};
-const actions = {
+export const actions = {
getAll({ commit }) {
return Vue.anhqvClient.getCharacters()
.then((characters) => commit('setAll', characters.data));
@@ -19,9 +20,12 @@ const actions = {
destroyCurrent({ commit }) {
return commit('setCurrent', {});
},
+ destroyAll({ commit }) {
+ return commit('setAll', []);
+ },
};
-const mutations = {
+export const mutations = {
setAll(state, characters) {
Vue.set(state, 'all', characters);
},
@@ -29,11 +33,3 @@ const mutations = {
Vue.set(state, 'current', character);
},
};
-
-export default {
- namespaced: true,
- state,
- getters,
- actions,
- mutations,
-};
diff --git a/tests/unit/App.spec.js b/tests/unit/App.spec.js
index 2add336..48757bb 100644
--- a/tests/unit/App.spec.js
+++ b/tests/unit/App.spec.js
@@ -1,7 +1,6 @@
import { createLocalVue, mount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import App from '../../src/App.vue';
+import App from '../../layouts/default.vue';
jest.mock('vue-adblock-detect', () => ({
methods: {
@@ -12,16 +11,14 @@ jest.mock('vue-adblock-detect', () => ({
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('App.vue', () => {
it('check header border-bottom', () => {
const wrapper = mount(App, {
localVue,
- router,
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'nuxt'],
mocks: {
$t: () => {},
+ $i18n: {},
$route: {
meta: {
title: () => 'dummy',
diff --git a/tests/unit/components/ActorCard.spec.js b/tests/unit/components/ActorCard.spec.js
index a28ecb4..12a23e5 100644
--- a/tests/unit/components/ActorCard.spec.js
+++ b/tests/unit/components/ActorCard.spec.js
@@ -1,18 +1,14 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import ActorCard from '../../../src/components/ActorCard.vue';
+import ActorCard from '../../../components/ActorCard.vue';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('ActorCard.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(ActorCard, {
localVue,
- router,
mocks: {
$t: () => {},
},
@@ -28,12 +24,13 @@ describe('ActorCard.vue', () => {
});
it('it should navigate to detail page', () => {
- router.push = jest.fn();
-
const wrapper = shallowMount(ActorCard, {
localVue,
mocks: {
$t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
$router: {
push: jest.fn(),
},
@@ -50,7 +47,7 @@ describe('ActorCard.vue', () => {
wrapper.vm.goToDetail();
expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
- name: 'ActorDetail',
+ name: 'actors-slug___es',
params: {
slug: 'john-doe',
},
diff --git a/tests/unit/components/ChapterCard.spec.js b/tests/unit/components/ChapterCard.spec.js
index 2cc8fb4..0e8e86c 100644
--- a/tests/unit/components/ChapterCard.spec.js
+++ b/tests/unit/components/ChapterCard.spec.js
@@ -1,18 +1,14 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import ChapterCard from '../../../src/components/ChapterCard.vue';
+import ChapterCard from '../../../components/ChapterCard.vue';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('ChapterCard.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(ChapterCard, {
localVue,
- router,
mocks: {
$t: () => {},
},
@@ -28,12 +24,13 @@ describe('ChapterCard.vue', () => {
});
it('it should navigate to detail page', () => {
- router.push = jest.fn();
-
const wrapper = shallowMount(ChapterCard, {
localVue,
mocks: {
$t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
$router: {
push: jest.fn(),
},
@@ -51,10 +48,10 @@ describe('ChapterCard.vue', () => {
wrapper.vm.goToDetail();
expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
- name: 'ChapterDetail',
+ name: 'seasons-season_number-slug___es',
params: {
- chapter_slug: '0x01',
- season: '0',
+ slug: '0x01',
+ season_number: '0',
},
});
});
diff --git a/tests/unit/components/CharacterCard.spec.js b/tests/unit/components/CharacterCard.spec.js
index 50278ee..38923fd 100644
--- a/tests/unit/components/CharacterCard.spec.js
+++ b/tests/unit/components/CharacterCard.spec.js
@@ -1,18 +1,14 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import CharacterCard from '../../../src/components/CharacterCard.vue';
+import CharacterCard from '../../../components/CharacterCard.vue';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('CharacterCard.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(CharacterCard, {
localVue,
- router,
mocks: {
$t: () => {},
},
@@ -28,12 +24,13 @@ describe('CharacterCard.vue', () => {
});
it('it should navigate to detail page', () => {
- router.push = jest.fn();
-
const wrapper = shallowMount(CharacterCard, {
localVue,
mocks: {
$t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
$router: {
push: jest.fn(),
},
@@ -50,7 +47,7 @@ describe('CharacterCard.vue', () => {
wrapper.vm.goToDetail();
expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
- name: 'CharacterDetail',
+ name: 'characters-slug___es',
params: {
slug: 'john-doe',
},
diff --git a/tests/unit/components/Footer.spec.js b/tests/unit/components/Footer.spec.js
index c0ccb2c..d327ffd 100644
--- a/tests/unit/components/Footer.spec.js
+++ b/tests/unit/components/Footer.spec.js
@@ -1,18 +1,14 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import Footer from '../../../src/components/Footer.vue';
+import Footer from '../../../components/Footer.vue';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('Footer.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(Footer, {
localVue,
- router,
});
expect(wrapper.find('#copyright').exists()).toBe(true);
diff --git a/tests/unit/components/Header.spec.js b/tests/unit/components/Header.spec.js
index ae34fa6..00e222a 100644
--- a/tests/unit/components/Header.spec.js
+++ b/tests/unit/components/Header.spec.js
@@ -1,18 +1,14 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import Header from '../../../src/components/Header.vue';
+import Header from '../../../components/Header.vue';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('Header.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(Header, {
localVue,
- router,
mocks: {
$t: () => {},
$route: {
diff --git a/tests/unit/components/Menu.spec.js b/tests/unit/components/Menu.spec.js
index c3e8453..f1ae594 100644
--- a/tests/unit/components/Menu.spec.js
+++ b/tests/unit/components/Menu.spec.js
@@ -1,51 +1,115 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import Menu from '../../../src/components/Menu.vue';
+import Menu from '../../../components/Menu.vue';
+
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('Menu.vue', () => {
- it('check initial data', () => {
- const wrapper = shallowMount(Menu, {
- localVue,
- router,
- mocks: {
- $t: () => {},
- $route: {
- meta: {
- title: () => 'dummy',
+ beforeEach(() => {
+ process.browser = false;
+ });
+
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const wrapper = shallowMount(Menu, {
+ localVue,
+ mocks: {
+ $t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
+ $route: {
+ meta: {
+ title: () => 'dummy',
+ },
},
},
- },
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
+ });
+ expect(JSON.stringify(wrapper.vm.defaultOpeneds)).toBe(JSON.stringify(['4']));
+ expect(wrapper.vm.isCollapsed).toBeFalsy();
+ });
+
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(Menu, {
+ localVue,
+ mocks: {
+ $t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
+ $route: {
+ meta: {
+ title: () => 'dummy',
+ },
+ },
+ },
+ stubs: ['nuxt-link', 'router-view'],
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
});
- expect(JSON.stringify(wrapper.vm.defaultOpeneds)).toBe(JSON.stringify(['4']));
- expect(wrapper.vm.isCollapsed).toBeFalsy();
});
describe('handleResize', () => {
it('isCollapsed must be true', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(Menu, {
localVue,
mocks: {
$t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
$route: {
meta: {
title: () => 'dummy',
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.isCollapsed).toBeTruthy();
});
+
+ it('isCollapsed must be false', () => {
+ utils.isMobile.mockReturnValue(false);
+
+ const wrapper = shallowMount(Menu, {
+ localVue,
+ mocks: {
+ $t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
+ $route: {
+ meta: {
+ title: () => 'dummy',
+ },
+ },
+ },
+ stubs: ['nuxt-link', 'router-view'],
+ });
+
+ wrapper.vm.handleResize();
+ expect(wrapper.vm.isCollapsed).toBeFalsy();
+ });
});
it('check beforeDestroy function is called', () => {
@@ -53,13 +117,16 @@ describe('Menu.vue', () => {
localVue,
mocks: {
$t: () => {},
+ $i18n: {
+ locale: 'es',
+ },
$route: {
meta: {
title: () => 'dummy',
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/views/ActorDetail.spec.js b/tests/unit/pages/ActorDetail.spec.js
similarity index 57%
rename from tests/unit/views/ActorDetail.spec.js
rename to tests/unit/pages/ActorDetail.spec.js
index ca5c92f..773ec11 100644
--- a/tests/unit/views/ActorDetail.spec.js
+++ b/tests/unit/pages/ActorDetail.spec.js
@@ -1,24 +1,22 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
+
import Vuex from 'vuex';
import ElementUI from 'element-ui';
-import ActorDetail from '../../../src/views/ActorDetail.vue';
+import ActorDetail from '../../../pages/actors/_slug/index.vue';
-const initialWidth = window.innerWidth;
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
describe('ActorDetail.vue', () => {
let localVue;
- let router;
let store;
let actions;
let state;
beforeAll(() => {
- window.innerWidth = initialWidth;
localVue = createLocalVue();
localVue.use(ElementUI);
- router = new VueRouter();
-
state = {
current: {
name: 'John Doe',
@@ -43,36 +41,63 @@ describe('ActorDetail.vue', () => {
});
});
- it('check initial data', () => {
- const methods = {
- handleResize: jest.fn(),
- };
+ beforeEach(() => {
+ process.browser = false;
+ });
- // eslint-disable-next-line no-unused-vars
- const wrapper = shallowMount(ActorDetail, {
- localVue,
- router,
- store,
- mocks: {
- $t: () => {},
- $route: {
- params: {
- slug: 'john-doe',
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ const wrapper = shallowMount(ActorDetail, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ slug: 'john-doe',
+ },
},
},
- },
- methods,
+ methods,
+ });
+
+ expect(wrapper.vm.avatarSize).toEqual(250);
});
- expect(methods.handleResize).toHaveBeenCalled();
- expect(actions.getBySlug).toHaveBeenCalled();
- expect(actions.getBySlug.mock.calls[0][1]).toEqual({
- slug: 'john-doe',
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(ActorDetail, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ slug: 'john-doe',
+ },
+ },
+ },
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
});
});
describe('handleResize', () => {
it('avatarSize for mobile', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(ActorDetail, {
localVue,
store,
@@ -84,15 +109,16 @@ describe('ActorDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.avatarSize).toEqual(100);
});
it('avatarSize for desktop', () => {
+ utils.isMobile.mockReturnValue(false);
+
const wrapper = shallowMount(ActorDetail, {
localVue,
store,
@@ -104,10 +130,9 @@ describe('ActorDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 800;
wrapper.vm.handleResize();
expect(wrapper.vm.avatarSize).toEqual(250);
});
@@ -125,7 +150,7 @@ describe('ActorDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/views/Actors.spec.js b/tests/unit/pages/Actors.spec.js
similarity index 52%
rename from tests/unit/views/Actors.spec.js
rename to tests/unit/pages/Actors.spec.js
index 914566b..7dd4574 100644
--- a/tests/unit/views/Actors.spec.js
+++ b/tests/unit/pages/Actors.spec.js
@@ -1,26 +1,24 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
+
import Vuex from 'vuex';
import ElementUI from 'element-ui';
-import Actors from '../../../src/views/Actors.vue';
+import Actors from '../../../pages/actors/index.vue';
-const initialWidth = window.innerWidth;
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
describe('Actors.vue', () => {
let localVue;
- let router;
let store;
let actions;
beforeAll(() => {
- window.innerWidth = initialWidth;
localVue = createLocalVue();
localVue.use(ElementUI);
- router = new VueRouter();
-
-
actions = {
getAll: jest.fn(),
+ destroyAll: jest.fn(),
};
localVue.use(Vuex);
@@ -35,53 +33,77 @@ describe('Actors.vue', () => {
});
});
- it('check initial data', () => {
- const methods = {
- handleResize: jest.fn(),
- };
+ beforeEach(() => {
+ process.browser = false;
+ });
- // eslint-disable-next-line no-unused-vars
- const wrapper = shallowMount(Actors, {
- localVue,
- router,
- store,
- mocks: {
- $t: () => {},
- },
- methods,
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(Actors, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ },
+ methods,
+ });
});
- expect(methods.handleResize).toHaveBeenCalled();
- expect(actions.getAll).toHaveBeenCalled();
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(Actors, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ },
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
+ });
});
describe('handleResize', () => {
it('gutter for mobile', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(Actors, {
localVue,
store,
mocks: {
$t: () => {},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.gutter).toEqual(20);
});
it('gutter for desktop', () => {
+ utils.isMobile.mockReturnValue(false);
+
const wrapper = shallowMount(Actors, {
localVue,
store,
mocks: {
$t: () => {},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 800;
wrapper.vm.handleResize();
expect(wrapper.vm.gutter).toEqual(50);
});
@@ -94,7 +116,7 @@ describe('Actors.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/views/ChapterDetail.spec.js b/tests/unit/pages/ChapterDetail.spec.js
similarity index 56%
rename from tests/unit/views/ChapterDetail.spec.js
rename to tests/unit/pages/ChapterDetail.spec.js
index d2523af..c97a4bd 100644
--- a/tests/unit/views/ChapterDetail.spec.js
+++ b/tests/unit/pages/ChapterDetail.spec.js
@@ -1,24 +1,21 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import Vuex from 'vuex';
import ElementUI from 'element-ui';
-import ChapterDetail from '../../../src/views/ChapterDetail.vue';
+import ChapterDetail from '../../../pages/seasons/_season_number/chapters/_slug/index.vue';
-const initialWidth = window.innerWidth;
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
describe('ChapterDetail.vue', () => {
let localVue;
- let router;
let store;
let actions;
let state;
beforeAll(() => {
- window.innerWidth = initialWidth;
localVue = createLocalVue();
localVue.use(ElementUI);
- router = new VueRouter();
-
state = {
current: {
name: 'Érase un X',
@@ -43,36 +40,63 @@ describe('ChapterDetail.vue', () => {
});
});
- it('check initial data', () => {
- const methods = {
- handleResize: jest.fn(),
- };
+ beforeEach(() => {
+ process.browser = false;
+ });
- // eslint-disable-next-line no-unused-vars
- const wrapper = shallowMount(ChapterDetail, {
- localVue,
- router,
- store,
- mocks: {
- $t: () => {},
- $route: {
- params: {
- chapter_slug: '0x01',
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(ChapterDetail, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ chapter_slug: '0x01',
+ },
},
},
- },
- methods,
+ methods,
+ });
});
- expect(methods.handleResize).toHaveBeenCalled();
- expect(actions.getBySlug).toHaveBeenCalled();
- expect(actions.getBySlug.mock.calls[0][1]).toEqual({
- slug: '0x01',
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(ChapterDetail, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ chapter_slug: '0x01',
+ },
+ },
+ },
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
});
});
+
describe('handleResize', () => {
it('avatarSize for mobile', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(ChapterDetail, {
localVue,
store,
@@ -84,15 +108,16 @@ describe('ChapterDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.avatarSize).toEqual(100);
});
it('avatarSize for desktop', () => {
+ utils.isMobile.mockReturnValue(false);
+
const wrapper = shallowMount(ChapterDetail, {
localVue,
store,
@@ -104,10 +129,9 @@ describe('ChapterDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 800;
wrapper.vm.handleResize();
expect(wrapper.vm.avatarSize).toEqual(250);
});
@@ -125,7 +149,7 @@ describe('ChapterDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/views/CharacterDetail.spec.js b/tests/unit/pages/CharacterDetail.spec.js
similarity index 57%
rename from tests/unit/views/CharacterDetail.spec.js
rename to tests/unit/pages/CharacterDetail.spec.js
index 7e8ffb8..2dac63b 100644
--- a/tests/unit/views/CharacterDetail.spec.js
+++ b/tests/unit/pages/CharacterDetail.spec.js
@@ -1,24 +1,22 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
+
import Vuex from 'vuex';
import ElementUI from 'element-ui';
-import CharacterDetail from '../../../src/views/CharacterDetail.vue';
+import CharacterDetail from '../../../pages/characters/_slug/index.vue';
-const initialWidth = window.innerWidth;
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
describe('CharacterDetail.vue', () => {
let localVue;
- let router;
let store;
let actions;
let state;
beforeAll(() => {
- window.innerWidth = initialWidth;
localVue = createLocalVue();
localVue.use(ElementUI);
- router = new VueRouter();
-
state = {
current: {
name: 'John Doe',
@@ -43,36 +41,63 @@ describe('CharacterDetail.vue', () => {
});
});
- it('check initial data', () => {
- const methods = {
- handleResize: jest.fn(),
- };
+ beforeEach(() => {
+ process.browser = false;
+ });
- // eslint-disable-next-line no-unused-vars
- const wrapper = shallowMount(CharacterDetail, {
- localVue,
- router,
- store,
- mocks: {
- $t: () => {},
- $route: {
- params: {
- slug: 'john-doe',
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ const wrapper = shallowMount(CharacterDetail, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ slug: 'john-doe',
+ },
},
},
- },
- methods,
+ methods,
+ });
+
+ expect(wrapper.vm.avatarSize).toEqual(250);
});
- expect(methods.handleResize).toHaveBeenCalled();
- expect(actions.getBySlug).toHaveBeenCalled();
- expect(actions.getBySlug.mock.calls[0][1]).toEqual({
- slug: 'john-doe',
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(CharacterDetail, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ slug: 'john-doe',
+ },
+ },
+ },
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
});
});
describe('handleResize', () => {
it('avatarSize for mobile', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(CharacterDetail, {
localVue,
store,
@@ -84,15 +109,16 @@ describe('CharacterDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.avatarSize).toEqual(100);
});
it('avatarSize for desktop', () => {
+ utils.isMobile.mockReturnValue(false);
+
const wrapper = shallowMount(CharacterDetail, {
localVue,
store,
@@ -104,10 +130,9 @@ describe('CharacterDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 800;
wrapper.vm.handleResize();
expect(wrapper.vm.avatarSize).toEqual(250);
});
@@ -125,7 +150,7 @@ describe('CharacterDetail.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/views/Characters.spec.js b/tests/unit/pages/Characters.spec.js
similarity index 52%
rename from tests/unit/views/Characters.spec.js
rename to tests/unit/pages/Characters.spec.js
index e7d055a..c7dd9a4 100644
--- a/tests/unit/views/Characters.spec.js
+++ b/tests/unit/pages/Characters.spec.js
@@ -1,26 +1,24 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
+
import Vuex from 'vuex';
import ElementUI from 'element-ui';
-import Characters from '../../../src/views/Characters.vue';
+import Characters from '../../../pages/characters/index.vue';
-const initialWidth = window.innerWidth;
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
describe('Characters.vue', () => {
let localVue;
- let router;
let store;
let actions;
beforeAll(() => {
- window.innerWidth = initialWidth;
localVue = createLocalVue();
localVue.use(ElementUI);
- router = new VueRouter();
-
-
actions = {
getAll: jest.fn(),
+ destroyAll: jest.fn(),
};
localVue.use(Vuex);
@@ -35,53 +33,78 @@ describe('Characters.vue', () => {
});
});
- it('check initial data', () => {
- const methods = {
- handleResize: jest.fn(),
- };
+ beforeEach(() => {
+ process.browser = false;
+ });
- // eslint-disable-next-line no-unused-vars
- const wrapper = shallowMount(Characters, {
- localVue,
- router,
- store,
- mocks: {
- $t: () => {},
- },
- methods,
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(Characters, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ },
+ methods,
+ });
});
- expect(methods.handleResize).toHaveBeenCalled();
- expect(actions.getAll).toHaveBeenCalled();
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(Characters, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ },
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
+ });
});
+
describe('handleResize', () => {
it('gutter for mobile', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(Characters, {
localVue,
store,
mocks: {
$t: () => {},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.gutter).toEqual(20);
});
it('gutter for desktop', () => {
+ utils.isMobile.mockReturnValue(false);
+
const wrapper = shallowMount(Characters, {
localVue,
store,
mocks: {
$t: () => {},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 800;
wrapper.vm.handleResize();
expect(wrapper.vm.gutter).toEqual(50);
});
@@ -94,7 +117,7 @@ describe('Characters.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/views/Home.spec.js b/tests/unit/pages/Home.spec.js
similarity index 70%
rename from tests/unit/views/Home.spec.js
rename to tests/unit/pages/Home.spec.js
index d3d356f..0aa01ed 100644
--- a/tests/unit/views/Home.spec.js
+++ b/tests/unit/pages/Home.spec.js
@@ -1,19 +1,15 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
import ElementUI from 'element-ui';
-import Home from '../../../src/views/Home.vue';
+import Home from '../../../pages/index.vue';
const localVue = createLocalVue();
localVue.use(ElementUI);
-const router = new VueRouter();
-
describe('Home.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(Home, {
localVue,
- router,
- stubs: ['router-link', 'router-view', 'font-awesome-icon', 'Adsense'],
+ stubs: ['nuxt-link', 'router-view', 'font-awesome-icon', 'Adsense'],
mocks: {
$t: () => {},
$route: {
diff --git a/tests/unit/views/Season.spec.js b/tests/unit/pages/Season.spec.js
similarity index 54%
rename from tests/unit/views/Season.spec.js
rename to tests/unit/pages/Season.spec.js
index 943bf7b..e0131a9 100644
--- a/tests/unit/views/Season.spec.js
+++ b/tests/unit/pages/Season.spec.js
@@ -1,26 +1,24 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-import VueRouter from 'vue-router';
+
import Vuex from 'vuex';
import ElementUI from 'element-ui';
-import Season from '../../../src/views/Season.vue';
+import Season from '../../../pages/seasons/index.vue';
-const initialWidth = window.innerWidth;
+jest.mock('../../../utils');
+// eslint-disable-next-line import/first
+import utils from '../../../utils';
describe('Season.vue', () => {
let localVue;
- let router;
let store;
let actions;
beforeAll(() => {
- window.innerWidth = initialWidth;
localVue = createLocalVue();
localVue.use(ElementUI);
- router = new VueRouter();
-
-
actions = {
getAll: jest.fn(),
+ destroyAll: jest.fn(),
};
localVue.use(Vuex);
@@ -35,33 +33,63 @@ describe('Season.vue', () => {
});
});
- it('check initial data', () => {
- const methods = {
- handleResize: jest.fn(),
- };
+ beforeEach(() => {
+ process.browser = false;
+ });
- // eslint-disable-next-line no-unused-vars
- const wrapper = shallowMount(Season, {
- localVue,
- router,
- store,
- mocks: {
- $t: () => {},
- $route: {
- params: {
- season_number: () => '0',
+ describe('check initial data', () => {
+ it('it should load default data', () => {
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ const wrapper = shallowMount(Season, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ season_number: () => '0',
+ },
},
},
- },
- methods,
+ methods,
+ });
+
+ expect(wrapper.vm.gutter).toEqual(50);
});
- expect(methods.handleResize).toHaveBeenCalled();
- expect(actions.getAll).toHaveBeenCalled();
+ it('it should execute created hook in browser', () => {
+ process.browser = true;
+
+ const methods = {
+ handleResize: jest.fn(),
+ };
+
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(Season, {
+ localVue,
+ store,
+ mocks: {
+ $t: () => {},
+ $route: {
+ params: {
+ season_number: () => '0',
+ },
+ },
+ },
+ methods,
+ });
+
+ expect(methods.handleResize).toHaveBeenCalled();
+ });
});
describe('handleResize', () => {
it('gutter for mobile', () => {
+ utils.isMobile.mockReturnValue(true);
+
const wrapper = shallowMount(Season, {
localVue,
store,
@@ -73,15 +101,16 @@ describe('Season.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 767;
wrapper.vm.handleResize();
expect(wrapper.vm.gutter).toEqual(20);
});
it('gutter for desktop', () => {
+ utils.isMobile.mockReturnValue(false);
+
const wrapper = shallowMount(Season, {
localVue,
store,
@@ -93,10 +122,9 @@ describe('Season.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
- window.innerWidth = 800;
wrapper.vm.handleResize();
expect(wrapper.vm.gutter).toEqual(50);
});
@@ -114,7 +142,7 @@ describe('Season.vue', () => {
},
},
},
- stubs: ['router-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/plugins/anhqvClient/anhqvClient.spec.js b/tests/unit/plugins/anhqvClient/anhqvClient.spec.js
index af1210c..3c309e8 100644
--- a/tests/unit/plugins/anhqvClient/anhqvClient.spec.js
+++ b/tests/unit/plugins/anhqvClient/anhqvClient.spec.js
@@ -1,7 +1,7 @@
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
-const client = require('../../../../src/plugins/anhqvClient/client');
+const client = require('../../../../plugins/anhqvClient/client');
describe('anhqvClient', () => {
let anhqvClient;
diff --git a/tests/unit/store/actors.spec.js b/tests/unit/store/actors.spec.js
index 44652ef..c6af6be 100644
--- a/tests/unit/store/actors.spec.js
+++ b/tests/unit/store/actors.spec.js
@@ -1,5 +1,6 @@
+
import Vue from 'vue';
-import store from '../../../src/store/modules/actors';
+import { state, actions, mutations } from '../../../store/actors';
describe('store/actors.js', () => {
beforeEach(() => {
@@ -7,8 +8,6 @@ describe('store/actors.js', () => {
});
describe('actions', () => {
- const { actions } = store;
-
describe('getAll', () => {
it('it should call getActors method and setAll mutation', (done) => {
const expectedActors = [
@@ -67,8 +66,6 @@ describe('store/actors.js', () => {
});
describe('mutations', () => {
- const { mutations, state } = store;
-
describe('setAll', () => {
it('it should modify all state property', () => {
const actors = [
diff --git a/tests/unit/store/chapters.spec.js b/tests/unit/store/chapters.spec.js
index 66d9345..c657e82 100644
--- a/tests/unit/store/chapters.spec.js
+++ b/tests/unit/store/chapters.spec.js
@@ -1,5 +1,6 @@
+
import Vue from 'vue';
-import store from '../../../src/store/modules/chapters';
+import { state, actions, mutations } from '../../../store/chapters';
describe('store/chapters.js', () => {
beforeEach(() => {
@@ -7,8 +8,6 @@ describe('store/chapters.js', () => {
});
describe('actions', () => {
- const { actions } = store;
-
describe('getAll', () => {
it('it should call getChapters method and setAll mutation', (done) => {
const expectedChapters = [
@@ -72,8 +71,6 @@ describe('store/chapters.js', () => {
});
describe('mutations', () => {
- const { mutations, state } = store;
-
describe('setAll', () => {
it('it should modify all state property', () => {
const chapters = [
diff --git a/tests/unit/store/characters.spec.js b/tests/unit/store/characters.spec.js
index 41bd565..3fcfc97 100644
--- a/tests/unit/store/characters.spec.js
+++ b/tests/unit/store/characters.spec.js
@@ -1,5 +1,6 @@
+
import Vue from 'vue';
-import store from '../../../src/store/modules/characters';
+import { state, actions, mutations } from '../../../store/characters';
describe('store/characters.js', () => {
beforeEach(() => {
@@ -7,8 +8,6 @@ describe('store/characters.js', () => {
});
describe('actions', () => {
- const { actions } = store;
-
describe('getAll', () => {
it('it should call getCharacters method and setAll mutation', (done) => {
const expectedCharacters = [
@@ -67,8 +66,6 @@ describe('store/characters.js', () => {
});
describe('mutations', () => {
- const { mutations, state } = store;
-
describe('setAll', () => {
it('it should modify all state property', () => {
const characters = [
diff --git a/tests/unit/utils/funcs.spec.js b/tests/unit/utils/funcs.spec.js
index f2690b0..4c60adc 100644
--- a/tests/unit/utils/funcs.spec.js
+++ b/tests/unit/utils/funcs.spec.js
@@ -1,4 +1,4 @@
-import utils from '../../../src/utils';
+import utils from '../../../utils';
const initialWidth = window.innerWidth;
diff --git a/src/utils/constants.js b/utils/constants.js
similarity index 100%
rename from src/utils/constants.js
rename to utils/constants.js
diff --git a/src/utils/funcs.js b/utils/funcs.js
similarity index 100%
rename from src/utils/funcs.js
rename to utils/funcs.js
diff --git a/src/utils/index.js b/utils/index.js
similarity index 100%
rename from src/utils/index.js
rename to utils/index.js
diff --git a/vue.config.js b/vue.config.js
deleted file mode 100644
index 70a70ef..0000000
--- a/vue.config.js
+++ /dev/null
@@ -1,20 +0,0 @@
-module.exports = {
- devServer: {
- writeToDisk: true,
- },
- pluginOptions: {
- i18n: {
- locale: 'es',
- fallbackLocale: 'es',
- localeDir: 'locales',
- enableInSFC: true,
- },
- },
- css: {
- loaderOptions: {
- scss: {
- prependData: '@import "~@/styles/variables.scss";',
- },
- },
- },
-};
From 19e49f8088e03170ae26fbec7f045bed19c14f54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 00:44:31 +0200
Subject: [PATCH 02/11] =?UTF-8?q?#41=20Definici=C3=B3n=20de=20stubs=20en?=
=?UTF-8?q?=20tests=20unitarios=20para=20los=20componentes=20de=20ElementU?=
=?UTF-8?q?I?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tests/unit/App.spec.js | 9 ++++-----
tests/unit/components/ActorCard.spec.js | 2 ++
tests/unit/components/ChapterCard.spec.js | 2 ++
tests/unit/components/CharacterCard.spec.js | 2 ++
tests/unit/components/Menu.spec.js | 10 +++++-----
tests/unit/pages/ActorDetail.spec.js | 9 +++++----
tests/unit/pages/Actors.spec.js | 9 +++++----
tests/unit/pages/ChapterDetail.spec.js | 8 +++++---
tests/unit/pages/CharacterDetail.spec.js | 9 +++++----
tests/unit/pages/Characters.spec.js | 9 +++++----
tests/unit/pages/Home.spec.js | 2 +-
tests/unit/pages/Season.spec.js | 9 +++++----
12 files changed, 46 insertions(+), 34 deletions(-)
diff --git a/tests/unit/App.spec.js b/tests/unit/App.spec.js
index 48757bb..4e0db6f 100644
--- a/tests/unit/App.spec.js
+++ b/tests/unit/App.spec.js
@@ -1,4 +1,4 @@
-import { createLocalVue, mount } from '@vue/test-utils';
+import { createLocalVue, shallowMount } from '@vue/test-utils';
import ElementUI from 'element-ui';
import App from '../../layouts/default.vue';
@@ -13,9 +13,9 @@ localVue.use(ElementUI);
describe('App.vue', () => {
it('check header border-bottom', () => {
- const wrapper = mount(App, {
+ // eslint-disable-next-line no-unused-vars
+ const wrapper = shallowMount(App, {
localVue,
- stubs: ['nuxt-link', 'router-view', 'nuxt'],
mocks: {
$t: () => {},
$i18n: {},
@@ -25,8 +25,7 @@ describe('App.vue', () => {
},
},
},
+ stubs: ['nuxt-link', 'router-view', 'nuxt', 'el-container', 'el-header', 'el-main', 'el-footer', 'Menu'],
});
-
- expect(wrapper.find('.el-header').exists()).toBe(true);
});
});
diff --git a/tests/unit/components/ActorCard.spec.js b/tests/unit/components/ActorCard.spec.js
index 12a23e5..805c2f2 100644
--- a/tests/unit/components/ActorCard.spec.js
+++ b/tests/unit/components/ActorCard.spec.js
@@ -18,6 +18,7 @@ describe('ActorCard.vue', () => {
image_url: 'http://path/to/image',
},
},
+ stubs: ['el-card', 'el-row', 'el-button'],
});
expect(wrapper.props().actor.shortname).toBe('John');
expect(wrapper.props().actor.image_url).toBe('http://path/to/image');
@@ -42,6 +43,7 @@ describe('ActorCard.vue', () => {
image_url: 'http://path/to/image',
},
},
+ stubs: ['el-card', 'el-row', 'el-button'],
});
wrapper.vm.goToDetail();
diff --git a/tests/unit/components/ChapterCard.spec.js b/tests/unit/components/ChapterCard.spec.js
index 0e8e86c..4f79cd9 100644
--- a/tests/unit/components/ChapterCard.spec.js
+++ b/tests/unit/components/ChapterCard.spec.js
@@ -18,6 +18,7 @@ describe('ChapterCard.vue', () => {
image_url: 'http://path/to/image',
},
},
+ stubs: ['el-card', 'el-row', 'el-button'],
});
expect(wrapper.props().chapter.name).toBe('Érase un X');
expect(wrapper.props().chapter.image_url).toBe('http://path/to/image');
@@ -43,6 +44,7 @@ describe('ChapterCard.vue', () => {
image_url: 'http://path/to/image',
},
},
+ stubs: ['el-card', 'el-row', 'el-button'],
});
wrapper.vm.goToDetail();
diff --git a/tests/unit/components/CharacterCard.spec.js b/tests/unit/components/CharacterCard.spec.js
index 38923fd..aa38b46 100644
--- a/tests/unit/components/CharacterCard.spec.js
+++ b/tests/unit/components/CharacterCard.spec.js
@@ -18,6 +18,7 @@ describe('CharacterCard.vue', () => {
image_url: 'http://path/to/image',
},
},
+ stubs: ['el-card', 'el-row', 'el-button'],
});
expect(wrapper.props().character.shortname).toBe('John');
expect(wrapper.props().character.image_url).toBe('http://path/to/image');
@@ -42,6 +43,7 @@ describe('CharacterCard.vue', () => {
image_url: 'http://path/to/image',
},
},
+ stubs: ['el-card', 'el-row', 'el-button'],
});
wrapper.vm.goToDetail();
diff --git a/tests/unit/components/Menu.spec.js b/tests/unit/components/Menu.spec.js
index f1ae594..760d096 100644
--- a/tests/unit/components/Menu.spec.js
+++ b/tests/unit/components/Menu.spec.js
@@ -29,7 +29,7 @@ describe('Menu.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-submenu', 'el-menu', 'el-menu-item', 'el-aside'],
});
expect(JSON.stringify(wrapper.vm.defaultOpeneds)).toBe(JSON.stringify(['4']));
expect(wrapper.vm.isCollapsed).toBeFalsy();
@@ -56,7 +56,7 @@ describe('Menu.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-submenu', 'el-menu', 'el-menu-item', 'el-aside'],
methods,
});
@@ -81,7 +81,7 @@ describe('Menu.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-submenu', 'el-menu', 'el-menu-item', 'el-aside'],
});
wrapper.vm.handleResize();
@@ -104,7 +104,7 @@ describe('Menu.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-submenu', 'el-menu', 'el-menu-item', 'el-aside'],
});
wrapper.vm.handleResize();
@@ -126,7 +126,7 @@ describe('Menu.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-submenu', 'el-menu', 'el-menu-item', 'el-aside'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/pages/ActorDetail.spec.js b/tests/unit/pages/ActorDetail.spec.js
index 773ec11..f279614 100644
--- a/tests/unit/pages/ActorDetail.spec.js
+++ b/tests/unit/pages/ActorDetail.spec.js
@@ -1,5 +1,4 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import ActorDetail from '../../../pages/actors/_slug/index.vue';
@@ -62,6 +61,7 @@ describe('ActorDetail.vue', () => {
},
},
},
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
methods,
});
@@ -87,6 +87,7 @@ describe('ActorDetail.vue', () => {
},
},
},
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
methods,
});
@@ -109,7 +110,7 @@ describe('ActorDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
});
wrapper.vm.handleResize();
@@ -130,7 +131,7 @@ describe('ActorDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
});
wrapper.vm.handleResize();
@@ -150,7 +151,7 @@ describe('ActorDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/pages/Actors.spec.js b/tests/unit/pages/Actors.spec.js
index 7dd4574..2d5767a 100644
--- a/tests/unit/pages/Actors.spec.js
+++ b/tests/unit/pages/Actors.spec.js
@@ -1,5 +1,4 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import Actors from '../../../pages/actors/index.vue';
@@ -50,6 +49,7 @@ describe('Actors.vue', () => {
mocks: {
$t: () => {},
},
+ stubs: ['nuxt-link', 'router-view', 'el-row'],
methods,
});
});
@@ -68,6 +68,7 @@ describe('Actors.vue', () => {
mocks: {
$t: () => {},
},
+ stubs: ['nuxt-link', 'router-view', 'el-row'],
methods,
});
@@ -85,7 +86,7 @@ describe('Actors.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-row'],
});
wrapper.vm.handleResize();
@@ -101,7 +102,7 @@ describe('Actors.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-row'],
});
wrapper.vm.handleResize();
@@ -116,7 +117,7 @@ describe('Actors.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['nuxt-link', 'router-view', 'el-row'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/pages/ChapterDetail.spec.js b/tests/unit/pages/ChapterDetail.spec.js
index c97a4bd..3bc8d7c 100644
--- a/tests/unit/pages/ChapterDetail.spec.js
+++ b/tests/unit/pages/ChapterDetail.spec.js
@@ -62,6 +62,7 @@ describe('ChapterDetail.vue', () => {
},
},
},
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
methods,
});
});
@@ -85,6 +86,7 @@ describe('ChapterDetail.vue', () => {
},
},
},
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
methods,
});
@@ -108,7 +110,7 @@ describe('ChapterDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
});
wrapper.vm.handleResize();
@@ -129,7 +131,7 @@ describe('ChapterDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
});
wrapper.vm.handleResize();
@@ -149,7 +151,7 @@ describe('ChapterDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-row', 'el-col', 'el-avatar'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/pages/CharacterDetail.spec.js b/tests/unit/pages/CharacterDetail.spec.js
index 2dac63b..94912ac 100644
--- a/tests/unit/pages/CharacterDetail.spec.js
+++ b/tests/unit/pages/CharacterDetail.spec.js
@@ -1,5 +1,4 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import CharacterDetail from '../../../pages/characters/_slug/index.vue';
@@ -62,6 +61,7 @@ describe('CharacterDetail.vue', () => {
},
},
},
+ stubs: ['el-card', 'el-col', 'el-row', 'el-avatar'],
methods,
});
@@ -87,6 +87,7 @@ describe('CharacterDetail.vue', () => {
},
},
},
+ stubs: ['el-card', 'el-col', 'el-row', 'el-avatar'],
methods,
});
@@ -109,7 +110,7 @@ describe('CharacterDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-col', 'el-row', 'el-avatar'],
});
wrapper.vm.handleResize();
@@ -130,7 +131,7 @@ describe('CharacterDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-col', 'el-row', 'el-avatar'],
});
wrapper.vm.handleResize();
@@ -150,7 +151,7 @@ describe('CharacterDetail.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-card', 'el-col', 'el-row', 'el-avatar'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/pages/Characters.spec.js b/tests/unit/pages/Characters.spec.js
index c7dd9a4..70def74 100644
--- a/tests/unit/pages/Characters.spec.js
+++ b/tests/unit/pages/Characters.spec.js
@@ -1,5 +1,4 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import Characters from '../../../pages/characters/index.vue';
@@ -50,6 +49,7 @@ describe('Characters.vue', () => {
mocks: {
$t: () => {},
},
+ stubs: ['el-row'],
methods,
});
});
@@ -68,6 +68,7 @@ describe('Characters.vue', () => {
mocks: {
$t: () => {},
},
+ stubs: ['el-row'],
methods,
});
@@ -86,7 +87,7 @@ describe('Characters.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-row'],
});
wrapper.vm.handleResize();
@@ -102,7 +103,7 @@ describe('Characters.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-row'],
});
wrapper.vm.handleResize();
@@ -117,7 +118,7 @@ describe('Characters.vue', () => {
mocks: {
$t: () => {},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-row'],
});
window.removeEventListener = jest.fn();
diff --git a/tests/unit/pages/Home.spec.js b/tests/unit/pages/Home.spec.js
index 0aa01ed..cdfe948 100644
--- a/tests/unit/pages/Home.spec.js
+++ b/tests/unit/pages/Home.spec.js
@@ -9,7 +9,7 @@ describe('Home.vue', () => {
it('check initial data', () => {
const wrapper = shallowMount(Home, {
localVue,
- stubs: ['nuxt-link', 'router-view', 'font-awesome-icon', 'Adsense'],
+ stubs: ['nuxt-link', 'router-view', 'font-awesome-icon', 'Adsense', 'el-row', 'el-col', 'el-card'],
mocks: {
$t: () => {},
$route: {
diff --git a/tests/unit/pages/Season.spec.js b/tests/unit/pages/Season.spec.js
index e0131a9..7d06605 100644
--- a/tests/unit/pages/Season.spec.js
+++ b/tests/unit/pages/Season.spec.js
@@ -1,5 +1,4 @@
import { createLocalVue, shallowMount } from '@vue/test-utils';
-
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import Season from '../../../pages/seasons/index.vue';
@@ -54,6 +53,7 @@ describe('Season.vue', () => {
},
},
},
+ stubs: ['el-row'],
methods,
});
@@ -79,6 +79,7 @@ describe('Season.vue', () => {
},
},
},
+ stubs: ['el-row'],
methods,
});
@@ -101,7 +102,7 @@ describe('Season.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-row'],
});
wrapper.vm.handleResize();
@@ -122,7 +123,7 @@ describe('Season.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-row'],
});
wrapper.vm.handleResize();
@@ -142,7 +143,7 @@ describe('Season.vue', () => {
},
},
},
- stubs: ['nuxt-link', 'router-view'],
+ stubs: ['el-row'],
});
window.removeEventListener = jest.fn();
From 7928b4ffc8f666bcb0e93c3585c9886d927bf735 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:27:24 +0200
Subject: [PATCH 03/11] =?UTF-8?q?Correcci=C3=B3n=20de=20literal=20de=20bot?=
=?UTF-8?q?=C3=B3n=20de=20detalle=20de=20un=20cap=C3=ADtulo?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/ChapterCard.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/ChapterCard.vue b/components/ChapterCard.vue
index b746dc6..f3ad2bd 100644
--- a/components/ChapterCard.vue
+++ b/components/ChapterCard.vue
@@ -38,7 +38,7 @@ export default {
},
data() {
return {
- detailButtonText: this.$t('VIEWS.CHAPTERS.SEE_DETAIL.TEXT'),
+ detailButtonText: this.$t('VIEWS.SEASONS.SEE_DETAIL.TEXT'),
};
},
methods: {
From 2c85c0d205dc5e3ba79e43ff6c33742fd51851e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:27:51 +0200
Subject: [PATCH 04/11] =?UTF-8?q?Correcci=C3=B3n=20de=20nombre=20de=20ruta?=
=?UTF-8?q?=20de=20pantalla=20de=20detalle=20de=20cap=C3=ADtulo=20en=20tar?=
=?UTF-8?q?jeta=20de=20listado?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/ChapterCard.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/ChapterCard.vue b/components/ChapterCard.vue
index f3ad2bd..48d1f9b 100644
--- a/components/ChapterCard.vue
+++ b/components/ChapterCard.vue
@@ -44,7 +44,7 @@ export default {
methods: {
goToDetail() {
this.$router.push({
- name: `seasons-season_number-slug___${this.$i18n.locale}`,
+ name: `seasons-season_number-chapters-slug___${this.$i18n.locale}`,
params: {
season_number: this.chapter.season,
slug: this.chapter.slug,
From d22d1e9bcdb0a99a0a4215472b6506fafe18b96a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:28:13 +0200
Subject: [PATCH 05/11] =?UTF-8?q?Ajuste=20en=20test=20unitario=20para=20na?=
=?UTF-8?q?vegaci=C3=B3n=20a=20pantalla=20de=20detalle=20de=20cap=C3=ADtul?=
=?UTF-8?q?o?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tests/unit/components/ChapterCard.spec.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/unit/components/ChapterCard.spec.js b/tests/unit/components/ChapterCard.spec.js
index 4f79cd9..db3fe7a 100644
--- a/tests/unit/components/ChapterCard.spec.js
+++ b/tests/unit/components/ChapterCard.spec.js
@@ -50,7 +50,7 @@ describe('ChapterCard.vue', () => {
wrapper.vm.goToDetail();
expect(wrapper.vm.$router.push).toHaveBeenCalledWith({
- name: 'seasons-season_number-slug___es',
+ name: 'seasons-season_number-chapters-slug___es',
params: {
slug: '0x01',
season_number: '0',
From ebb64d175586406e22b1373694ba89905d3291a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:29:25 +0200
Subject: [PATCH 06/11] =?UTF-8?q?Fijaci=C3=B3n=20de=20versiones=20de=20dep?=
=?UTF-8?q?endencias?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/package.json b/package.json
index e158b27..92e4d14 100644
--- a/package.json
+++ b/package.json
@@ -13,18 +13,18 @@
"i18n:report": "vue-cli-service i18n:report --src \"./**/*.?(js|vue)\" --locales \"./locales/**/*.json\""
},
"dependencies": {
- "@fortawesome/fontawesome-svg-core": "^1.2.28",
- "@fortawesome/free-brands-svg-icons": "^5.13.0",
- "@fortawesome/free-solid-svg-icons": "^5.13.0",
- "@fortawesome/vue-fontawesome": "^0.1.9",
+ "@fortawesome/fontawesome-svg-core": "1.2.28",
+ "@fortawesome/free-brands-svg-icons": "5.13.0",
+ "@fortawesome/free-solid-svg-icons": "5.13.0",
+ "@fortawesome/vue-fontawesome": "0.1.9",
"@nuxtjs/axios": "5.9.7",
"@nuxtjs/dotenv": "1.4.1",
"axios": "0.19.2",
"element-ui": "2.13.1",
"nuxt": "2.12.2",
- "nuxt-fontawesome": "^0.4.0",
- "nuxt-i18n": "^6.9.1",
- "nuxt-sass-resources-loader": "^2.0.5",
+ "nuxt-fontawesome": "0.4.0",
+ "nuxt-i18n": "6.9.1",
+ "nuxt-sass-resources-loader": "2.0.5",
"vue": "2.6.11",
"vue-adblock-detect": "0.0.2",
"vue-google-adsense": "1.8.1",
From b8cf9738be10c1c555008904fc84763d249ff867 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:29:54 +0200
Subject: [PATCH 07/11] =?UTF-8?q?Sustituci=C3=B3n=20de=20librer=C3=ADas=20?=
=?UTF-8?q?de=20adsense=20de=20vue=20por=20la=20oficial=20de=20la=20comuni?=
=?UTF-8?q?dad=20de=20nuxt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 92e4d14..9a76720 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
"@fortawesome/vue-fontawesome": "0.1.9",
"@nuxtjs/axios": "5.9.7",
"@nuxtjs/dotenv": "1.4.1",
+ "@nuxtjs/google-adsense": "1.1.3",
"axios": "0.19.2",
"element-ui": "2.13.1",
"nuxt": "2.12.2",
@@ -27,8 +28,6 @@
"nuxt-sass-resources-loader": "2.0.5",
"vue": "2.6.11",
"vue-adblock-detect": "0.0.2",
- "vue-google-adsense": "1.8.1",
- "vue-script2": "2.1.0",
"vuex": "3.1.3"
},
"devDependencies": {
From 9ac1d5fb026028899c279007a253dd57d125113c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:30:53 +0200
Subject: [PATCH 08/11] =?UTF-8?q?Configuraci=C3=B3n=20de=20id=20de=20googl?=
=?UTF-8?q?e=20adsense=20en=20m=C3=B3dulo=20de=20nuxt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
nuxt.config.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nuxt.config.js b/nuxt.config.js
index 1a4bbca..4b49f98 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -75,6 +75,9 @@ export default {
},
],
}],
+ ['@nuxtjs/google-adsense', {
+ id: 'ca-pub-2309187828170787',
+ }],
],
styleResources: {
From 16c16643102421a75c01e0e7b2f191c17c7b90e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:31:13 +0200
Subject: [PATCH 09/11] =?UTF-8?q?Sustituci=C3=B3n=20de=20componente=20de?=
=?UTF-8?q?=20adsense=20en=20la=20pantalla=20de=20la=20Home?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/index.vue | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pages/index.vue b/pages/index.vue
index 476579e..247dd08 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -10,18 +10,17 @@
-
+
Date: Mon, 20 Apr 2020 01:31:35 +0200
Subject: [PATCH 10/11] =?UTF-8?q?Actualizaci=C3=B3n=20de=20la=20versi?=
=?UTF-8?q?=C3=B3n=20de=20la=20aplicaci=C3=B3n=20en=20el=20package.json?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 9a76720..7002fea 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "anhqv-stats",
- "version": "0.6.1",
+ "version": "0.7.0",
"private": true,
"scripts": {
"dev": "nuxt",
From 07a43fecf3fb656a31fff50ed79f274fbfaf31bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Pazos?=
Date: Mon, 20 Apr 2020 01:32:58 +0200
Subject: [PATCH 11/11] =?UTF-8?q?Actualizaci=C3=B3n=20de=20fichero=20packa?=
=?UTF-8?q?ge-lock.json?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package-lock.json | 45 +++++++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 18 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index fa21a70..d3efd76 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "anhqv-stats",
- "version": "0.6.1",
+ "version": "0.7.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1731,6 +1731,11 @@
"eslint-loader": "^3.0.0"
}
},
+ "@nuxtjs/google-adsense": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@nuxtjs/google-adsense/-/google-adsense-1.1.3.tgz",
+ "integrity": "sha512-29gKidhkZWr+nAbAXumjEq/ETgUM6/WLMnTodI6dA0sWLVTD59F8OWjNoFj07mYxeW6TA1L3vSuJf/cXvGfdvA=="
+ },
"@nuxtjs/proxy": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/@nuxtjs/proxy/-/proxy-1.3.3.tgz",
@@ -6459,11 +6464,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -6476,15 +6483,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -6587,7 +6597,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -6597,6 +6608,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6609,17 +6621,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -6636,6 +6651,7 @@
"mkdirp": {
"version": "0.5.3",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "^1.2.5"
}
@@ -6716,7 +6732,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -6726,6 +6743,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -6824,6 +6842,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -14924,11 +14943,6 @@
}
}
},
- "vue-google-adsense": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/vue-google-adsense/-/vue-google-adsense-1.8.1.tgz",
- "integrity": "sha512-m3T6XHUjZb/dz6BU0RmNouI1XtyqRDpFYH+RXGH8yQa5vRrEz0doEE09Ped3aTbLFWC+uBTOM4yiCjdX6FXoUQ=="
- },
"vue-hot-reload-api": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
@@ -15085,11 +15099,6 @@
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.6.tgz",
"integrity": "sha512-GYhn2ynaZlysZMkFE5oCHRUTqE8BWs/a9YbKpNLi0i7xD6KG1EzDqpHQmv1F5gXjr8kL5iIVS8EOtRaVUEXTqA=="
},
- "vue-script2": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/vue-script2/-/vue-script2-2.1.0.tgz",
- "integrity": "sha512-EDUOjQBFvhkJXwmWuUR9ijlF7/4JtmvjXSKaHSa/LNTMy9ltjgKgYB68aqlxgq8ORdSxowd5eo24P1syjZJnBA=="
- },
"vue-server-renderer": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/vue-server-renderer/-/vue-server-renderer-2.6.11.tgz",