Skip to content

Commit

Permalink
use process.ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Dec 21, 2023
1 parent aa259e2 commit 1243d77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/cypress/e2e/settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand All @@ -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);
});
});

0 comments on commit 1243d77

Please sign in to comment.