Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/4.0-dev' into input
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Mar 27, 2017
2 parents 4522b2f + c2e0d6a commit 08284eb
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'http://rubygems.org'

gem 'scss_lint', '~> 0.50.3'
gem 'scss_lint', '~> 0.52.0'
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$fieldsets = $this->form->getFieldsets();
?>

<form action="<?php echo JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->item->id); ?>" method="post" name="adminForm" id="profile-form" enctype="multipart/form-data">
<form action="<?php echo JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->item->id); ?>" method="post" name="adminForm" id="profile-form" enctype="multipart/form-data" class="form-validate">
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'account')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'account', JText::_('COM_ADMIN_USER_ACCOUNT_DETAILS')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
JHtml::_('behavior.formvalidator');
?>

<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="group-form">
<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="group-form" class="form-validate">
<fieldset>
<legend><?php echo JText::_('COM_USERS_USERGROUP_DETAILS'); ?></legend>
<div class="control-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
JHtml::_('behavior.formvalidator');
?>

<form action="<?php echo JRoute::_('index.php?option=com_users&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="level-form">
<form action="<?php echo JRoute::_('index.php?option=com_users&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="level-form" class="form-validate">
<fieldset>
<legend><?php echo JText::_('COM_USERS_LEVEL_DETAILS'); ?></legend>
<div class="control-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

JHtml::_('behavior.formvalidator');
?>
<form action="<?php echo JRoute::_('index.php?option=com_users&view=note&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="note-form">
<form action="<?php echo JRoute::_('index.php?option=com_users&view=note&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="note-form" class="form-validate">
<fieldset class="adminform">
<div class="control-group">
<div class="control-label">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
$settings = array();
?>

<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="user-form" enctype="multipart/form-data">
<form action="<?php echo JRoute::_('index.php?option=com_users&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="user-form" enctype="multipart/form-data" class="form-validate">

<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?>

Expand Down
5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ module.exports = function (config) {

// coverage reporter configuration
coverageReporter: {
type : 'text'
type : 'html',
dir : 'build/coverage-js/'
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['verbose', 'coverage'],
reporters: ['verbose', 'progress', 'coverage'],

// web server port
port: 9876,
Expand Down
2 changes: 1 addition & 1 deletion scss-lint-report.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0"?><testsuites errors="0"><testsuite name="scss-lint" timestamp="2017-03-10T14:52:15"/></testsuites>
<?xml version="1.0"?><testsuites errors="0"><testsuite name="scss-lint" timestamp="2017-03-27T16:00:12"/></testsuites>
10 changes: 10 additions & 0 deletions tests/javascript/highlighter/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,14 @@ define(['jquery', 'testsRoot/highlighter/spec-setup', 'jasmineJquery'], function
expect($('#span-highlight')).not.toContainHtml('<span rel="span" class="highlight">span</span>');
});
});

describe('Unhighlight with input lying inside a textarea', function () {
beforeAll(function () {
highlighter.unhighlight("textarea");
});

it('Should not highlight the word textarea in the sample text inside textarea element', function () {
expect($('#txtarea-highlight')).not.toContainHtml('<span rel="textarea" class="highlight">textarea</span>');
});
});
});
54 changes: 27 additions & 27 deletions tests/javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"name": "joomla-cms",
"version": "1.0.0",
"description": "Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cms/readme)](https://github.com/igrigorik/ga-beacon)\r ====================",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "node node_modules/karma/bin/karma start ../../karma.conf.js --single-run"
},
"author": "Thanuditha Ruchiranga Wickramasinghe",
"license": "GPL-2.0",
"private": true,
"devDependencies": {
"jasmine-core": "^2.4.1",
"jasmine-jquery": "^2.1.1",
"jquery": "^1.12.4",
"karma": "^0.13.22",
"karma-coverage": "^1.0.0",
"karma-firefox-launcher": "^0.1.7",
"karma-jasmine": "^0.3.8",
"karma-jasmine-ajax": "^0.1.13",
"karma-requirejs": "^1.0.0",
"karma-verbose-reporter": "0.0.3",
"requirejs": "^2.2.0",
"text": "requirejs/text"
}
"name": "joomla-cms",
"version": "1.0.0",
"description": "Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cms/readme)](https://github.com/igrigorik/ga-beacon)\r ====================",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "node node_modules/karma/bin/karma start ../../karma.conf.js --single-run"
},
"author": "Thanuditha Ruchiranga Wickramasinghe",
"license": "GPL-2.0",
"private": true,
"devDependencies": {
"jasmine-core": "^2.4.1",
"jasmine-jquery": "^2.1.1",
"jquery": "^1.12.4",
"karma": "^0.13.22",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^0.1.7",
"karma-jasmine": "^0.3.8",
"karma-jasmine-ajax": "^0.1.13",
"karma-requirejs": "^1.0.0",
"karma-verbose-reporter": "0.0.3",
"requirejs": "^2.2.0",
"text": "requirejs/text"
}
}
8 changes: 8 additions & 0 deletions tests/javascript/validate/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ define(['jquery', 'testsRoot/validate/spec-setup', 'jasmineJquery'], function ($
var $element = $('#validatejs');

describe('Validate', function () {
var ob = {
'JLIB_FORM_CONTAINS_INVALID_FIELDS': '',
'JLIB_FORM_FIELD_REQUIRED_VALUE': '',
'JLIB_FORM_FIELD_REQUIRED_CHECK': '',
'JLIB_FORM_FIELD_INVALID_VALUE': ''
};

beforeAll(function () {
Joomla.JText.load(ob);
renderFn = Joomla.renderMessages;
jtxtFn = Joomla.JText._;

Expand Down

0 comments on commit 08284eb

Please sign in to comment.