diff --git a/Makefile b/Makefile index 756f1b35a..4e2678354 100644 --- a/Makefile +++ b/Makefile @@ -65,6 +65,7 @@ stopproxeus=pkill proxeus startds=curl -s http://localhost:2115 > /dev/null || ( PROXEUS_DATA_DIR=$(1) docker-compose up -d document-service && touch $(1)/ds-started ) startnodes=curl -s http://localhost:8011 > /dev/null || (PROXEUS_PLATFORM_DOMAIN=http://$(DOCKER_GATEWAY):1323 NODE_CRYPTO_RATES_URL=http://localhost:8011 REGISTER_RETRY_INTERVAL=1 docker-compose -f docker-compose.yml -f docker-compose-extra.override.yml up -d node-crypto-forex-rates && touch $(1)/nodes-started ) startmongo=nc -z localhost 27017 2> /dev/null || (docker run -d -p 27017:27017 -p 27018:27018 -p 27019:27019 proxeus/mongo-dev-cluster && sleep 10 && touch $(1)/mongo-started) +waitforproxeus=echo "Waiting for Proxeus to start" ; curl --head -X GET --retry 120 --retry-connrefused --retry-delay 1 --silent -o /dev/null http://localhost:1323 && echo "Proxeus started" || echo "Unable to start Proxeus" ifeq ($(coverage),true) COVERAGE_OPTS=-coverprofile artifacts/$@.coverage -coverpkg="$(coverpkg)" @@ -197,6 +198,7 @@ test-ui: server ui $(call startds,$(testdir)) $(call startnodes,$(testdir)) $(call startproxeus,$(testdir)) + $(call waitforproxeus,$(testdir)) $(MAKE) -C test/e2e test; ret=$$?; \ $(stopproxeus); \ [ -e $(testdir)/ds-started ] && docker-compose down; \ diff --git a/test/e2e/cypress/integration/1_user.js b/test/e2e/cypress/integration/1_user.js index 6f2682d05..2db9ed61e 100644 --- a/test/e2e/cypress/integration/1_user.js +++ b/test/e2e/cypress/integration/1_user.js @@ -49,7 +49,10 @@ describe(`User signup & login at ${url}`, () => { context('admin signup page', () => { before(() => { - cy.visit({ url: `${url}/register`, failOnStatusCode: false }) + cy.visit({ + url: `${url}/register`, + failOnStatusCode: false + }) }) it('should have a mail input', () => { @@ -60,14 +63,13 @@ describe(`User signup & login at ${url}`, () => { cy.wait(2000) cy.server() cy.route({ - method: 'POST', - url: '/api/register', - onResponse: (xhr) => { - signupResponse = xhr.response.headers['x-test-token']; - console.log(xhr.response); - }, + method: 'POST', + url: '/api/register', + onResponse: (xhr) => { + signupResponse = xhr.response.headers['x-test-token']; + console.log(xhr.response); }, - ).as('sign-admin') + }, ).as('sign-admin') cy.get('#inputEmail').type(`${adminEmailAddress}{enter}`) cy.get('#frontend-app').should('contain', 'Email sent') @@ -86,19 +88,21 @@ describe(`User signup & login at ${url}`, () => { context('user signup page', () => { before(() => { - cy.visit({ url: `${url}/register`, failOnStatusCode: false }) + cy.visit({ + url: `${url}/register`, + failOnStatusCode: false + }) }) it('should sign up user', () => { cy.server() cy.route({ - method: 'POST', - url: '/api/register', - onResponse: (xhr) => { - signupResponse = xhr.response.headers['x-test-token'] - }, + method: 'POST', + url: '/api/register', + onResponse: (xhr) => { + signupResponse = xhr.response.headers['x-test-token'] }, - ) + }, ) cy.get('#inputEmail').type(`${emailAddress}{enter}`) cy.get('#frontend-app').should('contain', 'Email sent') @@ -125,6 +129,7 @@ describe(`User signup & login at ${url}`, () => { body: { password: password, }, + timeout: 60000 }) }) }) @@ -138,8 +143,8 @@ describe(`User signup & login at ${url}`, () => { login(emailAddress, 'wrong-password') cy.get('.text-danger'). - should('contain', - 'You have entered an invalid username or password') + should('contain', + 'You have entered an invalid username or password') }) it('should login successfully', () => { @@ -177,16 +182,16 @@ describe(`User signup & login at ${url}`, () => { it('should remove account and logout when clicking again', () => { cy.get('.btn-danger').click() - cy.url().should('eq', `${url}/login?redirect=%2Fadmin%2Fworkflow`) + cy.url().should('include', `${url}/login`) }) }) }) }) -function login (email, password) { +function login(email, password) { cy.get('#inputEmail').clear().type(email) cy.get('#inputPassword').clear().type(password) cy.get('.btn-primary').eq(0).click() -} +} \ No newline at end of file diff --git a/ui/core/src/views/Templates.vue b/ui/core/src/views/Templates.vue index b4558f62b..309945726 100644 --- a/ui/core/src/views/Templates.vue +++ b/ui/core/src/views/Templates.vue @@ -35,7 +35,7 @@ export default { }, data () { return { - iconFa: 'mdi mdi-file-xml', + iconFa: 'mdi mdi-code-block-tags', deleteTarget: null, deleteFunc: () => {}, deleteDialogShowFunc: () => {} diff --git a/ui/core/src/views/Workflow.vue b/ui/core/src/views/Workflow.vue index 8f14783df..ec8e1eeb3 100644 --- a/ui/core/src/views/Workflow.vue +++ b/ui/core/src/views/Workflow.vue @@ -446,7 +446,7 @@ export default { item.icon = 'view_quilt' } if (item.type === 'template') { - item.iconFa = 'mdi mdi-file-xml' + item.iconFa = 'mdi mdi-code-block-tags' } item.error = response.data[key].Error elements.push(item) @@ -1133,7 +1133,7 @@ function condition(){ // enable inertial throwing inertia: false, onstart: function (event) { - if (event.interaction.downEvent.button === 2) { + if (event?.interaction?.downEvent?.button === 2) { return false } _.dragActive = true @@ -1181,17 +1181,16 @@ function condition(){ _.dragCompPosition.left = (_.bcr.left) - _.dim.ml }, onmove: function (event, a, b, c, d) { - if (event.interaction.downEvent.button === 2) { + if (event?.interaction?.downEvent?.button === 2) { return false } _.mousePos.y = event.pageY _.mousePos.x = event.pageX _.tl.x += event.dx _.tl.y += event.dy - _.tl.y = _.mousePos.y - _.dragCompPosition.top - _.dim.handleY - _.tl.x = _.mousePos.x - _.dragCompPosition.left - _.dim.handleX - _.$dragComp[0].style.webkitTransform = _.$dragComp[0].style.transform = 'translate(' + _.tl.x + 'px, ' + - _.tl.y + 'px)' + const translatePos = 'translate(' + _.tl.x + 'px, ' + _.tl.y + 'px)' + _.$dragComp[0].style.webkitTransform = translatePos + _.$dragComp[0].setAttribute('style', 'transform: ' + translatePos) }, onend: function (e, a, b, c, d) { _.wasInside = false @@ -1292,7 +1291,7 @@ function condition(){ user: 'fcn-usr node-icon mdi mdi-account', form: 'fcn-form node-icon mdi mdi-view-quilt', workflow: 'fcn-wflow node-icon mdi mdi-source-branch', - template: 'fcn-tmpl node-icon mdi mdi-file-xml' + template: 'fcn-tmpl node-icon mdi mdi-code-block-tags' }, // d={name:"name", detail:"detail", kind:"condition|user|form|workflow|template"}; _createFinderItem: function (d) { @@ -1569,7 +1568,7 @@ function condition(){ }, icon: { face: 'Material Design Icons', - code: '\uf48a', + code: '', color: '#5353c0' }, events: { @@ -1622,7 +1621,7 @@ function condition(){ }, icon: { face: 'Material Design Icons', - code: '\uf48a', + code: '', color: '#5150c0' }, events: { @@ -1675,7 +1674,7 @@ function condition(){ }, icon: { face: 'Material Design Icons', - code: '\uf339', + code: '', color: '#5150c0' }, events: { @@ -1710,7 +1709,7 @@ function condition(){ }, icon: { face: 'Material Design Icons', - code: '\uf70B', + code: '', color: '#f0a30a' }, events: { @@ -1771,7 +1770,7 @@ function condition(){ }, icon: { face: 'Material Design Icons', - code: '\uf62C', + code: '', color: '#e40070' }, events: { @@ -1834,7 +1833,7 @@ function condition(){ }, icon: { face: 'Material Design Icons', - code: '\uf22E', + code: '', color: '#ff30ec' }, events: { diff --git a/ui/core/src/views/appDependentComponents/Sidebar.vue b/ui/core/src/views/appDependentComponents/Sidebar.vue index 9386c7043..864b34dfc 100644 --- a/ui/core/src/views/appDependentComponents/Sidebar.vue +++ b/ui/core/src/views/appDependentComponents/Sidebar.vue @@ -25,7 +25,7 @@