Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Fixed syntax errors #246

Merged
merged 5 commits into from
Jun 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions static/js/modules/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ var candidateColumns = [
},
{data: 'office_full', className: 'min-tablet'},
{
data: 'election_years',
data: 'cycles',
className: 'min-tablet',
render: function(data, type, row, meta) {
return yearRange(data[0], row.active_through);
return yearRange(_.first(data), _.last(data));
}
},
{data: 'party_full', className: 'min-tablet'},
Expand Down
30 changes: 0 additions & 30 deletions tests/selenium/single_candidate_page.py

This file was deleted.

23 changes: 23 additions & 0 deletions tests/selenium/single_candidate_page_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import unittest

from .base_test_class import BaseTest


class SingleCandidatePageTests(BaseTest):

def setUp(self):
self.url = self.base_url + '/candidate/H0OH08029'

def testSingleCandidatePageLoads(self):
self.driver.get(self.url)
self.assertEqual(
self.driver.find_element_by_tag_name('h1').text,
'BOEHNER, JOHN A.',
)

@unittest.skip('No principal committee links in test subset')
def testCommitteeLink(self):
self.driver.get(self.url)
self.assertTrue(self.elementExistsByXPath('//a[contains(@href, "committee/")]'))
link = self.driver.find_element_by_xpath('//a[contains(@href, "committees/")]')
self.assertEqual(link.text, 'OBAMA FOR AMERICA')
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import unittest

from .base_test_class import BaseTest


class SingleCommitteePageTests(BaseTest):

def setUp(self):
self.url = self.base_url + '/committee/C00550715'
self.url = self.base_url + '/committee/C00374058'

def testSingleCommitteePageLoads(self):
self.driver.get(self.url)
self.assertEqual(
self.driver.find_element_by_tag_name('h1').text,
'COMMITTEE TO ELECT MARK ALLIEGRO')
'A WHOLE LOT OF PEOPLE FOR GRIJALVA CONGRESSIONAL COMMITTEE',
)

@unittest.skip('No principal committee links in test subset')
def testCandidateLink(self):
self.driver.get(self.url)
self.assertEqual(
Expand Down