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

Merge branch 'feature-fixTestsWithoutLoginByDefault' into 'dev'

Feature fix tests without login by default

See merge request redmic-project/client/web!38
parents ad94a8de 39dbc88d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -83,8 +83,7 @@ run-modules-functional-tests:
  stage: test-code
  extends: .web-build
  script:
    - echo $(head -1 /etc/hosts | cut -f1) redmic.local >> /etc/hosts
    - npm start -- -p 80 &
    - npm start &
    - grunt test-functional-local --functionalSuites=tests/functional/modules/**/!\(*Script\).js --headless
  only:
    - branches
@@ -132,7 +131,7 @@ run-functional-tests:
    - functional-testing
  script:
    - >
      grunt test-functional-local --server-url="https://${DEV_PUBLIC_HOSTNAME}" --user="${REDMIC_TEST_USER}"
      grunt test-functional-local --serverUrl="https://${DEV_PUBLIC_HOSTNAME}" --user="${REDMIC_TEST_USER}"
      --pass="${REDMIC_TEST_PASS}" --role=administrator --suitesGroups="${SUITES_GROUPS}" --headless
  only:
    - schedules
+6 −2
Original line number Diff line number Diff line
@@ -19,10 +19,12 @@ module.exports = function(grunt) {
			ownSocketPort = parseInt(grunt.option('ownSocketPort'), 10),
			ownTunnelPort = parseInt(grunt.option('ownTunnelPort'), 10),
			headless = grunt.option('headless') || false,
			serverUrl = grunt.option('server-url'),
			serverUrl = grunt.option('serverUrl'),
			role = grunt.option('role'),
			user = grunt.option('user'),
			pass = grunt.option('pass'),
			remoteHost = grunt.option('remoteHost'),
			remotePort = grunt.option('remotePort'),
			suitesGroups = grunt.option('suitesGroups'),
			suites = grunt.option('suites'),
			functionalSuites = grunt.option('functionalSuites'),
@@ -107,7 +109,9 @@ module.exports = function(grunt) {
				functionalSuites: functionalSuites,
				reportersOutputPath: reportersOutputPath,
				dojoBaseUrl: '.' + dojoCommonBaseUrl,
				userDataDir: userDataDir
				userDataDir: userDataDir,
				remoteHost: remoteHost,
				remotePort: remotePort
			}),

			testUnitLocalOptions = require(testUnitLocalPath)(testUnitParams),
+14 −3
Original line number Diff line number Diff line
@@ -9,6 +9,11 @@ module.exports = function(grunt) {
			, '"--suitesGroups=suitesFolderName" para indicar grupos de suites ejecutar desde la raíz correspondiente'
		],

		remoteOptionParameters = [
			'"--remoteHost=host" para redefinir la dirección del servicio de testeo remoto'
			, '"--remotePort=port" para redefinir el puerto del servicio de testeo remoto'
		],

		unitOptionParameters = [
			'"--suites=suitesFilePath" para indicar que ficheros de suites ejecutar (inhabilita "suitesGroups")'
			, '"--coverage=pathsToCover" para indicar que rutas incluir en la cobertura (por defecto, en todas)'
@@ -20,7 +25,7 @@ module.exports = function(grunt) {
			, '"--user=userEmail" para definir el nombre de acceso del usuario'
			, '"--pass=userPassword" para definir el password de acceso del usuario'
			, '"--headless" para ejecutar sin interfaz'
			, '"--server-url=url" para definir la dirección de la aplicación a testear'
			, '"--serverUrl=url" para definir la dirección de la aplicación a testear'
		];

	grunt.registerTask('test-unit-local',
@@ -42,6 +47,7 @@ module.exports = function(grunt) {
			, '"--ownServerHost=host" para redefinir dirección del servidor de intern, para indicarle al túnel remoto']
			.concat(commonOptionParameters)
			.concat(unitOptionParameters)
			.concat(remoteOptionParameters)
			.join('\n'),
		commonTasks.concat(['intern:test-unit-remote']));

@@ -49,6 +55,7 @@ module.exports = function(grunt) {
		['Ejecuta los tests funcionales en entorno remoto']
			.concat(commonOptionParameters)
			.concat(functionalOptionParameters)
			.concat(remoteOptionParameters)
			.join('\n'),
		commonTasks.concat(['intern:test-functional-remote']));

@@ -61,11 +68,11 @@ module.exports = function(grunt) {
		grunt.config('shell.test-functional-local-parallel', {
			command: function() {

				var serverUrlParam = grunt.option('server-url') || 'http://redmic.local',
				var serverUrlParam = grunt.option('serverUrl'),
					userParam = grunt.option('user'),
					passParam = grunt.option('pass'),
					serverPort = 9000,
					gruntCommand = 'grunt test-functional-local --headless --server-url="' + serverUrlParam + '"',
					gruntCommand = 'grunt test-functional-local --headless',

					publicZoneGroups = 'catalog,catalogDetails,viewers,products',
					administrativeZoneGroup = 'administrative,!administrative/taxonomy',
@@ -99,6 +106,10 @@ module.exports = function(grunt) {
					cmds = [],
					commandsGrunt = '';

				if (serverUrlParam) {
					gruntCommand += ' --serverUrl="' + serverUrlParam + '"';
				}

				for (var i = 0; i < userZoneGroupsList.length; i++) {
					specificParamsList.push(userCommonTestsParams + userZoneGroupsList[i]);
				}
+3 −1
Original line number Diff line number Diff line
@@ -274,7 +274,9 @@ define([

		_onRouteChange: function() {

			var moduleUrl = location.href.split('\/' + getGlobalContext().location.hostname + '\/')[1],
			var locationObj = getGlobalContext().location,
				locationPath = locationObj.pathname,
				moduleUrl = locationPath.substr(1),
				urlSplitted = moduleUrl.split('?'),
				route = urlSplitted[0],
				query = urlSplitted[1],
Compare 4a2b1abc to 4b9bd387
Original line number Diff line number Diff line
Subproject commit 4a2b1abc51ae92f0b7290cc6b8399447683973e3
Subproject commit 4b9bd3872c7054a08152276266b823dac276a0a2
Loading