Commit 168915a2 authored by Nicolas Joyard's avatar Nicolas Joyard

Fix tests

parent 5553bbfe
<div class="col-xs-12 col-md-4 theme-card">
<div class="thumbnail">
<a class="custom-thumbnail custom-invisible" href="/themes/acta/">
<div class="row">
<div class="thumbnail">
<a class="custom-thumbnail custom-invisible" href="/themes/acta/">
<div class="row">
<div class="col-xs-12">
<h4 class="text-center">ACTA</h4>
<div class="col-xs-12">
<h4 class="text-center">ACTA</h4>
<p class="text-center lead">
 
<div class="description ellipsis"><div>Anti-Counterfeiting Trade Agreement</div></div>
<div class="info-container">
<div class="badge-container">
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Dossiers">
<i class="fa fa-book" title=""></i>
<span class="badge">3</span>
</span>
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Dossiers">
<i class="fa fa-book" title=""></i>
<span class="badge">3</span>
</span>
 
</p>
</div>
<div class="chart-container">
</div>
</div>
</a>
</div>
</div>
</a>
</div>
</div>
---
<div class="col-xs-12 col-md-4 theme-card">
<div class="thumbnail">
<a class="custom-thumbnail custom-invisible" href="/themes/etat-durgence/">
<div class="row">
<div class="col-xs-12">
<h4 class="text-center">Etat d'urgence</h4>
<div class="thumbnail">
<a class="custom-thumbnail custom-invisible" href="/themes/etat-durgence/">
<div class="row">
<p class="text-center lead">
 
<div class="col-xs-12">
<h4 class="text-center">Etat d'urgence</h4>
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Links">
<i class="fa fa-link" title=""></i>
<span class="badge">2</span>
</span>
<div class="description ellipsis"><div>La réponse sécuritaire n'est pas la solution.</div></div>
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Dossiers">
<i class="fa fa-book" title=""></i>
<span class="badge">4</span>
</span>
<div class="info-container">
<div class="badge-container">
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Links">
<i class="fa fa-link" title=""></i>
<span class="badge">2</span>
</span>
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Proposals">
<i class="fa fa-pencil" title=""></i>
<span class="badge">13</span>
</span>
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Dossiers">
<i class="fa fa-book" title=""></i>
<span class="badge">4</span>
</span>
<span class="label label-default" data-placement="bottom" data-toggle="tooltip" title="Proposals">
<i class="fa fa-pencil" title=""></i>
<span class="badge">13</span>
</span>
 
</p>
</div>
<div class="chart-container">
</div>
</div>
</a>
</div>
</div>
\ No newline at end of file
</div>
</a>
</div>
</div>
\ No newline at end of file
from .base import BaseTest
class NavigationPaneTest(BaseTest):
url = '/'
def test_queries(self):
# First query to set session variables
self.client.get(self.url)
"""
Today mep
- 1 for count reps with non null score
- 1 for random mep
- 1 for prefetch main mandate
Latest votes
- 1 for latest votes count setting
- 1 for latest votes (proposal)
- 1 for prefetching latest votes themes
- 1 for prefetching latest votes dossier themes
- 1 for prefetching latest votes dossier documents
- 1 for prefetching latest votes dossier documents chambers
Featured themes
- 1 for featured themes
"""
home_queries = 10
with self.assertNumQueries(self.left_pane_queries + home_queries):
self.client.get(self.url)
def test_rep_search_chambers(self):
self.selector_test('#form-rep #chamber-rep option')
def test_rep_search_countries(self):
self.selector_test('#form-rep #country option')
def test_rep_search_parties(self):
self.selector_test('#form-rep #party option')
def test_rep_search_committee(self):
self.selector_test('#form-rep #committee option')
def test_rep_search_delegation(self):
self.selector_test('#form-rep #delegation option')
def test_dossier_search_chambers(self):
self.selector_test('#form-dossier #chamber-dossier option')
......@@ -45,8 +45,7 @@ class HomeView(PositionFormMixin, RepresentativeViewMixin,
nb_links=Count('links', distinct=True),
nb_dossiers=Count('dossiers', distinct=True),
nb_proposals=Count('proposals', distinct=True),
nb_positions=Count('positions', distinct=True)
)
nb_positions=Count('positions', distinct=True))
# Last votes
......
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