From 30ddaa50ea9507ad89c66c50159f86d4472b9562 Mon Sep 17 00:00:00 2001 From: Sebastian Seggewiss Date: Tue, 23 Jul 2024 10:00:52 +0200 Subject: [PATCH] NEXT-37357 - Fix login --- cypress/support/commands/api-commands.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/support/commands/api-commands.js b/cypress/support/commands/api-commands.js index 33018f6..1845067 100644 --- a/cypress/support/commands/api-commands.js +++ b/cypress/support/commands/api-commands.js @@ -18,13 +18,13 @@ Cypress.Commands.add('authenticate', () => { client_id: Cypress.env('client_id') ? Cypress.env('client_id') : 'administration', scopes: Cypress.env('scope') ? Cypress.env('scope') : 'write', username: Cypress.env('username') || Cypress.env('user') || 'admin', - password: Cypress.env('password') || Cypress.env('pass') || 'shopware' + password: Cypress.env('password') || Cypress.env('pass') || 'shopware', } ).then((responseData) => { let result = responseData.body; result.access = result.access_token; result.refresh = result.refresh_token; - result.expiry = Math.round(+new Date() / 1000) + result.expires_in; + result.expiry = Math.round(Date.now() + (result.expires_in * 1000)); cy.log('request /api/oauth/token') diff --git a/package.json b/package.json index 6f949bb..2671b00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shopware-ag/e2e-testsuite-platform", - "version": "8.0.0", + "version": "8.0.1", "description": "E2E Testsuite for Shopware 6 using Cypress.js", "keywords": [ "e2e",