1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Updated name of tournaments in seeds and added local cypress tests

This commit is contained in:
2024-03-16 19:06:40 -04:00
parent e46180e9ea
commit b108545034
5 changed files with 22 additions and 13 deletions

View File

@@ -78,7 +78,7 @@ GEM
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.6)
bigdecimal (3.1.7)
brakeman (6.1.2)
racc
builder (3.2.4)
@@ -152,7 +152,7 @@ GEM
net-smtp
marcel (1.0.4)
mini_mime (1.1.5)
minitest (5.22.2)
minitest (5.22.3)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
mutex_m (0.2.0)

View File

@@ -1,4 +1,4 @@
FROM cypress/included:12.4.0
FROM cypress/included:13.2.0
COPY cypress.config.js /
COPY ./tests/* /cypress/e2e/

View File

@@ -2,7 +2,7 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
baseUrl: 'http://wrestlingdev-test.wimer.house',
baseUrl: 'http://localhost',
supportFile: false,
video: false,
},

View File

@@ -1,13 +1,22 @@
#!/bin/bash
#!/bin/bash
project_dir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.."
cd ${project_dir}
cd ${project_dir}/cypress-tests
cd deploy
bash deploy-test.sh
cd ../cypress-tests
# include ruby, mysql, memcached, and cypress in dockerfile to emulate prod?
# then cypress points to localhost within the docker
docker build -t wrestlingdev-cypress .
docker run -it --rm wrestlingdev-cypress
docker run -i --rm --network=host wrestlingdev-cypress
test_results=$?
cd ../deploy
docker-compose -f docker-compose-test.yml down
docker volume rm deploy_influxdb deploy_mysql
exit $?

View File

@@ -31,7 +31,7 @@
User.create(id: 1, email: 'test@test.com', password: 'password', password_confirmation: 'password')
# Pool to bracket
tournament = Tournament.create(id: 200, name: 'Test1', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Pool to bracket', user_id: 1, date: Date.today, is_public: true)
tournament = Tournament.create(id: 200, name: 'Pool to bracket', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Pool to bracket', user_id: 1, date: Date.today, is_public: true)
create_schools(tournament, 16)
weight_classes=Weight::HS_WEIGHT_CLASSES.split(",")
tournament.create_pre_defined_weights(weight_classes)
@@ -42,7 +42,7 @@
end
# Modified 16 Man Double Elimination 1-6
tournament = Tournament.create(id: 201, name: 'Test2', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true)
tournament = Tournament.create(id: 201, name: 'Modified 16 Man Double Elimination 1-6', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true)
create_schools(tournament, 16)
weight_classes=Weight::HS_WEIGHT_CLASSES.split(",")
tournament.create_pre_defined_weights(weight_classes)
@@ -53,7 +53,7 @@
end
# Modified 16 Man Double Elimination 1-8
tournament = Tournament.create(id: 202, name: 'Test3', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true)
tournament = Tournament.create(id: 202, name: 'Modified 16 Man Double Elimination 1-8', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true)
create_schools(tournament, 16)
weight_classes=Weight::HS_WEIGHT_CLASSES.split(",")
tournament.create_pre_defined_weights(weight_classes)
@@ -64,7 +64,7 @@
end
# Regular Double Elimination 1-6
tournament = Tournament.create(id: 203, name: 'Test4', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true)
tournament = Tournament.create(id: 203, name: 'Regular Double Elimination 1-6', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true)
create_schools(tournament, 16)
weight_classes=Weight::HS_WEIGHT_CLASSES.split(",")
tournament.create_pre_defined_weights(weight_classes)
@@ -75,7 +75,7 @@
end
# Regular Double Elimination 1-8
tournament = Tournament.create(id: 204, name: 'Test5', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true)
tournament = Tournament.create(id: 204, name: 'Regular Double Elimination 1-8', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true)
create_schools(tournament, 16)
weight_classes=Weight::HS_WEIGHT_CLASSES.split(",")
tournament.create_pre_defined_weights(weight_classes)