Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS-Lab-1
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
King Arthur Santos
CS-Lab-1
Commits
1f7e3b95
Commit
1f7e3b95
authored
Mar 07, 2020
by
King Arthur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Passed all the tests.
parent
9f7d3ba6
Pipeline
#913
failed with stages
Changes
10
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
134 additions
and
7 deletions
+134
-7
geckodriver.log
geckodriver.log
+110
-0
urls.cpython-37.pyc
heroes/__pycache__/urls.cpython-37.pyc
+0
-0
detail_cloud.html
heroes/templates/detail_cloud.html
+2
-1
detail_jester.html
heroes/templates/detail_jester.html
+2
-1
detail_sunflowey.html
heroes/templates/detail_sunflowey.html
+2
-1
home.html
heroes/templates/home.html
+3
-0
urls.py
heroes/urls.py
+4
-1
lab1_functional_test.py
lab1_functional_test.py
+7
-3
settings.cpython-37.pyc
willowisp/__pycache__/settings.cpython-37.pyc
+0
-0
settings.py
willowisp/settings.py
+4
-0
No files found.
geckodriver.log
View file @
1f7e3b95
This diff is collapsed.
Click to expand it.
heroes/__pycache__/urls.cpython-37.pyc
View file @
1f7e3b95
No preview for this file type
heroes/templates/detail_cloud.html
View file @
1f7e3b95
...
...
@@ -4,13 +4,14 @@
<title>
Detail - Cloud
</title>
</head>
<body>
<img
src=
"
.
/cloud.png"
style=
"width: 10vw;"
/>
<img
src=
"
/static
/cloud.png"
style=
"width: 10vw;"
/>
<h1>
Detail - Cloud
</h1>
<dl>
<dt>
Health Points
</dt><dd>
600
</dd>
<dt>
Base Attack Damage
</dt><dd>
57
</dd>
<dt>
Skills
</dt><dd>
Nimbus, Rain Cloud, Thunderbolt
</dd>
<dt>
Lore
</dt><dd>
I am a cloud. When I pee you call it 'rain'.
</dd>
<dt><a
href=
"http://localhost:8000/heroes"
class=
"previous-page"
>
Back to Heroes
</a></dt>
</dl>
</body>
</html>
\ No newline at end of file
heroes/templates/detail_jester.html
View file @
1f7e3b95
...
...
@@ -4,13 +4,14 @@
<title>
Detail - Jester
</title>
</head>
<body>
<img
src=
"
.
/jester.png"
style=
"width: 10vw;"
/>
<img
src=
"
/static
/jester.png"
style=
"width: 10vw;"
/>
<h1>
Detail - Jester
</h1>
<dl>
<dt>
Health Points
</dt><dd>
660
</dd>
<dt>
Base Attack Damage
</dt><dd>
64
</dd>
<dt>
Skills
</dt><dd>
Laugh, Dance, Smile
</dd>
<dt>
Lore
</dt><dd>
I do it for the LOLs.
</dd>
<dt><a
href=
"http://localhost:8000/heroes"
class=
"previous-page"
>
Back to Heroes
</a></dt>
</dl>
</body>
</html>
\ No newline at end of file
heroes/templates/detail_sunflowey.html
View file @
1f7e3b95
...
...
@@ -4,13 +4,14 @@
<title>
Detail - Sunflowey
</title>
</head>
<body>
<img
src=
"
.
/sunflowey.png"
style=
"width: 10vw;"
/>
<img
src=
"
/static
/sunflowey.png"
style=
"width: 10vw;"
/>
<h1>
Detail - Sunflowey
</h1>
<dl>
<dt>
Health Points
</dt><dd>
650
</dd>
<dt>
Base Attack Damage
</dt><dd>
43
</dd>
<dt>
Skills
</dt><dd>
Power Pellet, Sunshine, Pollen Punch
</dd>
<dt>
Lore
</dt><dd>
I am Sunflowey. Sometimes a sun, sometimes a flower.
</dd>
<dt><a
href=
"http://localhost:8000/heroes"
class=
"previous-page"
>
Back to Heroes
</a></dt>
</dl>
</body>
</html>
\ No newline at end of file
heroes/templates/home.html
View file @
1f7e3b95
...
...
@@ -10,6 +10,7 @@
<li
class=
"char-name"
>
Name: Cloud
</li>
<li
class=
"char-hp"
>
Health Points: 600
</li>
<li
class=
"char-damage"
>
Base Attack Damage: 57
</li>
<li><a
href=
"http://localhost:8000/hero/cloud"
class=
"next-page"
>
More info
</a></li>
</ul>
</li>
<li
id=
"char-sunflowey"
><br>
...
...
@@ -17,6 +18,7 @@
<li
class=
"char-name"
>
Name: Sunflowey
</li>
<li
class=
"char-hp"
>
Health Points: 650
</li>
<li
class=
"char-damage"
>
Base Attack Damage: 43
</li>
<li><a
href=
"http://localhost:8000/hero/sunflowey"
class=
"next-page"
>
More info
</a></li>
</ul>
</li>
<li
id=
"char-jester"
><br>
...
...
@@ -24,6 +26,7 @@
<li
class=
"char-name"
>
Name: Jester
</li>
<li
class=
"char-hp"
>
Health Points: 660
</li>
<li
class=
"char-damage"
>
Base Attack Damage: 64
</li>
<li><a
href=
"http://localhost:8000/hero/jester"
class=
"next-page"
>
More info
</a></li>
</ul>
</li>
</ul>
...
...
heroes/urls.py
View file @
1f7e3b95
from
django.conf.urls
import
url
from
django.contrib.staticfiles.urls
import
staticfiles_urlpatterns
from
.views
import
HomePageView
from
.views
import
DetailCloudView
...
...
@@ -11,3 +12,5 @@ urlpatterns = [
url
(
r"^hero/sunflowey$"
,
DetailSunfloweyView
.
as_view
(),
name
=
"detail_sunflowey"
),
url
(
r"^hero/jester$"
,
DetailJesterView
.
as_view
(),
name
=
"detail_jester"
),
]
urlpatterns
+=
staticfiles_urlpatterns
()
\ No newline at end of file
lab1_functional_test.py
View file @
1f7e3b95
from
selenium
import
webdriver
import
unittest
import
time
class
NewVisitorTest
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
@@ -19,7 +20,6 @@ class NewVisitorTest(unittest.TestCase):
# She sees a list containing three heroes with their corresponding
# names, health points, and damage
char_list
=
self
.
browser
.
find_element_by_id
(
"char-list"
)
chars
=
[{
"name"
:
"Cloud"
,
"hp"
:
"600"
,
...
...
@@ -37,6 +37,8 @@ class NewVisitorTest(unittest.TestCase):
}]
for
char
in
chars
:
char_list
=
self
.
browser
.
find_element_by_id
(
"char-list"
)
char_element
=
char_list
.
find_element_by_id
(
"char-"
+
char
[
"name"
]
.
lower
())
for
field
in
char
:
...
...
@@ -51,6 +53,8 @@ class NewVisitorTest(unittest.TestCase):
next_page_button
=
char_element
.
find_element_by_class_name
(
"next-page"
)
next_page_button
.
click
()
time
.
sleep
(
1
)
page_source
=
self
.
browser
.
page_source
self
.
assertIn
(
"Skills"
,
page_source
)
...
...
@@ -79,9 +83,9 @@ class NewVisitorTest(unittest.TestCase):
previous_page_button
.
click
()
self
.
assertIn
(
'The Will of the Wisps Wiki'
,
self
.
browser
.
title
)
time
.
sleep
(
1
)
self
.
fail
(
'Finish the test!'
)
self
.
assertIn
(
'The Will of the Wisps Wiki'
,
self
.
browser
.
title
)
if
__name__
==
'__main__'
:
unittest
.
main
(
warnings
=
'ignore'
)
\ No newline at end of file
willowisp/__pycache__/settings.cpython-37.pyc
View file @
1f7e3b95
No preview for this file type
willowisp/settings.py
View file @
1f7e3b95
...
...
@@ -119,3 +119,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
[
os
.
path
.
join
(
BASE_DIR
,
"heroes/templates"
)
]
\ No newline at end of file
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