Commit 1f7e3b95 authored by King Arthur's avatar King Arthur

Passed all the tests.

parent 9f7d3ba6
Pipeline #913 failed with stages
......@@ -251,3 +251,113 @@ JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 2
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
1583595040438 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\user\\AppData\\Local\\Temp\\rust_mozprofileyiCmQo"
1583595045320 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583595047791 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583595047791 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583595047791 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583595047792 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
1583595088247 Marionette INFO Listening on port 57426
1583595089006 Marionette WARN TLS certificate errors will be ignored for this session
1583595094027 Marionette INFO Stopped listening on port 57426
JavaScript error: resource://gre/modules/UrlClassifierListManager.jsm, line 680: TypeError: this.tablesData[table] is undefined
JavaScript error: resource://gre/modules/osfile/osfile_async_front.jsm, line 426: Error: OS.File has been shut down. Rejecting post to stat
JavaScript error: resource:///modules/EveryWindow.jsm, line 37: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIWindowMediator.getEnumerator]
1583596352978 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\user\\AppData\\Local\\Temp\\rust_mozprofilepZp0ds"
1583596359944 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583596364142 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583596364142 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583596364143 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583596364143 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
[Parent 3992, Gecko_IOThread] WARNING: file z:/task_1581950252/build/src/ipc/chromium/src/base/process_util_win.cc, line 160
1583596399485 Marionette INFO Listening on port 58273
1583596399779 Marionette WARN TLS certificate errors will be ignored for this session
1583596404312 Marionette INFO Stopped listening on port 58273
JavaScript error: resource://gre/modules/UrlClassifierListManager.jsm, line 680: TypeError: this.tablesData[table] is undefined
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
1583596538889 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\user\\AppData\\Local\\Temp\\rust_mozprofileOvJXfo"
1583596610410 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583596613356 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583596613357 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583596613357 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583596613357 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
1583596642630 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe
###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
###!!! [Parent][RunMessage] Error: Channel error: cannot send/recv
1583596654181 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583596654181 addons.webextension.screenshotsA content process crashed and MOZ_CRASHREPORTER_SHUTDOWN is set, shutting down
console.error: "Could not write session state file " (new Error("_initWorker called too early! Please read the session file from disk first.", "resource:///modules/sessionstore/SessionFile.jsm", 375)) "_initWorker/<@resource:///modules/sessionstore/SessionFile.jsm:375:15\n_initWorker@resource:///modules/sessionstore/SessionFile.jsm:368:12\n_postToWorker@resource:///modules/sessionstore/SessionFile.jsm:410:16\nwrite@resource:///modules/sessionstore/SessionFile.jsm:448:24\nwrite@resource:1583596706784 Marionette INFO Listening on port 58473
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
1583596885297 Marionette INFO Stopped listening on port 58473
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
ionSaver.jsm:191:14\ncallback@resource://gre/modules/Timer.jsm:125:16\n"
1583596683391 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1464:17) JS Stack trace: saveChanges@XPIDatabase.jsm:1464:17
makeAddonVisible@XPIDatabase.jsm:2267:10
addToDatabase@XPIDatabase.jsm:2194:12
install@XPIInstall.jsm:4338:27
_activateAddon@XPIInstall.jsm:4365:7
1583596683392 addons.xpi-utils WARN Error: XPI database modified after shutdown began(resource://gre/modules/addons/XPIDatabase.jsm:1464:17) JS Stack trace: saveChanges@XPIDatabase.jsm:1464:17
addToDatabase@XPIDatabase.jsm:2197:10
install@XPIInstall.jsm:4338:27
_activateAddon@XPIInstall.jsm:4365:7
JavaScript error: resource://gre/modules/DeferredTask.jsm, line 215: Error: Unable to arm timer, the object has been finalized.
console.error: (new Error("Connection closed before committing the transaction.", "resource://gre/modules/Sqlite.jsm", 683))
JavaScript error: resource://gre/modules/UpdateTimerManager.jsm, line 352: TypeError: setting getter-only property "gLogEnabled"
JavaScript error: resource://gre/modules/ModulesPing.jsm, line 70: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "setting getter-only property "gLogEnabled"" {file: "resource://gre/modules/UpdateTimerManager.jsm" line: 352}]'[JavaScript Error: "setting getter-only property "gLogEnabled"" {file: "resource://gre/modules/UpdateTimerManager.jsm" line: 352}]' when calling method: [nsIUpdateTimerManager::registerTimer]
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1583596885133 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\user\\AppData\\Local\\Temp\\rust_mozprofileQaVWOk"
1583596889656 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583596892015 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583596892015 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583596892015 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583596892016 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
1583596896911 Marionette INFO Listening on port 58609
1583596897894 Marionette WARN TLS certificate errors will be ignored for this session
1583596906632 Marionette WARN TimedPromise timed out after 500 ms: stacktrace:
TimedPromise/<@chrome://marionette/content/sync.js:244:13
TimedPromise@chrome://marionette/content/sync.js:229:10
interaction.flushEventLoop@chrome://marionette/content/interaction.js:416:10
webdriverClickElement@chrome://marionette/content/interaction.js:182:31
1583596909578 Marionette INFO Stopped listening on port 58609
JavaScript error: resource://gre/modules/UrlClassifierListManager.jsm, line 680: TypeError: this.tablesData[table] is undefined
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
1583597036957 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\user\\AppData\\Local\\Temp\\rust_mozprofilefzKErM"
1583597040422 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583597042377 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583597042377 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583597042377 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583597042377 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
console.error: "Could not write session state file " (new Error("_initWorker called too early! Please read the session file from disk first.", "resource:///modules/sessionstore/SessionFile.jsm", 375)) "_initWorker/<@resource:///modules/sessionstore/SessionFile.jsm:375:15\n_initWorker@resource:///modules/sessionstore/SessionFile.jsm:368:12\n_postToWorker@resource:///modules/sessionstore/SessionFile.jsm:410:16\nwrite@resource:///modules/sessionstore/SessionFile.jsm:448:24\nwrite@resource:///modules/sessionstore/SessionFile.jsm:75:32\n_writeState@resource:///modules/sessionstore/SessionSaver.jsm:360:24\n_saveState@resource:///modules/sessionstore/SessionSaver.jsm:294:17\n_saveStateAsync@resource:///modules/sessionstore/SessionSaver.jsm:344:10\nsaveStateAsyncWhenIdle@resource:///modules/sessionstore/SessionSaver.jsm:191:14\ncallback@resource://gre/modules/Timer.jsm:125:16\n"
1583597053455 Marionette INFO Listening on port 58697
1583597053578 Marionette WARN TLS certificate errors will be ignored for this session
1583597070768 Marionette INFO Stopped listening on port 58697
JavaScript error: resource://gre/modules/UrlClassifierListManager.jsm, line 680: TypeError: this.tablesData[table] is undefined
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
......@@ -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
......@@ -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
......@@ -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
......@@ -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>
......
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
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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment