Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thegoodplace
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirby Ezekiel Santos
thegoodplace
Commits
fa75029c
Commit
fa75029c
authored
Mar 18, 2020
by
Kirby Ezekiel Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added home page html file
parent
232a121e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
27 deletions
+73
-27
urls.py
froyo/urls.py
+8
-0
views.py
froyo/views.py
+4
-0
functional_test.py
functional_test.py
+25
-25
home_page.html
templates/home_page.html
+33
-0
settings.py
thegoodplace/settings.py
+1
-1
urls.py
thegoodplace/urls.py
+2
-1
No files found.
froyo/urls.py
0 → 100644
View file @
fa75029c
from
django.contrib
import
admin
from
django.urls
import
path
from
.views
import
go_to_home_page
urlpatterns
=
[
path
(
''
,
go_to_home_page
),
]
froyo/views.py
View file @
fa75029c
from
django.shortcuts
import
render
# Create your views here.
home_page
=
"home_page.html"
def
go_to_home_page
(
request
):
return
render
(
request
,
home_page
)
functional_test.py
View file @
fa75029c
...
...
@@ -24,7 +24,7 @@ class NewVisitorTest(unittest.TestCase):
#Find the ingredients section
home_page_ingredients
=
self
.
browser
.
find_element_by_id
(
"home_page_ingredients"
)
self
.
assertEqual
(
home_page_inredients
.
get_attribute
(
"innerHTML"
),
home_page_in
g
redients
.
get_attribute
(
"innerHTML"
),
"Ingredients"
)
...
...
@@ -34,7 +34,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at ingredients list title and header
...
...
@@ -51,7 +51,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-detail"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at ingredients detail title and header
...
...
@@ -68,7 +68,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click button to ingredients update
...
...
@@ -77,7 +77,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-update"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at ingredients update title and header
...
...
@@ -94,7 +94,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click button to ingredients create
...
...
@@ -103,7 +103,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-create"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at ingredients update title and header
...
...
@@ -120,7 +120,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/ingredients-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click back button to home page
...
...
@@ -129,7 +129,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find the recipes section
...
...
@@ -145,7 +145,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at recipes list title and header
...
...
@@ -162,7 +162,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-detail"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at recipes detail title and header
...
...
@@ -179,7 +179,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click button to recipes update
...
...
@@ -188,7 +188,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-update"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at recipes update title and header
...
...
@@ -205,7 +205,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click button to recipes create
...
...
@@ -214,7 +214,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-create"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at recipes update title and header
...
...
@@ -231,7 +231,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/recipes-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click back button to home page
...
...
@@ -240,7 +240,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find the orders section
...
...
@@ -256,7 +256,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at orders list title and header
...
...
@@ -273,7 +273,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-detail"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at orders detail title and header
...
...
@@ -290,7 +290,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click button to orders update
...
...
@@ -299,7 +299,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-update"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at orders update title and header
...
...
@@ -316,7 +316,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click button to orders create
...
...
@@ -325,7 +325,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-create"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Look at orders update title and header
...
...
@@ -342,7 +342,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000/orders-list"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
#Find and click back button to home page
...
...
@@ -351,7 +351,7 @@ class NewVisitorTest(unittest.TestCase):
time
.
sleep
(
1
)
self
.
assertEqual
(
"http://localhost:8000"
,
self
.
browser
.
getCurrentUrl
()
self
.
browser
.
current_url
)
self
.
fail
(
"Finish the test"
)
...
...
templates/home_page.html
0 → 100644
View file @
fa75029c
<!DOCTYPE html>
<html>
<head>
<title>
The Good Place FroYo Shop
</title>
</head>
<body>
<div>
<h1
id=
"page_header"
>
The Good Place FroYo Shop
</h1>
</div>
<div>
<h2
id=
"home_page_ingredients"
>
Ingredients
</h2>
<form>
<button
type=
"button"
id=
"button_to_ingredients"
>
View available ingredients
</button>
</form>
</div>
<div>
<h2
id=
"home_page_recipes"
>
Recipes
</h2>
<form>
<button
type=
"button"
id=
"button_to_recipes"
>
Go to recipes
</button>
</form>
</div>
<div>
<h2
id=
"home_page_orders"
>
Orders
</h2>
<form>
<button
type=
"button"
id=
"button_to_orders"
>
Check current orders
</button>
</form>
</div>
</body>
</html>
thegoodplace/settings.py
View file @
fa75029c
...
...
@@ -55,7 +55,7 @@ ROOT_URLCONF = 'thegoodplace.urls'
TEMPLATES
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
[],
'DIRS'
:
[
"templates"
],
'APP_DIRS'
:
True
,
'OPTIONS'
:
{
'context_processors'
:
[
...
...
thegoodplace/urls.py
View file @
fa75029c
...
...
@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from
django.contrib
import
admin
from
django.urls
import
path
from
django.urls
import
path
,
include
urlpatterns
=
[
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
''
,
include
(
'froyo.urls'
)),
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment