Skip to content

Commit

Permalink
Improve upload handling of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverroick committed Jul 13, 2016
1 parent 2d8f2df commit ff6b714
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cadasta/templates/organization/project_add_wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h3>{% block step_title %}{% endblock %}</h3>

</div>
<div class="panel-footer panel-buttons">
<input class="btn btn-primary" type="submit" value="{% trans 'Save and continue' %}"/>
<button class="btn btn-primary" type="submit">{% trans 'Save and continue' %}</button>
<a class="btn btn-default" href="{% url 'project:list' %}">{% trans "Cancel" %}</a>
</div>
{% block step_content_3 %}{% endblock %}
Expand Down
15 changes: 3 additions & 12 deletions functional_tests/pages/ProjectAdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,7 @@ def check_details(self, details):
assert self.get_proj_url() == details['url']

def click_submit_details(self):
submit_button = self.BY_XPATH(
"//input[contains(@class, 'btn-primary')" +
" and @value='Save and continue']"
)
submit_button = self.BY_XPATH("//button[@type='submit']")
submit_button.click()

def try_submit_details(self):
Expand All @@ -272,10 +269,7 @@ def try_submit_details(self):
assert self.is_on_subpage('details')
assert re.fullmatch('\s*', self.get_name()) is not None

submit_button = self.BY_XPATH(
"//input[contains(@class, 'btn-primary')" +
" and @value='Save and continue']"
)
submit_button = self.BY_XPATH("//button[@type='submit']")
error_wait = (By.CLASS_NAME, 'errorlist')
self.test.click_through(submit_button, error_wait)
assert self.is_on_subpage('details')
Expand All @@ -289,10 +283,7 @@ def try_submit_details(self):

def submit_details(self):
assert self.is_on_subpage('details')
submit_button = self.BY_XPATH(
"//input[contains(@class, 'btn-primary')" +
" and @value='Save and continue']"
)
submit_button = self.BY_XPATH("//button[@type='submit']")
next_header = "Assign permissions to members"
xpath = "//h3[text()='{}']".format(next_header)
set_perms_wait = (By.XPATH, xpath)
Expand Down
2 changes: 1 addition & 1 deletion requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ django-audit-log==0.7.0
django-simple-history==1.8.1
simplejson==3.8.1
django-widget-tweaks==1.4.1
django-buckets==0.1.12
django-buckets==0.1.13
pyxform-cadasta==0.9.22
python-magic==0.4.11
Pillow==3.2.0
Expand Down

0 comments on commit ff6b714

Please sign in to comment.