Commit Graph

81 Commits

Author SHA1 Message Date
Thomas Rubini
2459d74df0 fix test that game cannot be started twice 2023-01-06 08:33:51 +01:00
Thomas Rubini
8c6128d45e prevent start from starting twice 2023-01-06 08:33:51 +01:00
Thomas Rubini
ca18e58e9d do not collect exception class 2023-01-06 08:33:51 +01:00
Thomas Rubini
d624ed9918 replace more asserts with exception checks in tests 2023-01-06 08:33:51 +01:00
Thomas Rubini
8550041345 check if username is already added to the game 2023-01-06 08:33:51 +01:00
Thomas Rubini
c670cd36e1 check if username is alphanumeric 2023-01-06 08:33:51 +01:00
Thomas Rubini
178894da06 use a custom error class in tests 2023-01-06 08:33:51 +01:00
Thomas Rubini
94ffdb10a1 update tests to detect exceptions 2023-01-06 08:33:51 +01:00
Thomas Rubini
b9f6b3245e check if username is valid 2023-01-06 08:33:51 +01:00
Thomas Rubini
0efba544bc remove prints in tests 2023-01-06 08:33:51 +01:00
Thomas Rubini
1ccabac77e replace "status" with "error" and "msg" in error codes 2023-01-06 08:33:51 +01:00
Thomas Rubini
2548cab78e remove getGameInfo endpoint 2023-01-06 08:33:51 +01:00
Thomas Rubini
3706198149 modify tests to not use jwt 2023-01-06 08:33:51 +01:00
Thomas Rubini
99a7ddf66e use flask sessions instead of jwt 2023-01-06 08:33:51 +01:00
AudricV
74f5c82a5d [Client] Add initial interactions on the game selection view
These interactions are checks of nickname and room code validity, where it is
relevant.

Also set a maximum room code length to 20 characters, at least for now.
2023-01-06 08:33:51 +01:00
AudricV
4c5f56edcf [Client] Add game selection view to start page
Some changes in the existing code have been also made to avoid code duplication
and fix some issues.

Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-06 08:33:51 +01:00
Thomas Rubini
6710e72cd1 Create test_api.yml 2023-01-06 08:33:51 +01:00
Thomas Rubini
c554ed13ad add dev-requirements.txt 2023-01-06 08:33:51 +01:00
Thomas Rubini
271bf37758 add requirements.txt 2023-01-06 08:33:51 +01:00
AudricV
6d960222cc [Server] Add legal pages to existing routes 2023-01-06 08:33:51 +01:00
AudricV
78766ca728 [Client] Add licenses HTML page 2023-01-06 08:33:50 +01:00
AudricV
63fdac4f39 [Client] Add privacy policy HTML page
The privacy policy by itself will have to be added by Flask using the
html_privacy_policy variable and its last updated date using the
privacy_policy_last_updated_date variable.
2023-01-06 08:33:50 +01:00
AudricV
c4b6807c8e [Client] Add legal mentions HTML page
The legal mentions themselves will have to be added by Flask using the
html_legal_mentions variable.
2023-01-06 08:33:50 +01:00
AudricV
907c9c6f15 [Client] Add legal style 2023-01-06 08:33:50 +01:00
AudricV
d6220c0600 [Client] Add Roboto Mono font
This font will be used on the legal pages and could be used as the font of some
text blocks of the game.

Version 22 of the font has been added.

Roboto Mono is made by Christian Robertson, licensed under the Apache 2.0
License.
2023-01-06 08:33:50 +01:00
AudricV
84813790a6 [Client] Use absolute path for resources in the home page and fix some issues
- Fix game name in the game title
- Remove fill property from the theme switcher button to allow changing its
color when hovering it
2023-01-06 08:33:50 +01:00
AudricV
dac91b422f [Client] Add transition on the action button
Also remove game title text effect due to different rendering between browsers.

Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-06 08:33:50 +01:00
AudricV
8ecb3a6f3a [Client] Add transitions for theme switcher button and footer links
The following are also included in this commit:
- add missing swap property for Titan One font;
- move links decoration and visited properties into a specific class, link


Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-06 08:33:50 +01:00
Thomas Rubini
536b28ff90 updated tests README 2023-01-06 08:33:50 +01:00
42f655d7fd refractor: changed test api 2023-01-06 08:33:50 +01:00
Thomas Rubini
829d092e55 create instance directory 2023-01-06 08:33:50 +01:00
54d719065b added remote connection 2023-01-03 14:39:25 +01:00
38c3ed3f64 added data presets 2023-01-03 13:41:05 +01:00
8d9886fc8d renamed file 2023-01-03 09:32:43 +01:00
ff7e6539c7 changed imports 2023-01-03 09:32:01 +01:00
c67539eb73 added all tables classes 2023-01-03 09:20:13 +01:00
302ba5d73d added the classes place, locales and questions 2022-12-07 15:02:23 +01:00
Thomas Rubini
95b987dbc0
Merge pull request #7 from ThomasRubini/server_API_TEST 2022-12-01 15:30:10 +01:00
Thomas Rubini
24343acb10
Merge pull request #4 from ThomasRubini/web_start-page 2022-12-01 13:21:16 +01:00
Thomas Rubini
fa84404852
refactor client code to be used with the server 2022-12-01 11:58:04 +01:00
31b5f3ed88 finished the sentence in the readme 2022-12-01 11:48:17 +01:00
9af05a55e1 fixed some test that shouldn't pass 2022-12-01 11:45:09 +01:00
AudricV
47b82f2b69
[Client] Accessibility improvements
- Add lang attribute with fr value on the html element;
- Fix alternative text for the theme switcher button;
- Add title attribute on footer links.
2022-12-01 11:41:33 +01:00
AudricV
274f61f651
[Client] Add common script
This script is in charge to detect whether the client is compatible with the
game (not being Internet Explorer, having support of local storage and
websockets).

It also manages the theme preference, stored in the localStorage, and displays
the corresponding theme according to this preference.
2022-12-01 11:41:33 +01:00
AudricV
3510bba36a
[Client] Add start background
This background has been created with the help of icons from icons8.com, using
the Free license.

Linking to Icons8 must be done in the pages where their icons are used, see
https://icons8.com/license.
2022-12-01 11:41:33 +01:00
AudricV
256e2a242b
[Client] Add icons for the theme switcher
These icons come from Google Fonts and are licensed under the Apache License
Version 2.0.
2022-12-01 11:41:33 +01:00
AudricV
cea9db6f26
[Client] Add CSS stylesheets for the startup page
Two CSS stylesheets have been added: one which is common to all pages and one
which is specific to the game statup.
2022-12-01 11:41:33 +01:00
AudricV
3b1b76016b
[Client] Add fonts used on the startup page
Add Spicy Rice (version 21) and Titan One (version 13) fonts.

Spicy Rice is made by Astigmatic and Titan One by Rodrigo Fuenzalida, both
licensed under the Open Font License.
2022-12-01 11:41:32 +01:00
AudricV
fed625edd8
[Client] Initial creation of the HTML welcome page
This page contains currently elements for the intial loading state: a theme
switcher, a play button and links to the privacy policy, the license(s) of
elements reused in the game and legal mentions.

It also contains error messages when JavaScript, websockets or local storage is
disabled, but they are not displayed or displayed properly yet.
2022-12-01 11:41:32 +01:00
96a5271822
Merge pull request #8 from ThomasRubini/server_ui
Basic UI pages
2022-12-01 11:40:45 +01:00