From 1243d779a4d171acf854aebae5ce3b3fd95e16f4 Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Thu, 21 Dec 2023 15:06:42 +0530 Subject: [PATCH] use process.ENV --- tests/cypress/e2e/settings.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cypress/e2e/settings.test.js b/tests/cypress/e2e/settings.test.js index 65ac5150..d8991c84 100644 --- a/tests/cypress/e2e/settings.test.js +++ b/tests/cypress/e2e/settings.test.js @@ -9,14 +9,14 @@ describe('Configure admin settings', () => { it( 'Enter settings and save', () => { cy.visit('wp-admin/options-general.php?page=windows-azure-storage-plugin-options'); - cy.get('input[name="azure_storage_account_name"]').clear().type(Cypress.env('CYPRESS_MICROSOFT_AZURE_ACCOUNT_NAME')); - cy.get('input[name="azure_storage_account_primary_access_key"]').clear().type(Cypress.env('CYPRESS_MICROSOFT_AZURE_ACCOUNT_KEY')); + cy.get('input[name="azure_storage_account_name"]').clear().type(process.env.CYPRESS_MICROSOFT_AZURE_ACCOUNT_NAME); + cy.get('input[name="azure_storage_account_primary_access_key"]').clear().type(process.env.CYPRESS_MICROSOFT_AZURE_ACCOUNT_KEY); cy.get('input[name="azure-submit-button"]').click(); }); it( 'Select container after page reload', () => { cy.visit('wp-admin/options-general.php?page=windows-azure-storage-plugin-options'); - cy.get('select[name="default_azure_storage_account_container_name"]').select(Cypress.env('CYPRESS_MICROSOFT_AZURE_CONTAINER')); + cy.get('select[name="default_azure_storage_account_container_name"]').select(process.env.CYPRESS_MICROSOFT_AZURE_CONTAINER); cy.get('input[name="azure_storage_use_for_default_upload"]').click(); cy.get('input[name="azure-submit-button"]').click(); }); @@ -25,6 +25,6 @@ describe('Configure admin settings', () => { cy.visit('wp-admin/options-general.php?page=windows-azure-storage-plugin-options'); cy.uploadMedia( 'tests/cypress/fixtures/image.jpg' ); cy.visit('wp-admin/upload.php'); - cy.get('.thumbnail img').should('have.attr', 'src').should('include',Cypress.env('CYPRESS_MICROSOFT_AZURE_ACCOUNT_NAME')); + cy.get('.thumbnail img').should('have.attr', 'src').should('include',process.env.CYPRESS_MICROSOFT_AZURE_ACCOUNT_NAME); }); });