From 5e75daa73282c2c356f79e4d26722bd5ba6181d7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 12 Oct 2019 13:16:36 +0200 Subject: [PATCH] Add e2e seed and test event creation Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 1 + config/config.exs | 3 +- js/src/components/Event/EventFullDate.vue | 2 +- js/src/components/NavBar.vue | 4 +- js/src/i18n/en_US.json | 3 +- js/src/i18n/fr_FR.json | 3 +- js/src/utils/auth.ts | 7 ++- js/src/views/Account/Register.vue | 11 +++-- js/src/views/User/Login.vue | 13 +++++- js/tests/e2e/specs/dashboard.js | 8 ---- js/tests/e2e/specs/event.js | 44 +++++++++++++++++ js/tests/e2e/specs/login.js | 48 +++++++++++++++++-- js/tests/e2e/specs/register.js | 6 +-- js/tests/e2e/support/commands.js | 56 ++++++++++++++++++++++ lib/mobilizon_web/router.ex | 1 + priv/repo/e2e.seed.exs | 57 +++++++++++++++++++++++ 16 files changed, 237 insertions(+), 30 deletions(-) create mode 100644 js/tests/e2e/specs/event.js create mode 100644 priv/repo/e2e.seed.exs diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a983eab5c..a18f19bf9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -91,6 +91,7 @@ cypress: - cd ../ - MIX_ENV=e2e mix ecto.create - MIX_ENV=e2e mix ecto.migrate + - MIX_ENV=e2e mix run priv/repo/e2e.seed.exs - MIX_ENV=e2e mix phx.server & - cd js - npx wait-on http://localhost:4000 diff --git a/config/config.exs b/config/config.exs index 6da132e77..d911236fd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -7,7 +7,8 @@ import Config # General application configuration config :mobilizon, - ecto_repos: [Mobilizon.Storage.Repo] + ecto_repos: [Mobilizon.Storage.Repo], + env: Mix.env() config :mobilizon, :instance, name: System.get_env("MOBILIZON_INSTANCE_NAME") || "My Mobilizon Instance", diff --git a/js/src/components/Event/EventFullDate.vue b/js/src/components/Event/EventFullDate.vue index b8076d8d3..15bc0f47d 100644 --- a/js/src/components/Event/EventFullDate.vue +++ b/js/src/components/Event/EventFullDate.vue @@ -20,7 +20,7 @@