Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need unit tests covering the different states for the advanced export box #320

Closed
simonw opened this issue Jun 20, 2018 · 1 comment
Closed

Comments

@simonw
Copy link
Owner

simonw commented Jun 20, 2018

There are quite a few variants of this box:

2018-06-20 at 10 02 am

Test coverage should exercise all of them, since the logic is a little unclear.

{% if display_rows %}
<div id="export" class="advanced-export">
<h3>Advanced export</h3>
<p>JSON shape: <a href="{{ url_json }}">default</a>, <a href="{{ append_querystring(url_json, '_shape=array') }}">array</a>{% if primary_keys %}, <a href="{{ append_querystring(url_json, '_shape=object') }}">object</a>{% endif %}</p>
<form action="{{ url_csv_path }}" method="get">
<p>
CSV options:
<label><input type="checkbox" name="_dl"> download file</label>
{% if expandable_columns %}<label><input type="checkbox" name="_labels" checked> expand labels</label>{% endif %}
{% if next_url and config.allow_csv_stream %}<label><input type="checkbox" name="_stream"> stream all rows</label>{% endif %}
<input type="submit" value="Export CSV">
{% for key, value in url_csv_args.items() %}
{% if key != "_labels" %}
<input type="hidden" name="{{ key }}" value="{{ value }}">
{% endif %}
{% endfor %}
</p>
</form>
</div>
{% endif %}

@simonw simonw modified the milestone: 0.23.1 Jun 20, 2018
@simonw simonw added this to the Next release milestone Jul 10, 2018
@simonw
Copy link
Owner Author

simonw commented Jul 24, 2018

@simonw simonw closed this as completed in 3955771 Jul 24, 2018
@simonw simonw removed this from the Next release milestone Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant