Commit 9f7d3ba6 authored by King Arthur's avatar King Arthur

Finished writing the rest of the functional tests.

parent 8a27ddd6
......@@ -235,3 +235,19 @@ JavaScript error: resource://services-settings/RemoteSettingsClient.jsm, line 14
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
1583593992791 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\user\\AppData\\Local\\Temp\\rust_mozprofileRxtztj"
1583593996161 addons.webextension.doh-rollout@mozilla.org WARN Loading extension 'doh-rollout@mozilla.org': Reading manifest: Invalid extension permission: networkStatus
1583593999866 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1583593999866 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1583593999867 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1583593999867 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"
1583594007406 Marionette INFO Listening on port 57076
1583594007740 Marionette WARN TLS certificate errors will be ignored for this session
1583594012943 Marionette INFO Stopped listening on port 57076
JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 27: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIPrefBranch.removeObserver]
[Parent 748, Gecko_IOThread] WARNING: file z:/task_1581950252/build/src/ipc/chromium/src/base/process_util_win.cc, line 160
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
......@@ -48,11 +48,39 @@ class NewVisitorTest(unittest.TestCase):
# When she selects one of the heroes, she is sent to another page
# containing more information about the hero (additional stats, lore, image).
next_page_button = char_element.find_element_by_class_name("next-page")
next_page_button.click()
page_source = self.browser.page_source
self.assertIn("Skills", page_source)
self.assertIn("Lore", page_source)
char_image = self.browser.find_element_by_tag_name("img")
image_source = char_image.get_attribute("src")
self.assertIn(char["name"].lower(), image_source)
# She spots the page title and header mentions the name of the hero she selected.
header_element = self.browser.find_element_by_tag_name("h1")
header_content = header_element.get_attribute("innerHTML")
self.assertIn(char["name"], self.browser.title)
self.assertIn(char["name"], header_content)
# While she is in a specific hero's page, she sees a button labeled "Back to Heroes List".
# She clicks this and she is redirected back to the wiki's homepage.
previous_page_button = self.browser.find_element_by_class_name("previous-page")
previous_page_button_text = previous_page_button.get_attribute("innerHTML")
self.assertIn("Back to Heroes", previous_page_button_text)
previous_page_button.click()
self.assertIn('The Will of the Wisps Wiki', self.browser.title)
self.fail('Finish the test!')
if __name__ == '__main__':
......
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