forked from CodingPirates/forenings_medlemmer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'CodingPirates:master' into master
- Loading branch information
Showing
28 changed files
with
465 additions
and
444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v10.19.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@use "definitions"; | ||
@use "buttons"; | ||
|
||
|
||
#signup-form { | ||
border: 1px solid rgba(0, 0, 0, 0.125); | ||
padding: 1.25rem; | ||
background-clip: border-box; | ||
border-radius: 0.25rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% extends 'members/base.html' %} {% load crispy_forms_tags %} {% load static %} | ||
{% block content %} | ||
|
||
<h1>Tilmelding til Coding Pirates</h1> | ||
<p> | ||
Indtast barnets og forældrenes informationer, for at tilmelde en Coding | ||
Pirates-workshop, eller for at komme med på ventelisten. | ||
</p> | ||
<div id="signup-form"> | ||
{% crispy signupform %} | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,15 +27,17 @@ | |
</head> | ||
|
||
<body> | ||
{% include "members/header.html" %} | ||
{% if not skip_context %} {% include "members/header.html" %} {% endif %} | ||
<main> | ||
{% block content %}{% endblock %} | ||
</main> | ||
{% if not skip_context %} | ||
<footer> | ||
<p>Coding Pirates Denmark - Sverigesgade 20, 1., 5000 Odense C, | ||
E-mail: <a href="mailto:[email protected]">[email protected]</a> | ||
<abbr title="Telefon">Tlf</abbr>: +45 27 83 65 25, | ||
CVR: 35 55 23 16</p> | ||
</footer> | ||
{% endif %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
{% extends 'members/base.html' %} {% load crispy_forms_tags %} {% load static %} | ||
{% block content %} | ||
|
||
{% if user.is_authenticated %} | ||
<div id="user-action-container"> | ||
<div> | ||
<span><i class="fa-users fa fa-4x"></i></span> | ||
<div> | ||
<h4>Jeres familie</h4> | ||
<a href="{% url 'family_detail' %}"> | ||
Se familie <i class="fa fa-long-arrow-alt-right"></i> | ||
</a> | ||
<p>Se og ret stamdata for din familie</p> | ||
</div> | ||
</div> | ||
<div> | ||
<span><i class="fa-list-ol fa fa-4x"></i></span> | ||
<div> | ||
|
@@ -21,7 +10,7 @@ <h4>Opskriv til afdelinger</h4> | |
Afdelinger <i class="fa fa-long-arrow-alt-right"></i> | ||
</a> | ||
<p> | ||
Her kan du opskrive dig som interesseret til en af vores | ||
Her kan du opskrive dig som interesseret til en af vores | ||
afdelinger til næste gang vi starter nye hold op | ||
</p> | ||
</div> | ||
|
@@ -49,7 +38,7 @@ <h4>Bliv medlem af en lokalforening</h4> | |
<div> | ||
<span><i class="fa-users fa fa-4x"></i></span> | ||
<div> | ||
<h4>Bliv støttemedlemskab</h4> | ||
<h4>Bliv støttemedlem</h4> | ||
<a href="{% url 'support_membership' %}"> | ||
Støttemedlemskaber <i class="fa fa-long-arrow-alt-right"></i> | ||
</a> | ||
|
@@ -65,14 +54,4 @@ <h4>Bliv støttemedlemskab</h4> | |
<a href="mailto:[email protected]">[email protected]</a>. | ||
</p> | ||
|
||
{% else %} | ||
<h1>Tilmelding til Coding Pirates</h1> | ||
<p> | ||
Indtast barnets og forældrenes informationer, for at tilmelde en Coding | ||
Pirates-workshop, eller for at komme med på ventelisten. | ||
</p> | ||
<div id="signup-form"> | ||
{% crispy signupform %} | ||
</div> | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import os | ||
import socket | ||
|
||
from django.contrib.staticfiles.testing import StaticLiveServerTestCase | ||
from selenium import webdriver | ||
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | ||
|
||
from members.tests.factories import ( | ||
MemberFactory, | ||
) | ||
|
||
""" | ||
This test goes to the account login page | ||
""" | ||
|
||
|
||
class AccountLoginTest(StaticLiveServerTestCase): | ||
host = socket.gethostbyname(socket.gethostname()) | ||
serialized_rollback = True | ||
|
||
def setUp(self): | ||
self.member = MemberFactory.create() | ||
|
||
self.browser = webdriver.Remote( | ||
"http://selenium:4444/wd/hub", DesiredCapabilities.CHROME | ||
) | ||
|
||
def tearDown(self): | ||
if not os.path.exists("test-screens"): | ||
os.mkdir("test-screens") | ||
self.browser.save_screenshot("test-screens/activities_list_final.png") | ||
self.browser.quit() | ||
|
||
def test_account_login(self): | ||
self.browser.get(f"{self.live_server_url}/account/login") | ||
self.assertIn( | ||
"Log ind", | ||
[ | ||
e.text | ||
for e in self.browser.find_elements_by_xpath( | ||
"//body/descendant-or-self::*" | ||
) | ||
], | ||
) | ||
self.browser.find_element_by_link_text("Log ind") | ||
self.assertIn( | ||
"Opret bruger", | ||
[ | ||
e.text | ||
for e in self.browser.find_elements_by_xpath( | ||
"//body/descendant-or-self::*" | ||
) | ||
], | ||
) | ||
self.browser.find_element_by_link_text("Tilmeld barn") | ||
self.browser.find_element_by_link_text("Bliv frivillig") |
Oops, something went wrong.