diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index f075d500..515e9d81 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -28,7 +28,7 @@ // Imports Quasar Cypress AE predefined commands // import { registerCommands } from '@quasar/quasar-app-extension-testing-e2e-cypress'; Cypress.Commands.add('login', (user) => { - //cy.visit('/#/login'); + cy.visit('/#/login'); cy.request({ method: 'POST', url: '/api/accounts/login', @@ -38,7 +38,18 @@ Cypress.Commands.add('login', (user) => { }, }).then((response) => { window.localStorage.setItem('token', response.body.token); - }); + + cy.request({ + method: 'GET', + url: '/api/VnUsers/ShareToken', + headers:{ + Authorization: window.localStorage.getItem('token') + } + }).then(({body}) => { + console.log(); + window.localStorage.setItem('tokenMultimedia', body.multimediaToken.id); + }) +}); }); Cypress.Commands.add('waitForElement', (element) => {