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.
Feature/483 lav aktiviteter offentlige account login (CodingPirates#690)
* issue CodingPirates#663: Refactor: rework on activities test * Refactor: put login into test_functions * Refactor: Taking out account_create from entry_page * Restructuring front page, login page, account creation page * Redesign: Navigation buttons * Update package-lock.json * Added .nvmrc to ensure using identical node version
- Loading branch information
Showing
20 changed files
with
404 additions
and
423 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
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 |
---|---|---|
@@ -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> | ||
|
@@ -65,14 +54,4 @@ <h4>Bliv støttemedlem</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
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.