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

Wiring editor unittests #344

Merged
merged 14 commits into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ python:
matrix:
include:
- node_js: "lts/*"
dist: trusty
language: node_js
python: ""
addons:
firefox: "45.0"
env: TEST_SUITE=js_unittests
- node_js: "lts/*"
dist: trusty
language: node_js
python: ""
addons:
firefox: latest-esr
env: TEST_SUITE=js_unittests
- addons:
firefox: "60.0.2esr"
firefox: "60.2.2esr"
env:
- TEST_SUITE=selenium
- DJANGO_VERSION=1.11
Expand Down
9 changes: 7 additions & 2 deletions src/GruntFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var styledElementsFiles = [
'wirecloud/commons/static/js/StyledElements/PaginatedSource.js',
'wirecloud/commons/static/js/StyledElements/GUIBuilder.js',
'wirecloud/commons/static/js/StyledElements/Tooltip.js',
'wirecloud/commons/static/js/StyledElements/Alert.js',
'wirecloud/commons/static/js/StyledElements/Addon.js',
'wirecloud/commons/static/js/StyledElements/Button.js',
'wirecloud/commons/static/js/StyledElements/FileButton.js',
Expand Down Expand Up @@ -87,7 +88,8 @@ var styledElementsFiles = [
'wirecloud/commons/static/js/StyledElements/DefaultInputInterfaceFactory.js',
'wirecloud/commons/static/js/StyledElements/Form.js',
'wirecloud/commons/static/js/StyledElements/PaginationInterface.js',
'wirecloud/commons/static/js/StyledElements/Popover.js'
'wirecloud/commons/static/js/StyledElements/Popover.js',
'wirecloud/commons/static/js/StyledElements/Panel.js'
];

var wc_dependencies = [
Expand Down Expand Up @@ -119,10 +121,13 @@ var WirecloudFiles = [
'wirecloud/platform/static/js/wirecloud/Widget.js',
'wirecloud/platform/static/js/wirecloud/Wiring.js',
'wirecloud/platform/static/js/wirecloud/Workspace.js',
'wirecloud/platform/static/js/wirecloud/wiring/KeywordSuggestion.js',
'wirecloud/platform/static/js/wirecloud/wiring/Operator.js',
'wirecloud/platform/static/js/wirecloud/ui/WiringEditor.js',
'wirecloud/platform/static/js/wirecloud/ui/WiringEditor/Behaviour.js',
'wirecloud/platform/static/js/wirecloud/ui/WiringEditor/BehaviourEngine.js',
'wirecloud/platform/static/js/wirecloud/ui/WiringEditor/Endpoint.js',
'wirecloud/platform/static/js/wirecloud/wiring/KeywordSuggestion.js',
'wirecloud/platform/static/js/wirecloud/ui/WiringEditor/KeywordSuggestion.js',
'wirecloud/platform/static/js/wirecloud/wiring/Endpoint.js',
'wirecloud/platform/static/js/wirecloud/wiring/EndpointTypeError.js',
'wirecloud/platform/static/js/wirecloud/wiring/EndpointValueError.js',
Expand Down
125 changes: 125 additions & 0 deletions src/ci_scripts/base_settings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,128 @@
# -*- coding: utf-8 -*-
# Django settings for {{ project_name }} project.

from os import path
from wirecloud.commons.utils.conf import load_default_wirecloud_conf
from django.core.urlresolvers import reverse_lazy

DEBUG = False
BASEDIR = path.dirname(path.abspath(__file__))
load_default_wirecloud_conf(locals())

USE_XSENDFILE = False

ADMINS = MANAGERS = ()

HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'wirecloud.commons.haystack_backends.whoosh_backend.WhooshEngine',
'PATH': path.join(BASEDIR, 'index'),
},
}

# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Chicago'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale.
USE_L10N = True

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = path.join(BASEDIR, '../static')

# Controls the absolute file path that linked static will be read from and
# compressed static will be written to when using the default COMPRESS_STORAGE.
COMPRESS_ROOT = STATIC_ROOT

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'

# Additional locations of static files
# STATICFILES_DIRS = (
# # Put strings here, like "/home/html/static" or "C:/www/django/static".
# # Always use forward slashes, even on Windows.
# # Don't forget to use absolute paths, not relative paths.
# )

# List of finder classes that know how to find static files in
# various locations.
# STATICFILES_FINDERS += (
# 'django.contrib.staticfiles.finders.FileSystemFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
# )

# Secret key for travis testing, don't use anywhere else
SECRET_KEY = '15=7f)g=)&spodi3bg8%&4fqt%f3rpg%b$-aer5*#a*(rqm79e'

ROOT_URLCONF = 'urls'

INSTALLED_APPS += (
'wirecloud.oauth2provider',
'wirecloud.fiware',
'django_nose',
'haystack',
)

# Login/logout URLs
LOGIN_URL = reverse_lazy('login')
LOGOUT_URL = reverse_lazy('wirecloud.root')
LOGIN_REDIRECT_URL = reverse_lazy('wirecloud.root')

THEME_ACTIVE = "wirecloud.defaulttheme"
DEFAULT_LANGUAGE = 'browser'

# WGT deployment dirs
CATALOGUE_MEDIA_ROOT = path.join(BASEDIR, 'catalogue_resources')
GADGETS_DEPLOYMENT_DIR = path.join(BASEDIR, 'widget_files')

# Cache settings
CACHES = {
'default': {
'BACKEND': 'wirecloud.platform.cache.backends.locmem.LocMemCache',
'OPTIONS': {
'MAX_ENTRIES': 3000,
},
}
}

# WireCloud autodiscover Wirecloud plugins by default. Uncomment this for settings
# the list of plugins manually.
#
# WIRECLOUD_PLUGINS = (
# 'wirecloud.oauth2provider.plugins.OAuth2ProviderPlugin',
# 'wirecloud.fiware.plugins.FiWarePlugin',
# )

NOT_PROXY_FOR = ['localhost', '127.0.0.1']

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

# By default, no selenium test is passed
Expand Down
2 changes: 1 addition & 1 deletion src/ci_scripts/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pip install ${TRAVIS_BUILD_DIR}/src/dist/wirecloud*.whl
pip install django-nose mock radon

# Configure WireCloud
cat ${TRAVIS_BUILD_DIR}/src/ci_scripts/base_settings.py >> settings.py
cat ${TRAVIS_BUILD_DIR}/src/ci_scripts/base_settings.py > settings.py
for conf in $FLAGS
do
file="${TRAVIS_BUILD_DIR}/src/ci_scripts/conf_scripts/${conf}-prepare.sh"
Expand Down
Loading