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

Saucelabs #313

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
67a50d4
Added initial support for Sauce Labs.
xiru Oct 9, 2013
2353067
=Fixed instead of
xiru Oct 9, 2013
5113613
=Fixed resources.
xiru Oct 9, 2013
84e2c8c
=Adjusting travis matrix.
xiru Oct 9, 2013
1aa79e4
Added notifications to sprint channel.
xiru Oct 9, 2013
2f02aa9
=One more try to fix travis and tests.
xiru Oct 10, 2013
e01813c
=Updated notifications from master branch.
xiru Oct 10, 2013
5758b11
=Moved bash loop to before_script. Added uncompressed Sauce files to …
xiru Oct 10, 2013
0964d20
Adjusted test setup and test teardown of robot files.
xiru Oct 10, 2013
e91c33b
=Updated .travis.yml following tips from asko and datakurre/example.p…
xiru Oct 10, 2013
7390245
Merge changes from master.
xiru Oct 10, 2013
f321dc8
Turn back modifications on .gitignore. They are not needed.
xiru Oct 10, 2013
e43ad71
Merge branch 'master' into saucelabs
xiru Oct 10, 2013
69b496d
Merge branch 'master' into saucelabs
xiru Oct 10, 2013
a5efc21
Merge branch 'master' into saucelabs
hvelarde Oct 14, 2013
9658bb5
Merge branch 'master' into saucelabs
hvelarde Oct 14, 2013
ace217e
Do not bug the sprinters anymore
hvelarde Oct 14, 2013
50c96c6
Merge branch 'master' into saucelabs
hvelarde Oct 14, 2013
92a9d01
Merge branch 'master' into saucelabs
hvelarde Oct 14, 2013
8f2f3a4
Merge branch 'master' into saucelabs
hvelarde Oct 15, 2013
ead7dcb
Merge branch 'master' into saucelabs
hvelarde Oct 27, 2013
7610f90
Merge branch 'master' into saucelabs
hvelarde Nov 8, 2013
f61b744
Merge branch 'master' into saucelabs
hvelarde Nov 8, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
language: python
python: 2.7
addons:
sauce_connect:
- username: $SAUCE_USERNAME
- access_key: $SAUCE_ACCESS_KEY
env:
global:
- ARTIFACTS_AWS_REGION=sa-east-1
- ARTIFACTS_S3_BUCKET=collective-cover
- secure: "Ll2tTrfw0vpGlk+tfdcOD8HOylIWlyFDtNL+ShfQtAZ9wHZEOFJJyVsaSpDbdgWD1Y+muSz8I9xcvNY7ag17jm8udSEWecGaMIodeHB5hIklEi/OovKoAUgPqaVtbNE/FtyURZf7KE+Nb7zCege6XjCD635U4W2P1/072aEY3CU="
- secure: "bPiRnG3qFbWjD1zgVcTJAcOy8uuUwLKDIaVe15L6M5xLz49SfHFe6Zwc8jQ0g4J9xIDRqX4gcLnJffr0xJmBytXZGohFCjQRPUFruoy/stWWOrdgYT+9Jm9/TbVwoh+Cudo5iTNdIsaVnzcA6IyuTae/i9CJ9QQ7MBKyrjRV+T4="
- secure: "KDlrJnR1JklDhv/TaPGd9jNo179KTQWmT+fCy9WsxCuFxphmEhvruOnYqQ2blcarXQ9fYq+2kKD5Tgv80kD/tIZEeb0xbB7kEmSwFKfG7t7W9vXNCzfBzj3+yth0NNxJDaOvOCNU4fGM8SXFKeo3Y+mVCGBv0rFIq0CnhAfU0EY="
- secure: "OYIoYlN76+q4AwOK31SNGR/8u0MDqTc0JI51/Fr+INKjw5h0CI7n18lOwTYDBTPoWMZmUxydAEC5XRJIonsMfii8Mn//avxoQcgahq0nqSESeEh3Tl++OHVkDuXGgaa3nAJcsS3GaAh2Y+bXxda5GdN+E914k60zl+ceD6k/e6Y="
- ROBOT_BUILD_NUMBER=travis-$TRAVIS_BUILD_NUMBER
- ROBOT_REMOTE_URL=http://$SAUCE_USERNAME:[email protected]:80/wd/hub
- ROBOT_DESIRED_CAPABILITIES=tunnel-identifier:$TRAVIS_JOB_NUMBER
matrix:
- PLONE_VERSION=4.2
- PLONE_VERSION=4.3 QA=true
Expand All @@ -29,7 +38,8 @@ after_failure:
- travis-artifacts upload --path parts/test
notifications:
irc:
channels: irc.freenode.org#simplesconsultoria
channels:
- irc.freenode.org#simplesconsultoria
template:
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
- "Change view : %{compare_url}"
Expand Down
32 changes: 16 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup

version = '1.0a6.dev0'
description = "A sane, working, editor-friendly way of creating front pages and other composite pages. Working now, for mere mortals."
description = 'A sane, working, editor-friendly way of creating front pages and other composite pages. Working now, for mere mortals.'
long_description = (
open('README.rst').read() + '\n' +
open('CONTRIBUTORS.rst').read() + '\n' +
Expand All @@ -16,21 +16,21 @@
description=description,
long_description=long_description,
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: 4.2",
"Framework :: Plone :: 4.3",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Topic :: Office/Business :: News/Diary",
"Topic :: Software Development :: Libraries :: Python Modules",
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Plone',
'Framework :: Plone :: 4.2',
'Framework :: Plone :: 4.3',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Operating System :: OS Independent',
'Programming Language :: JavaScript',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business :: News/Diary',
'Topic :: Software Development :: Libraries :: Python Modules',
],
keywords='plone cover javascript dexterity',
author='Carlos de la Guardia et al.',
Expand Down
1 change: 1 addition & 0 deletions src/collective/cover/tests/cover.robot
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** Settings ***

Resource plone/app/robotframework/keywords.robot
Resource plone/app/robotframework/saucelabs.robot
Variables plone/app/testing/interfaces.py

*** Variables ***
Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_banner_tile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_basic_tile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
10 changes: 5 additions & 5 deletions src/collective/cover/tests/test_carousel_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ def test_crud(self):
tile = getMultiAdapter((self.cover, self.request), name=self.name)
tile = tile['test']
self.assertEqual(len(tile.results()), 2)
self.assertTrue(obj1 in tile.results())
self.assertTrue(obj2 in tile.results())
self.assertIn(obj1, tile.results())
self.assertIn(obj2, tile.results())

# next, we replace the list of objects with a different one
obj3 = self.portal['my-news-item']
tile.replace_with_objects([IUUID(obj3, None)])
# tile's data attributed is cached so we should re-instantiate the tile
tile = getMultiAdapter((self.cover, self.request), name=self.name)
tile = tile['test']
self.assertTrue(obj1 not in tile.results())
self.assertTrue(obj2 not in tile.results())
self.assertTrue(obj3 in tile.results())
self.assertNotIn(obj1, tile.results())
self.assertNotIn(obj2, tile.results())
self.assertIn(obj3, tile.results())

# finally, we remove it from the list; the tile must be empty again
tile.remove_item(obj3.UID())
Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_carousel_tile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_collection_tile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_contentchooser.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
20 changes: 10 additions & 10 deletions src/collective/cover/tests/test_controlpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ def test_controlpanel_has_view(self):
def test_controlpanel_view_is_protected(self):
from AccessControl import Unauthorized
logout()
self.assertRaises(
Unauthorized, self.portal.restrictedTraverse, '@@cover-settings')
with self.assertRaises(Unauthorized):
self.portal.restrictedTraverse('@@cover-settings')

def test_controlpanel_installed(self):
actions = [a.getAction(self)['id']
for a in self.controlpanel.listActions()]
self.assertIn('cover', actions, 'control panel not installed')
self.assertIn('cover', actions)

def test_controlpanel_removed_on_uninstall(self):
qi = self.portal['portal_quickinstaller']
qi.uninstallProducts(products=[PROJECTNAME])
actions = [a.getAction(self)['id']
for a in self.controlpanel.listActions()]
self.assertNotIn('cover', actions, 'control panel not removed')
self.assertNotIn('cover', actions)


class RegistryTestCase(unittest.TestCase):
Expand All @@ -60,7 +60,7 @@ def setUp(self):

def test_sections_record_in_registry(self):
self.assertTrue(hasattr(self.settings, 'layouts'))
self.assertNotEqual(self.settings.layouts, None)
self.assertIsNotNone(self.settings.layouts)

def test_available_tiles_record_in_registry(self):
self.assertTrue(hasattr(self.settings, 'available_tiles'))
Expand All @@ -87,12 +87,12 @@ def test_records_removed_on_uninstall(self):
setRoles(self.portal, TEST_USER_ID, ['Manager'])
qi.uninstallProducts(products=[PROJECTNAME])

BASE_REGISTRY = 'collective.cover.controlpanel.ICoverSettings.{0}'
BASE_REGISTRY = 'collective.cover.controlpanel.ICoverSettings.'
records = [
BASE_REGISTRY.format('layouts'),
BASE_REGISTRY.format('available_tiles'),
BASE_REGISTRY.format('searchable_content_types'),
BASE_REGISTRY.format('styles'),
BASE_REGISTRY + 'layouts',
BASE_REGISTRY + 'available_tiles',
BASE_REGISTRY + 'searchable_content_types',
BASE_REGISTRY + 'styles',
]

for r in records:
Expand Down
16 changes: 8 additions & 8 deletions src/collective/cover/tests/test_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ def test_adding(self):
self.assertTrue(ICover.providedBy(self.c1))

def test_fti(self):
fti = queryUtility(IDexterityFTI,
name='collective.cover.content')
self.assertNotEqual(None, fti)
fti = queryUtility(
IDexterityFTI, name='collective.cover.content')
self.assertIsNotNone(fti)

def test_schema(self):
fti = queryUtility(IDexterityFTI,
name='collective.cover.content')
fti = queryUtility(
IDexterityFTI, name='collective.cover.content')
schema = fti.lookupSchema()
self.assertEqual(ICover, schema)

def test_factory(self):
fti = queryUtility(IDexterityFTI,
name='collective.cover.content')
fti = queryUtility(
IDexterityFTI, name='collective.cover.content')
factory = fti.factory
new_object = createObject(factory)
self.assertTrue(ICover.providedBy(new_object))
Expand All @@ -67,7 +67,7 @@ def test_staging_behavior(self):

def test_cover_selectable_as_folder_default_view(self):
self.folder.setDefaultPage('c1')
self.assertEqual(self.folder.default_page, 'c1')
self.assertEqual(self.folder.getDefaultPage(), 'c1')

def test_export_permission(self):
# layout export is visible for user with administrative rights
Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_cover.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Test Setup Open Test Browser
Test Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Test cases ***

Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_css_class.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_embed_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ def test_accepted_content_types(self):
self.assertEqual(self.tile.accepted_ct(), [])

def test_render_empty(self):
msg = 'Please edit the tile to add the code to be embedded.'
self.assertTrue(msg in self.tile())
msg = u'Please edit the tile to add the code to be embedded.'
self.assertIn(msg, self.tile())
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_embed_tile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
21 changes: 9 additions & 12 deletions src/collective/cover/tests/test_file_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,24 @@ def test_render(self):
obj = self.portal['my-file']
self.tile.populate_with_object(obj)
rendered = self.tile()
self.assertTrue('Download file' in rendered)
self.assertTrue('My file' in rendered)
self.assertTrue(
'This file was created for testing purposes' in rendered)
self.assertIn('Download file', rendered)
self.assertIn('My file', rendered)
self.assertIn('This file was created for testing purposes', rendered)

def test_render_kB_file(self):
obj = self.portal['my-file']
obj.setFile('0' * 1024)
self.tile.populate_with_object(obj)
rendered = self.tile()
self.assertTrue('1 kB (1024 bytes)' in rendered)
self.assertTrue('My file' in rendered)
self.assertTrue(
'This file was created for testing purposes' in rendered)
self.assertIn('1 kB (1024 bytes)', rendered)
self.assertIn('My file', rendered)
self.assertIn('This file was created for testing purposes', rendered)

def test_render_MB_file(self):
obj = self.portal['my-file']
obj.setFile('0' * 1048576)
self.tile.populate_with_object(obj)
rendered = self.tile()
self.assertTrue('1 MB (1048576 bytes)' in rendered)
self.assertTrue('My file' in rendered)
self.assertTrue(
'This file was created for testing purposes' in rendered)
self.assertIn('1 MB (1048576 bytes)', rendered)
self.assertIn('My file', rendered)
self.assertIn('This file was created for testing purposes', rendered)
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_file_tile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
4 changes: 2 additions & 2 deletions src/collective/cover/tests/test_layout.robot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Resource cover.robot
Library Remote ${PLONE_URL}/RobotRemote

Suite Setup Open Test Browser
Suite Teardown Close all browsers
Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers

*** Variables ***

Expand Down
Loading