Commit 9b18ec0a by Xavier Antoviaque

Setup tests, based on the selenium tests from the workbench

parent f7d798e0
Custom workbench settings
-------------------------
In the main XBlock repository, create the following configuration file in `workbench/settings_mentoring.py`:
```
from settings import *
INSTALLED_APPS += ('mentoring',)
DATABASES['default']['NAME'] = 'workbench.sqlite'
```
Running tests
-------------
Run with the following command:
```
$ DJANGO_SETTINGS_MODULE="workbench.settings_mentoring" PYTHONPATH=".:/path/to/xblock" nosetests --with-django
```
`/path/to/xblock` is the path to the XBlock main repository (the one containing the workbench)
-e . -e .
unicodecsv==0.9.4 unicodecsv==0.9.4
-e git://github.com/nosedjango/nosedjango.git@ed7d7f9aa969252ff799ec159f828eaa8c1cbc5a#egg=nosedjango-dev
"""Tests for the mentoring module"""
# Imports ###########################################################
from workbench.test.selenium_test import SeleniumTest
# Classes ###########################################################
class MentoringBlockTest(SeleniumTest):
def setUp(self):
super(MentoringBlockTest, self).setUp()
# Suzy opens the browser to visit the workbench
self.browser.get(self.live_server_url)
# She knows it's the site by the header
header1 = self.browser.find_element_by_css_selector('h1')
self.assertEqual(header1.text, 'XBlock scenarios')
def test_TODO_NAME(self):
link = self.browser.find_element_by_link_text('001) Pre-goal brainstom')
link.click()
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