Private
Public Access
1
0

removing tests for ranking

This commit is contained in:
Sander Roosendaal
2021-12-27 20:06:46 +01:00
parent fdb706ca58
commit 99cce5dc0c
4 changed files with 0 additions and 60 deletions

View File

@@ -12,32 +12,6 @@
type='text/javascript'
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
</script>
<script>
$(function() {
$("td.rankingtoggle").click( function() {
var workout_id = $(this).attr('workoutid');
console.log(workout_id);
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/workout/'+workout_id+'/toggle-ranking/', function(json) {
console.log(JSON.stringify(json));
rankingpiece = json.result;
tdid = "#star"+workout_id;
console.log(rankingpiece);
console.log($(tdid).length);
if (rankingpiece) {
$(tdid).addClass('yellow');
$(tdid).removeClass('notyellow');
$(tdid).html('&star;');
console.log('adding yellow '+tdid);
} else {
$(tdid).removeClass('yellow');
$(tdid).addClass('notyellow');
$(tdid).html('&star;');
console.log('remove yellow '+tdid);
};
});
});
});
</script>
{% endblock %}
@@ -100,16 +74,6 @@
</form>
</p>
<p>
{% if rankingonly and not team %}
<a href="/rowers/list-workouts/">
<i class="far fa-star"></i>Show All Workouts
</a>
{% elif not team %}
<a href="/rowers/list-workouts/ranking/">
<i class="fas fa-star"></i>Show Only Ranking Pieces
</a>
{% endif %}
</p>
<p>
<span>
{% if workouts.has_previous %}

View File

@@ -298,7 +298,6 @@ class WorkoutCompareTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'workouts':[1,2,3]
}
@@ -396,7 +395,6 @@ class WorkoutBoxPlotTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'workouts':[1,2,3]
}
@@ -494,7 +492,6 @@ class WorkoutHistoTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'workouts':[1,2,3]
}
@@ -779,7 +776,6 @@ class WorkoutFlexallTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'workouts':[1,2,3]
}
@@ -884,7 +880,6 @@ class WorkoutStatsTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'ids':[1,2,3],
'userid':self.u.id,
}
@@ -947,7 +942,6 @@ class WorkoutStatsTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'ids':[1,2,3],
'userid':self.u.id,
'function':'boxplot'
@@ -1019,7 +1013,6 @@ class WorkoutStatsTestNew(TestCase):
'includereststrokes':False,
'modality':'all',
'waterboattype':['1x','2x','4x'],
'rankingonly':False,
'workouts':[1,2,3]
}

View File

@@ -93,7 +93,6 @@ class URLTests(TestCase):
'/rowers/list-graphs/',
'/rowers/list-jobs/',
'/rowers/list-workouts/',
'/rowers/list-workouts/ranking/',
'/rowers/list-workouts/user/1/',
'/rowers/me/calcdps/',
'/rowers/me/edit/',
@@ -157,7 +156,6 @@ class URLTests(TestCase):
'/rowers/workout/'+encoded1+'/split/',
'/rowers/workout/'+encoded1+'/stats/',
'/rowers/workout/'+encoded1+'/stream/',
'/rowers/workout/'+encoded1+'/toggle-ranking/',
'/rowers/workout/'+encoded1+'/undosmoothenpace/',
'/rowers/workout/'+encoded1+'/unsubscribe/',
'/rowers/workout/'+encoded1+'/view/',

View File

@@ -26,7 +26,6 @@ defaultoptions = {
'includereststrokes': False,
'workouttypes':['rower','dynamic','slides'],
'waterboattype': mytypes.waterboattype,
'rankingonly': False,
'function':'boxplot'
}
@@ -78,11 +77,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
worldclass = False
try:
rankingonly = options['rankingonly']
except KeyError: # pragma: no cover
rankingonly = False
try:
includereststrokes = options['includereststrokes']
except KeyError: # pragma: no cover
@@ -129,12 +123,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
if modality != 'water':
waterboattype = [b[0] for b in mytypes.boattypes]
if 'rankingonly' in optionsform.cleaned_data:
rankingonly = optionsform.cleaned_data['rankingonly']
else: # pragma: no cover
rankingonly = False
options['modalities'] = modalities
options['waterboattype'] = waterboattype
try:
@@ -224,8 +212,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
).exclude(boattype__in=negtypes)
if rankingonly: # pragma: no cover
workouts = workouts.exclude(rankingpiece=False)
query = request.POST.get('q')
if query: # pragma: no cover
@@ -257,7 +243,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
optionsform = AnalysisOptionsForm(initial={
'modality':modality,
'waterboattype':waterboattype,
'rankingonly':rankingonly,
})