Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

Games unit tests #6

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9bc8418
Add active and focus custom button style
MartynaAnnaGottschling Sep 10, 2018
75a4678
Add missed custom button style to encyclopedia view
MartynaAnnaGottschling Sep 10, 2018
e4d1d27
Add missed PL translation to encyclopedia view
MartynaAnnaGottschling Sep 10, 2018
d8c5fbb
Add missed PL translation to game edit view
MartynaAnnaGottschling Sep 10, 2018
8a80c7c
Add missed PL translation to users SignUp view
MartynaAnnaGottschling Sep 10, 2018
8bbac86
[M] missed migrations after changing games models
MartynaAnnaGottschling Sep 10, 2018
6ee78a0
Split game panel html and refresh js
MartynaAnnaGottschling Sep 13, 2018
c3d5a0e
Change PL translation for edit game form
MartynaAnnaGottschling Sep 13, 2018
06cc42b
Split game panel and JS-gamer display
MartynaAnnaGottschling Sep 17, 2018
9a9f252
Split game panel view and JS-adjust table size
MartynaAnnaGottschling Sep 17, 2018
ad691e1
Split game panel view and JS-win popup
MartynaAnnaGottschling Sep 17, 2018
ecd6226
Move JS to external 'scripts' folder
MartynaAnnaGottschling Sep 17, 2018
52d6e47
Add unit tests for game access view.
maciejSamerdak Sep 12, 2018
77033f6
Add gamer form tests
maciejSamerdak Sep 13, 2018
6bd1a68
Add help view test
maciejSamerdak Sep 13, 2018
b420d38
Add encyclopedia view unit tests
maciejSamerdak Sep 17, 2018
9d51e70
Add create game view unit tests
maciejSamerdak Sep 17, 2018
6873d1e
Add game edit view unit tests
maciejSamerdak Sep 17, 2018
484d677
Add generate game code function unit tests
maciejSamerdak Sep 17, 2018
3a92933
Add end game view unit tests
maciejSamerdak Sep 19, 2018
a36f36f
Add stats game view unit tests
maciejSamerdak Sep 19, 2018
d2ac3c7
Add edit game form unit tests
maciejSamerdak Sep 19, 2018
d88bc1a
Update module referrences in games unit tests
maciejSamerdak Sep 19, 2018
0e00c05
Delete tests.py in games/tests
maciejSamerdak Sep 21, 2018
faa8979
Add gamer edit form unit tests
maciejSamerdak Sep 21, 2018
f8c4f10
Add gamer order form unit tests
maciejSamerdak Sep 21, 2018
fc115c7
Fix missing timezone import in update_stats view
maciejSamerdak Sep 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 49 additions & 32 deletions e_munchkin/locale/pl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-06 16:59+0200\n"
"POT-Creation-Date: 2018-09-10 10:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -28,23 +28,35 @@ msgstr "Angielski"
msgid "Polish"
msgstr "Polski"

#: games/forms.py:10 games/templates/games/game_end.html:79
#: games/forms/form_edit_game.py:10
msgid "Name"
msgstr "Nazwa"

#: games/forms/form_edit_game.py:11
msgid "Players number"
msgstr "Liczba graczy"

#: games/forms/form_edit_game.py:12
msgid "Finish at level"
msgstr "Skończ wraz z poziomem"

#: games/forms/form_gamer.py:14 games/templates/games/game_end.html:79
#: games/templates/games/game_stats.html:79
msgid "Status"
msgstr "Status"

#: games/forms.py:11 games/templates/games/game_access.html:54
#: games/forms/form_gamer.py:15 games/templates/games/game_access.html:54
#: games/templates/games/game_end.html:27
#: games/templates/games/game_stats.html:27
msgid "Level"
msgstr "Poziom"

#: games/forms.py:12 games/templates/games/game_end.html:32
#: games/forms/form_gamer.py:16 games/templates/games/game_end.html:32
#: games/templates/games/game_stats.html:32
msgid "Bonus"
msgstr "Bonus"

#: games/forms.py:14 games/templates/games/game_end.html:42
#: games/forms/form_gamer.py:18 games/templates/games/game_end.html:42
#: games/templates/games/game_end.html:51
#: games/templates/games/game_panel.html:165
#: games/templates/games/game_panel.html:172
Expand All @@ -54,7 +66,7 @@ msgstr "Bonus"
msgid "Race"
msgstr "Rasa"

#: games/forms.py:16 games/templates/games/game_end.html:60
#: games/forms/form_gamer.py:20 games/templates/games/game_end.html:60
#: games/templates/games/game_end.html:69
#: games/templates/games/game_panel.html:166
#: games/templates/games/game_panel.html:178
Expand All @@ -64,58 +76,47 @@ msgstr "Rasa"
msgid "Class"
msgstr "Klasa"

#: games/forms.py:44
#: games/forms/form_gamer_order.py:11 games/templates/games/game_edit.html:109
msgid "Order"
msgstr "Miejsce"

#: games/forms.py:56
#: games/forms/form_gamer_order.py:23
msgid "This order has already been taken :("
msgstr "To miejsce już jest zajęte :("

#: games/forms.py:71 games/templates/games/game_access.html:53
#: games/forms/form_join.py:9 games/templates/games/game_access.html:53
#: games/templates/games/game_edit.html:110
#: games/templates/games/game_end.html:22
#: games/templates/games/game_stats.html:22
#: users/templates/users/user_stats.html:73
#: users/templates/users/user_stats.html:101
msgid "Nick"
msgstr "Pseudonim"

#: games/forms.py:72
#: games/forms/form_join.py:10
msgid "Game access code"
msgstr "Kod dostępu gry"

#: games/forms.py:96
#: games/forms/form_join.py:31
msgid "WHOOPS! No such game could be found!"
msgstr "UPS! Nie znaleziono takiej gry!"

#: games/forms.py:102
#: games/forms/form_join.py:37
msgid "You have already joined this game!"
msgstr "Już bierzesz udział w tej grze!"

#: games/forms.py:105
#: games/forms/form_join.py:40
msgid "Sorry, this game has already finished."
msgstr "Wybacz, ta gra już się skończyła."

#: games/forms.py:107
#: games/forms/form_join.py:42
msgid "Sorry, no more places available. :-("
msgstr "Wybacz, brak wolnych miejsc. :-("

#: games/forms.py:113
#: games/forms/form_join.py:48
msgid "This nickname has already been taken. :-("
msgstr "Ten pseudonim jest już zajęty. :-("

#: games/forms.py:118
msgid "Name"
msgstr "Imię"

#: games/forms.py:119
msgid "Players number"
msgstr "Liczba graczy"

#: games/forms.py:120
msgid "Finish at level"
msgstr "Skończ wraz z poziomem"

#: games/templates/games/delete_gamer.html:8
msgid "Withdraw"
msgstr "Wycofaj się"
Expand Down Expand Up @@ -171,6 +172,14 @@ msgstr "Opis"
msgid "Classes"
msgstr "Klasy"

#: games/templates/games/encyclopedia.html:159
msgid "Instruction"
msgstr "Instrukcja"

#: games/templates/games/encyclopedia.html:160
msgid "How to play"
msgstr "Jak grać"

#: games/templates/games/encyclopedia.html:193
#: games/templates/games/game_edit.html:148
#: users/templates/users/change_password.html:39
Expand Down Expand Up @@ -723,21 +732,21 @@ msgstr "raz"
msgid "times"
msgstr "razy"

#: users/forms.py:9
#: users/forms/form_custom_user_creation.py:9
msgid "Password"
msgstr "Hasło"

#: users/forms.py:9
#: users/forms/form_custom_user_creation.py:9
msgid "Your password must contain at least 8 characters."
msgstr "Twoje hasło musi zawierać co najmniej 8 znaków."

#: users/forms.py:10
#: users/forms/form_custom_user_creation.py:10
msgid "Password confirmation"
msgstr "Potwierdzenie hasła"

#: users/forms.py:10
#: users/forms/form_custom_user_creation.py:10
msgid "Enter the same password as above, for verification."
msgstr "Wpisz takie samo hasło jak powyżej, dla weryfikacji"
msgstr "Wpisz takie samo hasło jak powyżej, dla weryfikacji."

#: users/models.py:8
msgid "username"
Expand All @@ -752,10 +761,18 @@ msgstr "Wymagane. 30 znaków lub więcej. Litery, cyfry i znaki @/./+/-/_"
msgid "nick name"
msgstr "pseudonim"

#: users/models.py:11
msgid "It will be used for games. You can change it later."
msgstr "Używany podczas gry. Możesz go zmienić później."

#: users/models.py:12
msgid "email address"
msgstr "adres email"

#: users/models.py:12
msgid "Required to account verification."
msgstr "Wymagane do weryfikacji konta."

#: users/models.py:13
msgid "date joined"
msgstr "data dołączenia"
Expand Down
19 changes: 19 additions & 0 deletions games/migrations/0007_auto_20180910_1042.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.0.7 on 2018-09-10 08:42

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('games', '0006_auto_20180903_1102'),
]

operations = [
migrations.AlterField(
model_name='game',
name='max_players',
field=models.IntegerField(default=6, validators=[django.core.validators.MinValueValidator(2), django.core.validators.MaxValueValidator(8)]),
),
]
24 changes: 0 additions & 24 deletions games/static/games/game_panel.js

This file was deleted.

18 changes: 18 additions & 0 deletions games/static/games/scripts/MobileDevice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function isMobileDevice() {
return (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1);
};

if (isMobileDevice() == true){
document.getElementById('game_panel_table').setAttribute('height', 0.85*window.innerHeight);
document.getElementById('game_panel_table').setAttribute('width', 0.95*window.innerWidth);
if (window.innerHeight<window.innerWidth){
document.getElementById('game_panel_table').style.fontSize = "75%";
}
else document.getElementById('game_panel_table').style.fontSize = "90%";
}
else {
document.getElementById('game_panel_table').setAttribute('height', 0.85*window.innerHeight);
document.getElementById('game_panel_table').setAttribute('width', 0.95*window.innerWidth);
document.getElementById('game_panel_table').style.fontSize = "90%";
}
document.getElementById('game_panel_table').style.fontSize = "90%";
Loading