Use PhantomJS instead of SauceLabs for CI testing

This commit is contained in:
Raphael Michel
2015-01-15 09:32:18 +01:00
parent a144d4ccfe
commit 24beedd232
4 changed files with 16 additions and 14 deletions

View File

@@ -14,8 +14,3 @@ script:
- coverage run manage.py test
after_success:
- coveralls
addons:
sauce_connect:
username: "tixl"
access_key:
secure: "a0NUwGs2jHci0hIg3jySZLkfljv6FP33fZxAyi2gKeaxcVC+a/AailSnUgDoyVWxPr0JnkLvdFcxzDBgrQ1TLsgpRDSXnc1nIGsaHjgvVGSJ1hKACYtO/9QH+dgaaHEsIsHHbvGdnjwjrX8AZtDnkcRk1T3Skj8kUCniaU39w38="

View File

@@ -4,9 +4,9 @@ pytz
django-bootstrap3
-e git+https://github.com/tixl/django-formset-js.git@master#egg=django-formset-js
-e git+https://github.com/tixl/cleanerversion.git@tixl#egg=cleanerversion
django-compressor
# Deployment / static file compilation requirements
django-compressor
BeautifulSoup4
html5lib
slimit
@@ -27,6 +27,6 @@ flake8
coveralls
coverage
selenium
PyVirtualDisplay
-e git+https://github.com/tixl/sauceclient.git@master#egg=sauceclient
travis
# PyVirtualDisplay
# -e git+https://github.com/tixl/sauceclient.git@master#egg=sauceclient
# travis

View File

@@ -7,10 +7,17 @@ from django.conf import settings
from selenium import webdriver
RUN_LOCAL = ('SAUCE_USERNAME' not in os.environ)
"""
For a long time, we used SauceLabs for CI testing, because they provide free
browser VMs for Open Source projects. However, more tests failed because of
connection timeouts to SauceLabs than for real reasons, so we're using
PhantomJS now. However, we'll keep the SauceClient code here as it might prove
useful some day.
"""
if RUN_LOCAL:
# could add Chrome, PhantomJS etc... here
BROWSERS = ['Chrome', 'Firefox']
# could add Chrome, Firefox, etc... here
BROWSERS = ['PhantomJS']
else:
from sauceclient import SauceClient
USERNAME = os.environ.get('SAUCE_USERNAME')

View File

@@ -87,7 +87,7 @@ class PropertiesTest(BrowserTest):
self.driver.get('%s/control/event/%s/%s/properties/add' % (
self.live_server_url, self.orga1.slug, self.event1.slug
))
self.driver.find_element_by_name("name").send_keys('Size')
self.driver.find_element_by_css_selector("#id_name").send_keys('Size')
self.driver.find_element_by_name("values-0-value").send_keys('S')
self.driver.find_element_by_name("values-1-value").send_keys('M')
self.driver.find_element_by_class_name("btn-save").click()
@@ -104,8 +104,8 @@ class PropertiesTest(BrowserTest):
self.driver.get('%s/control/event/%s/%s/properties/%s/' % (
self.live_server_url, self.orga1.slug, self.event1.slug, c.identity
))
self.driver.find_element_by_name("name").clear()
self.driver.find_element_by_name("name").send_keys('Color')
self.driver.find_element_by_css_selector("#id_name").clear()
self.driver.find_element_by_css_selector("#id_name").send_keys('Color')
self.driver.find_elements_by_css_selector("div.form-group button.btn-danger")[0].click()
self.driver.find_element_by_name("values-1-value").clear()
self.driver.find_element_by_name("values-1-value").send_keys('red')