diff --git a/tests/cypress.config.ts b/tests/cypress.config.ts index 3bb5d74fd..124acd30e 100644 --- a/tests/cypress.config.ts +++ b/tests/cypress.config.ts @@ -15,6 +15,7 @@ export default defineConfig({ env: { username: 'a', password: 'a', + dockerhost: 'http://172.17.0.1' }, projectId: 'o5451s', e2e: { diff --git a/tests/cypress/tests/settings/plex/plex-settings.spec.ts b/tests/cypress/tests/settings/plex/plex-settings.spec.ts index bce5268d9..2bcecc275 100644 --- a/tests/cypress/tests/settings/plex/plex-settings.spec.ts +++ b/tests/cypress/tests/settings/plex/plex-settings.spec.ts @@ -23,7 +23,7 @@ describe("Plex Settings Tests", () => { "version": "1.30.0.6442-5070ad484", "scheme": "http", "host": "2.2.2.2", - "localAddresses": "http://host.docker.internal", + "localAddresses": "${Cypress.env("dockerhost")}", "machineIdentifier": "9999999999999999", "createdAt": "5555555555", "updatedAt": "6666666666", @@ -47,7 +47,7 @@ describe("Plex Settings Tests", () => { const modal = Page.plexServerModal; modal.serverName.should('have.value','AutomationServer'); - modal.hostName.should('have.value','localhost'); + modal.hostName.should('have.value', Cypress.env("dockerhost")); modal.port.should('have.value','32400'); modal.authToken.should('have.value','myaccessToken'); modal.machineIdentifier.should('have.value','9999999999999999'); @@ -77,7 +77,7 @@ describe("Plex Settings Tests", () => { // Edit server Page.plexServerGrid.serverCardButton('AutomationServer').click(); modal.serverName.should('have.value','AutomationServer'); - modal.hostName.should('have.value','localhost'); + modal.hostName.should('have.value', Cypress.env("dockerhost")); modal.port.should('have.value','32400'); modal.authToken.should('have.value','myaccessToken'); modal.machineIdentifier.should('have.value','9999999999999999'); diff --git a/tests/package.json b/tests/package.json index ee50411a7..c1bc50c26 100644 --- a/tests/package.json +++ b/tests/package.json @@ -19,7 +19,7 @@ "scripts": { "cypress:version": "cypress version", "cypress:verify": "cypress verify", - "cypress:open": "cypress open --config baseUrl=http://localhost:3577", + "cypress:open": "cypress open --config baseUrl=http://localhost:3577 --env dockerhost=http://localhost", "cypress:run": "cypress run", "types": "tsc --noEmit", "e2e": "cypress run",