Loading README.md +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ docker run --rm -d \ -e SE_EVENT_BUS_HOST=selenium-hub \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e VNC_NO_PASSWORD=true \ selenium/node-chrome:99.0 # Lanza un nodo de navegador Firefox Loading @@ -97,6 +98,7 @@ docker run --rm -d \ -e SE_EVENT_BUS_HOST=selenium-hub \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e VNC_NO_PASSWORD=true \ selenium/node-firefox:98.0 ``` Loading tests/functional/common/Home.js +9 −11 Original line number Diff line number Diff line Loading @@ -38,32 +38,30 @@ define([ 'Should_GoToFeedback_When_ClickOnFeedbackLink': function() { var feedbackPageUrl = Config.url.feedback, feedbackLinkSelector = 'div.moduleWindow[id=info] a[href="' + feedbackPageUrl + '"]', valuesObj = {}; feedbackLinkSelector = 'div.moduleWindow[id=info] a[href="' + feedbackPageUrl + '"]'; return indexPage .login() .getAllWindowHandles() .then(lang.partial(function(values, array) { .then(function(handles) { values.windowHandles = array; }, valuesObj)) assert.lengthOf(handles, 1, 'Había abierta más de 1 pestaña'); }) .then(Utils.clickElement(feedbackLinkSelector)) .sleep(Config.timeout.shortSleep) .getAllWindowHandles() .then(lang.partial(function(values, array) { var handles = values.windowHandles; .then(function(handles) { assert.isAbove(array.length, handles.length, 'No se ha abierto ninguna pestaña'); assert.lengthOf(handles, 2, 'No se ha abierto ninguna pestaña'); return this.parent .switchToWindow(array[1]) .switchToWindow(handles[handles.length - 1]) .sleep(Config.timeout.shortSleep) .then(Utils.checkUrl(feedbackPageUrl)) .then(Utils.checkLoadingIsGone()) .closeCurrentWindow() .switchToWindow(handles[0]); }, valuesObj)); }); } }; Loading tests/functional/common/Profile.js +11 −11 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ define([ 'Should_SetImage_When_UploadNewImage': function() { var values = {}; var valuesObj = {}; return goToProfile() // recuerda la ruta de la imagen inicial Loading @@ -95,7 +95,7 @@ define([ .then(lang.partial(function(values, src) { values.oldValue = src; }, values)) }, valuesObj)) .end() // edita la imagen .then(setNewProfileImage()) Loading @@ -105,7 +105,7 @@ define([ .then(lang.partial(function(values, src) { assert.notStrictEqual(src, values.oldValue, 'La imagen no ha cambiado'); }, values)) }, valuesObj)) .end(); }, Loading Loading @@ -149,7 +149,7 @@ define([ var editButtonSelector = 'div.infoContainer :nth-child(2) div.rowsContainer :first-child i.fa-edit', textInputSelector = 'div[data-redmic-model="firstName"] div.dijitInputContainer input', values = { valuesObj = { newValue: 'Benancio' }; Loading @@ -160,9 +160,9 @@ define([ .then(lang.partial(function(values, text) { values.oldValue = text; }, values)) }, valuesObj)) .end() .then(Utils.setInputValue(textInputSelector, values.newValue)) .then(Utils.setInputValue(textInputSelector, valuesObj.newValue)) .then(Utils.clickElement(Config.selector.saveButton)) .end() .then(Utils.checkLoadingIsGone()) Loading @@ -173,13 +173,13 @@ define([ .then(lang.partial(function(values, text) { assert.strictEqual(text, values.newValue, 'El valor seteado no es el esperado'); }, values)) }, valuesObj)) // restaura el valor original .clearValue() .then(lang.partial(function(values) { this.type(values.oldValue); }, values)) }, valuesObj)) .end() .then(Utils.clickElement(Config.selector.saveButton)) .end(); Loading @@ -192,7 +192,7 @@ define([ sectorSpanSelector = _sectorRowSelector + 'span.spanTemplate span.name', selectInputSelector = 'div[data-redmic-model="sector"] div.buttonSearch', selectInputValueSelector = 'span[data-redmic-id="10"]', values = {}; valuesObj = {}; return goToProfile() .then(Utils.clickElement(editButtonSelector)) Loading @@ -203,7 +203,7 @@ define([ .then(lang.partial(function(values, text) { values.newValue = text; }, values)) }, valuesObj)) .click() .end() .then(Utils.clickElement(Config.selector.saveButton)) Loading @@ -214,7 +214,7 @@ define([ .then(lang.partial(function(values, text) { assert.strictEqual(text, values.newValue, 'El nuevo valor no coincide con el seleccionado'); }, values)) }, valuesObj)) .end() // restaura el valor original .then(Utils.clickElement(editButtonSelector)) Loading tests/functional/common/Sidebar.js +5 −5 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ define([ allowedModulesKey = 'REDMIC_allowedModules', credentials = Config.credentials, userRole = credentials.userRole, name = 'Sidebar component as ' + userRole + ' tests'; suiteName = 'Sidebar component as ' + userRole + ' tests'; function testPrimaryEntry(url) { Loading Loading @@ -66,7 +66,7 @@ define([ return function(allowedModules) { var sidebarModules = JSON.parse(allowedModules).filter(function(val, i, arr) { var sidebarModules = JSON.parse(allowedModules).filter(function(val) { return !val.hidden; }); Loading Loading @@ -100,16 +100,16 @@ define([ var registerSuite = intern.getInterface('object').registerSuite; registerSuite(name, { registerSuite(suiteName, { Should_BeAbleToNavigateToAllModules_When_ReceiveAllowedModules: function() { indexPage = new LoginPage(this); return indexPage .login() .then(lang.partial(function(allowedModulesKey) { .then(lang.partial(function(itemKey) { return this.session.getLocalStorageItem(allowedModulesKey); return this.session.getLocalStorageItem(itemKey); }, allowedModulesKey)) .then(testSidebarEntries()) .then(function() { Loading tests/functional/common/Topbar.js +1 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ define([ infoLinkSelector = _guestAreaSelector + 'a[href="' + infoPageUrl + '"]', registerSuite = intern.getInterface('object').registerSuite, assert = intern.getPlugin('chai').assert; tests = { 'Should_GoToHomeView_When_ClickOnRedmicLogo': function() { Loading Loading @@ -57,7 +56,7 @@ define([ return indexPage .login() .then(Utils.clickElement(Config.selector.userArea)) .then(Utils.clickElementAndCheckUrl(registerLinkSelector, registerPageUrl)); .then(Utils.clickElementAndCheckUrl(loginLinkSelector, loginPageUrl)); }, 'Should_GoToRegisterView_When_GuestUserClickOnRegisterLink': function() { Loading Loading
README.md +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ docker run --rm -d \ -e SE_EVENT_BUS_HOST=selenium-hub \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e VNC_NO_PASSWORD=true \ selenium/node-chrome:99.0 # Lanza un nodo de navegador Firefox Loading @@ -97,6 +98,7 @@ docker run --rm -d \ -e SE_EVENT_BUS_HOST=selenium-hub \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e VNC_NO_PASSWORD=true \ selenium/node-firefox:98.0 ``` Loading
tests/functional/common/Home.js +9 −11 Original line number Diff line number Diff line Loading @@ -38,32 +38,30 @@ define([ 'Should_GoToFeedback_When_ClickOnFeedbackLink': function() { var feedbackPageUrl = Config.url.feedback, feedbackLinkSelector = 'div.moduleWindow[id=info] a[href="' + feedbackPageUrl + '"]', valuesObj = {}; feedbackLinkSelector = 'div.moduleWindow[id=info] a[href="' + feedbackPageUrl + '"]'; return indexPage .login() .getAllWindowHandles() .then(lang.partial(function(values, array) { .then(function(handles) { values.windowHandles = array; }, valuesObj)) assert.lengthOf(handles, 1, 'Había abierta más de 1 pestaña'); }) .then(Utils.clickElement(feedbackLinkSelector)) .sleep(Config.timeout.shortSleep) .getAllWindowHandles() .then(lang.partial(function(values, array) { var handles = values.windowHandles; .then(function(handles) { assert.isAbove(array.length, handles.length, 'No se ha abierto ninguna pestaña'); assert.lengthOf(handles, 2, 'No se ha abierto ninguna pestaña'); return this.parent .switchToWindow(array[1]) .switchToWindow(handles[handles.length - 1]) .sleep(Config.timeout.shortSleep) .then(Utils.checkUrl(feedbackPageUrl)) .then(Utils.checkLoadingIsGone()) .closeCurrentWindow() .switchToWindow(handles[0]); }, valuesObj)); }); } }; Loading
tests/functional/common/Profile.js +11 −11 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ define([ 'Should_SetImage_When_UploadNewImage': function() { var values = {}; var valuesObj = {}; return goToProfile() // recuerda la ruta de la imagen inicial Loading @@ -95,7 +95,7 @@ define([ .then(lang.partial(function(values, src) { values.oldValue = src; }, values)) }, valuesObj)) .end() // edita la imagen .then(setNewProfileImage()) Loading @@ -105,7 +105,7 @@ define([ .then(lang.partial(function(values, src) { assert.notStrictEqual(src, values.oldValue, 'La imagen no ha cambiado'); }, values)) }, valuesObj)) .end(); }, Loading Loading @@ -149,7 +149,7 @@ define([ var editButtonSelector = 'div.infoContainer :nth-child(2) div.rowsContainer :first-child i.fa-edit', textInputSelector = 'div[data-redmic-model="firstName"] div.dijitInputContainer input', values = { valuesObj = { newValue: 'Benancio' }; Loading @@ -160,9 +160,9 @@ define([ .then(lang.partial(function(values, text) { values.oldValue = text; }, values)) }, valuesObj)) .end() .then(Utils.setInputValue(textInputSelector, values.newValue)) .then(Utils.setInputValue(textInputSelector, valuesObj.newValue)) .then(Utils.clickElement(Config.selector.saveButton)) .end() .then(Utils.checkLoadingIsGone()) Loading @@ -173,13 +173,13 @@ define([ .then(lang.partial(function(values, text) { assert.strictEqual(text, values.newValue, 'El valor seteado no es el esperado'); }, values)) }, valuesObj)) // restaura el valor original .clearValue() .then(lang.partial(function(values) { this.type(values.oldValue); }, values)) }, valuesObj)) .end() .then(Utils.clickElement(Config.selector.saveButton)) .end(); Loading @@ -192,7 +192,7 @@ define([ sectorSpanSelector = _sectorRowSelector + 'span.spanTemplate span.name', selectInputSelector = 'div[data-redmic-model="sector"] div.buttonSearch', selectInputValueSelector = 'span[data-redmic-id="10"]', values = {}; valuesObj = {}; return goToProfile() .then(Utils.clickElement(editButtonSelector)) Loading @@ -203,7 +203,7 @@ define([ .then(lang.partial(function(values, text) { values.newValue = text; }, values)) }, valuesObj)) .click() .end() .then(Utils.clickElement(Config.selector.saveButton)) Loading @@ -214,7 +214,7 @@ define([ .then(lang.partial(function(values, text) { assert.strictEqual(text, values.newValue, 'El nuevo valor no coincide con el seleccionado'); }, values)) }, valuesObj)) .end() // restaura el valor original .then(Utils.clickElement(editButtonSelector)) Loading
tests/functional/common/Sidebar.js +5 −5 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ define([ allowedModulesKey = 'REDMIC_allowedModules', credentials = Config.credentials, userRole = credentials.userRole, name = 'Sidebar component as ' + userRole + ' tests'; suiteName = 'Sidebar component as ' + userRole + ' tests'; function testPrimaryEntry(url) { Loading Loading @@ -66,7 +66,7 @@ define([ return function(allowedModules) { var sidebarModules = JSON.parse(allowedModules).filter(function(val, i, arr) { var sidebarModules = JSON.parse(allowedModules).filter(function(val) { return !val.hidden; }); Loading Loading @@ -100,16 +100,16 @@ define([ var registerSuite = intern.getInterface('object').registerSuite; registerSuite(name, { registerSuite(suiteName, { Should_BeAbleToNavigateToAllModules_When_ReceiveAllowedModules: function() { indexPage = new LoginPage(this); return indexPage .login() .then(lang.partial(function(allowedModulesKey) { .then(lang.partial(function(itemKey) { return this.session.getLocalStorageItem(allowedModulesKey); return this.session.getLocalStorageItem(itemKey); }, allowedModulesKey)) .then(testSidebarEntries()) .then(function() { Loading
tests/functional/common/Topbar.js +1 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ define([ infoLinkSelector = _guestAreaSelector + 'a[href="' + infoPageUrl + '"]', registerSuite = intern.getInterface('object').registerSuite, assert = intern.getPlugin('chai').assert; tests = { 'Should_GoToHomeView_When_ClickOnRedmicLogo': function() { Loading Loading @@ -57,7 +56,7 @@ define([ return indexPage .login() .then(Utils.clickElement(Config.selector.userArea)) .then(Utils.clickElementAndCheckUrl(registerLinkSelector, registerPageUrl)); .then(Utils.clickElementAndCheckUrl(loginLinkSelector, loginPageUrl)); }, 'Should_GoToRegisterView_When_GuestUserClickOnRegisterLink': function() { Loading