Commit d2f2b802 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Actualiza muchos tests de catálogos

parent 27316618
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ define([

			'Should_ShowUserMenu_When_ClickOnUserIcon': function() {

				var userMenuSelector = 'div.dijitPopup.dijitMenuPopup';
				var userMenuSelector = 'div.dijitPopup.tooltipContainerPopup';

				return indexPage
					.login()
+2 −2
Original line number Diff line number Diff line
@@ -647,7 +647,7 @@ define([

			return lang.partial(function(self) {

				var selectItem = 'div.dijitPopup.dijitMenuPopup table[tabindex="-1"] tr[aria-label="' + value + ' "]';
				var selectItem = 'div.dijitPopup.tooltipContainerPopup table[tabindex="-1"] tr[aria-label="' + value + ' "]';

				return this.parent
					.then(self.clickElement(cssSelector + ' td.dijitButtonNode'))
@@ -662,7 +662,7 @@ define([

			return lang.partial(function(self) {

				var selectItem = 'div.dijitPopup.dijitMenuPopup table[tabindex="-1"] tr[tabindex="-1"]';
				var selectItem = 'div.dijitPopup.tooltipContainerPopup table[tabindex="-1"] tr[tabindex="-1"]';

				return this.parent
					.then(self.clickElement(cssSelector + ' td.dijitButtonNode'))
+12 −12
Original line number Diff line number Diff line
@@ -14,24 +14,24 @@ define([
	, FormPage
) {

	var filterContainerSelector = 'div.dijitPopup div.containerContent' +
			' div.compositeSearchInTooltip div.containerFormAndKeypad ',
	var filterContainerSelector = 'div.dijitPopup div.tooltipContainer' +
			' div.compositeSearchInTooltip div.formContainerWithKeypad ',
		keypadFilterSelector = filterContainerSelector + 'div.keypad ',
		applyFilterSelector = 'div.right span.success',
		values = {};
		valuesObj = {};

	var assert = intern.getPlugin('chai').assert;

	return declare([ListPage, FormPage], {

		constructor: function(args) {

		},

		openFilter: function(buttonSelector) {

			if (!buttonSelector) {
				buttonSelector = 'div.keypadZone a.iconContainer i.fa-binoculars';
				var baseTextSearchSelector = 'div.containerTextSearch',
					outerButtonsSelector = baseTextSearchSelector + ' > div.outerButtons',
					expandSearchButtonSelector = outerButtonsSelector + ' > i.expandSearchButton';

				buttonSelector = expandSearchButtonSelector;
			}

			return lang.partial(function(self) {
@@ -42,7 +42,7 @@ define([
						.then(lang.partial(function(values, idArr) {

							values.oldIds = idArr;
						}, values))
						}, valuesObj))
					.then(Utils.clickDisplayedElement(buttonSelector));
			}, this);
		},
@@ -108,7 +108,7 @@ define([
						if (oldIds.length > 1) {
							Utils[method](oldIds, idArr, message);
						}
					}, values));
					}, valuesObj));
			}, this);
		},

@@ -159,12 +159,12 @@ define([

				return this.parent
					.then(Utils.getFormFieldsProperties(true))
					.then(lang.partial(function(self, fieldsProperties) {
					.then(lang.partial(function(innerSelf, fieldsProperties) {

						var parent = this.parent;

						for (var i = 0; i < fieldsProperties.length; i++) {
							var dataRemidSelector = self._getDataRedmicModelSelector(fieldsProperties[i]),
							var dataRemidSelector = innerSelf._getDataRedmicModelSelector(fieldsProperties[i]),
								selector = filterContainerSelector + dataRemidSelector + 'div.containerDisableSwitch';

							parent = parent
+4 −4
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ define([

	return declare(_Page, {

		constructor: function(args) {
		constructor: function() {

			global.listContainerWithoutLoadingSelector = this._getParentList() +
				'div.containerList' + Config.selector.notLoading;
@@ -94,7 +94,7 @@ define([
						.then(function(element) {

							return element._elementId;
						}, function(element) {
						}, function() {

							return -1;
						});
@@ -285,13 +285,13 @@ define([

		setModeToShowAll: function() {

			var selectedOnlyOptionSelector = listModeInputSelectSelector + ' > option[value="all"]';
			var allOptionSelector = listModeInputSelectSelector + ' > option[value="all"]';

			return function() {

				return this.parent
					.then(Utils.clickDisplayedElement(listModeInputSelectSelector))
					.then(Utils.clickDisplayedElement(selectedOnlyOptionSelector))
					.then(Utils.clickDisplayedElement(allOptionSelector))
					.then(Utils.checkLoadingIsGone());
			};
		},
+8 −14
Original line number Diff line number Diff line
define([
	'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'tests/support/Config'
	, 'tests/support/pages/List'
	, 'tests/support/Utils'
], function (
	declare
	, lang
	, Config
	, ListPage
	, Utils
) {
@@ -16,7 +14,7 @@ define([

	return declare(ListPage, {

		constructor: function(args) {
		constructor: function() {

			global.expandCollapseSelector = 'div.expandCollapse';
			global.expandSelector = expandCollapseSelector + ' span.fa-caret-right';
@@ -158,8 +156,8 @@ define([
							var item = items[i];

							parent = parent
								.then(lang.partial(function(item) {
									item.click();
								.then(lang.partial(function(itemElement) {
									itemElement.click();
								}, item))
								.then(Utils.checkLoadingIsGone());
						}
@@ -172,7 +170,7 @@ define([
		checkChildrenSelectWithParentSelected: function(numParentList) {

			var parentSelector = listSelector + ' ' + listRowSelector + ':nth-child(' + numParentList + ')',
				values = {};
				valuesObj = {};

			return function() {

@@ -182,22 +180,20 @@ define([
							.then(lang.partial(function(values, children) {

								values.children = children.length;
							}, values))
							}, valuesObj))
							.end()
						.findAllByCssSelector(childrenInParentSelector + '.selectContainerRow')
							.then(lang.partial(function(values, children) {

								assert.strictEqual(children.length, values.children, 'No se ha deseleccionado la capa');
							}, values));
							}, valuesObj));
			};
		},

		checkParentMixedWithChildSelected: function(numParentList) {

			var parentSelector = listSelector + ' ' + listRowSelector + ':nth-child(' + numParentList +
				').category.mixedSelectContainerRow',

				values = {};
				').category.mixedSelectContainerRow';

			return function() {

@@ -209,9 +205,7 @@ define([
		checkParentSelectWithChildrenSelected: function(numParentList) {

			var parentSelector = listSelector + ' ' + listRowSelector + ':nth-child(' + numParentList +
				').category.selectContainerRow',

				values = {};
				').category.selectContainerRow';

			return function() {

Loading