diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a60444c0..36c5aff90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build on: push: - branches: [staging, master, ep-upgrade-stage, ep-upgrade-prod, ep-upgrade] + branches: [staging, master] pull_request: - branches: [staging, master, ep-upgrade-stage, ep-upgrade-prod, ep-upgrade] + branches: [staging, master] permissions: id-token: write @@ -50,9 +50,9 @@ jobs: deploy: runs-on: ubuntu-latest environment: - name: ${{ (github.ref == 'refs/heads/master' && 'production') || (github.ref == 'refs/heads/ep-upgrade-stage' && 'nonprod') || (github.ref == 'refs/heads/ep-upgrade-prod' && 'preprod') || 'staging' }} + name: ${{ (github.ref == 'refs/heads/master' && 'production') || 'staging' }} needs: [lint, test] - if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/ep-upgrade-stage' || github.ref == 'refs/heads/ep-upgrade-prod') + if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/staging') steps: - uses: actions/checkout@v2 diff --git a/src/app/analytics/analytics.factory.spec.js b/src/app/analytics/analytics.factory.spec.js index d3a17fe59..6d1660ac0 100644 --- a/src/app/analytics/analytics.factory.spec.js +++ b/src/app/analytics/analytics.factory.spec.js @@ -513,7 +513,7 @@ describe('analytics factory', () => { describe('productViewDetailsEvent', () => { const productData = { - "path": "https://give-stage-cloud.cru.org/designations/0/6/4/3/0/0643021.html", + "path": "https://give-stage2.cru.org/designations/0/6/4/3/0/0643021.html", "designationNumber": "0643021", "campaignPage": null, "replacementDesignationNumber": null, diff --git a/src/common/app.config.js b/src/common/app.config.js index 5a94a42ba..ff1a240b4 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -18,31 +18,12 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider devcloud: [ 'give-dev-cloud.cru.org' ], - stagecloud: [ - 'give-stage-cloud.cru.org' - ], - prodcloud: [ - 'give-prod-cloud.cru.org' - ], staging: [ 'give-stage2.cru.org', 'stage.cru.org', - 'uatauth.aws.cru.org', - 'uatpub.aws.cru.org', - 'uatdisp.aws.cru.org', 'cru-givestage.s3.amazonaws.com', 'give-stage-static.cru.org' ], - nonprod: [ - 'give-stage2-next.cru.org', - 'cru-give-web-assets-nonprod.s3.amazonaws.com', - 'give-nonprod-static.cru.org' - ], - preprod: [ - 'give-prod-static.cru.org', - 'cru-give-web-assets-preprod.s3.amazonaws.com', - 'give-preprod.cru.org' - ], production: [] }, vars: { @@ -62,22 +43,6 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider publicGive: 'https://give-dev-cloud.cru.org', acsUrl: 'https://cru-mkt-stage1.adobe-campaign.com/lp/LP63?_uuid=f1938f90-38ea-41a6-baad-9ac133f6d2ec&service=%404k83N_C5RZnLNvwz7waA2SwyzIuP6ATcN8vJjmT5km0iZPYKUUYk54sthkZjj-hltAuOKDYocuEi5Pxv8BSICoA4uppcvU_STKCzjv9RzLpE4hqj&pkey=' }, - stagecloud: { - apiUrl: 'https://give-stage-cloud.cru.org', - imgDomain: '//give-static.cru.org', - imgDomainDesignation: 'https://give-stage-cloud.cru.org', - publicCru: 'https://stage-cloud.cru.org', - publicGive: 'https://give-stage-cloud.cru.org', - acsUrl: 'https://cru-mkt-stage1.adobe-campaign.com/lp/LP63?_uuid=f1938f90-38ea-41a6-baad-9ac133f6d2ec&service=%404k83N_C5RZnLNvwz7waA2SwyzIuP6ATcN8vJjmT5km0iZPYKUUYk54sthkZjj-hltAuOKDYocuEi5Pxv8BSICoA4uppcvU_STKCzjv9RzLpE4hqj&pkey=' - }, - prodcloud: { - apiUrl: 'https://give-prod-cloud.cru.org', - imgDomain: '//give-static.cru.org', - imgDomainDesignation: 'https://give-prod-cloud.cru.org', - publicCru: 'https://www.cru.org', - publicGive: 'https://give-prod-cloud.cru.org', - acsUrl: 'https://cru-mkt-prod1-m.adobe-campaign.com/lp/LPEmailPrefCenter?_uuid=8831d67a-0d46-406b-8987-fd07c97c4ca7&service=%400fAlW4GPmxXExp8qlx7HDlAM6FSZUd0yYRlQg6HRsO_kglfi0gs650oHPZX6LrOvg7OHoIWWpobOeGZduxdNU_m5alc&pkey=' - }, staging: { apiUrl: 'https://give-stage2.cru.org', imgDomain: '//give-static.cru.org', @@ -86,23 +51,6 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider publicGive: 'https://give-stage2.cru.org', acsUrl: 'https://cru-mkt-stage1.adobe-campaign.com/lp/LP63?_uuid=f1938f90-38ea-41a6-baad-9ac133f6d2ec&service=%404k83N_C5RZnLNvwz7waA2SwyzIuP6ATcN8vJjmT5km0iZPYKUUYk54sthkZjj-hltAuOKDYocuEi5Pxv8BSICoA4uppcvU_STKCzjv9RzLpE4hqj&pkey=' }, - nonprod: { - apiUrl: 'https://give-stage2-next.cru.org', - imgDomain: '//give-nonprod-static.cru.org', - imgDomainDesignation: 'https://give-stage2-next.cru.org', - publicCru: 'https://stage.cru.org', - publicGive: 'https://give-stage2-next.cru.org', - acsUrl: 'https://cru-mkt-stage1.adobe-campaign.com/lp/LP63?_uuid=f1938f90-38ea-41a6-baad-9ac133f6d2ec&service=%404k83N_C5RZnLNvwz7waA2SwyzIuP6ATcN8vJjmT5km0iZPYKUUYk54sthkZjj-hltAuOKDYocuEi5Pxv8BSICoA4uppcvU_STKCzjv9RzLpE4hqj&pkey=', - isBrandedCheckout: false - }, - preprod: { - apiUrl: 'https://give-preprod.cru.org', - imgDomain: '//give-prod-static.cru.org', - imgDomainDesignation: 'https://give-preprod.cru.org', - publicCru: 'https://www.cru.org', - publicGive: 'https://give-preprod.cru.org', - acsUrl: 'https://cru-mkt-prod1-m.adobe-campaign.com/lp/LPEmailPrefCenter?_uuid=8831d67a-0d46-406b-8987-fd07c97c4ca7&service=%400fAlW4GPmxXExp8qlx7HDlAM6FSZUd0yYRlQg6HRsO_kglfi0gs650oHPZX6LrOvg7OHoIWWpobOeGZduxdNU_m5alc&pkey=' - }, production: { apiUrl: 'https://give.cru.org', imgDomain: '//give-static.cru.org', diff --git a/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.js b/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.js index 44123c6d5..15373ddee 100644 --- a/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.js +++ b/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.js @@ -89,7 +89,7 @@ class BankAccountController { state: 'encrypting' } }) - const productionEnvironments = ['production', 'prodcloud', 'preprod'] + const productionEnvironments = ['production'] const actualEnvironment = this.envService.get() const ccpEnvironment = productionEnvironments.includes(actualEnvironment) ? 'production' : actualEnvironment cruPayments.bankAccount.init(ccpEnvironment, ccpEnvironment === 'production' ? ccpKey : ccpStagingKey) diff --git a/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.spec.js b/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.spec.js index 40507acac..27735b749 100644 --- a/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.spec.js +++ b/src/common/components/paymentMethods/bankAccountForm/bankAccountForm.component.spec.js @@ -190,62 +190,6 @@ describe('bank account form', () => { expect(self.outerScope.onPaymentFormStateChange).toHaveBeenCalledWith({ state: 'loading', payload: expectedData }) }) - it('should send a request to save the bank account payment info using the prodcloud env', () => { - self.controller.bankPayment = { - accountType: 'checking', - bankName: 'First Bank', - routingNumber: '123456789', - accountNumber: '123456789012' - } - self.formController.$valid = true - self.controller.envService.set('prodcloud') - self.controller.savePayment() - - expect(cruPayments.bankAccount.init).toHaveBeenCalledWith('production', ccpKey) - expect(cruPayments.bankAccount.encrypt).toHaveBeenCalledWith('123456789012') - expect(self.formController.$setSubmitted).toHaveBeenCalled() - const expectedData = { - bankAccount: { - 'account-type': 'checking', - 'bank-name': 'First Bank', - 'encrypted-account-number': encryptedAccountNumber, - 'display-account-number': '9012', - 'routing-number': '123456789' - } - } - - expect(self.controller.onPaymentFormStateChange).toHaveBeenCalledWith({ $event: { state: 'loading', payload: expectedData } }) - expect(self.outerScope.onPaymentFormStateChange).toHaveBeenCalledWith({ state: 'loading', payload: expectedData }) - }) - - it('should send a request to save the bank account payment info using the preprod env', () => { - self.controller.bankPayment = { - accountType: 'checking', - bankName: 'First Bank', - routingNumber: '123456789', - accountNumber: '123456789012' - } - self.formController.$valid = true - self.controller.envService.set('preprod') - self.controller.savePayment() - - expect(cruPayments.bankAccount.init).toHaveBeenCalledWith('production', ccpKey) - expect(cruPayments.bankAccount.encrypt).toHaveBeenCalledWith('123456789012') - expect(self.formController.$setSubmitted).toHaveBeenCalled() - const expectedData = { - bankAccount: { - 'account-type': 'checking', - 'bank-name': 'First Bank', - 'encrypted-account-number': encryptedAccountNumber, - 'display-account-number': '9012', - 'routing-number': '123456789' - } - } - - expect(self.controller.onPaymentFormStateChange).toHaveBeenCalledWith({ $event: { state: 'loading', payload: expectedData } }) - expect(self.outerScope.onPaymentFormStateChange).toHaveBeenCalledWith({ state: 'loading', payload: expectedData }) - }) - it('should send a request to save the bank account payment info with an existing payment method where the accountNumber is empty', () => { self.controller.paymentMethod = { 'display-account-number': '9012' diff --git a/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.js b/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.js index 6e152e545..cd89439fe 100644 --- a/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.js +++ b/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.js @@ -138,7 +138,7 @@ class CreditCardController { }) // Send masked card number when card number is not updated : this.tsysService.getManifest() .mergeMap(data => { - const productionEnvironments = ['production', 'prodcloud', 'preprod'] + const productionEnvironments = ['production'] const actualEnvironment = this.envService.get() const ccpEnvironment = productionEnvironments.includes(actualEnvironment) ? 'production' : actualEnvironment diff --git a/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.spec.js b/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.spec.js index c500bbfce..9d4f77c9f 100644 --- a/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.spec.js +++ b/src/common/components/paymentMethods/creditCardForm/creditCardForm.component.spec.js @@ -253,38 +253,6 @@ describe('credit card form', () => { expect(self.outerScope.onPaymentFormStateChange).toHaveBeenCalledWith({ state: 'loading', payload: expectedData }) }) - it('should handle prodcloud environment properly', () => { - self.controller.envService.set('prodcloud') - self.controller.creditCardPayment = { - cardNumber: '4111111111111111', - cardholderName: 'Person Name', - expiryMonth: 12, - expiryYear: 2019, - securityCode: '123' - } - self.controller.useMailingAddress = true - self.formController.$valid = true - self.controller.savePayment() - - expect(cruPayments.creditCard.init).toHaveBeenCalledWith('production', '', '') - }) - - it('should handle preprod environment properly', () => { - self.controller.envService.set('preprod') - self.controller.creditCardPayment = { - cardNumber: '4111111111111111', - cardholderName: 'Person Name', - expiryMonth: 12, - expiryYear: 2019, - securityCode: '123' - } - self.controller.useMailingAddress = true - self.formController.$valid = true - self.controller.savePayment() - - expect(cruPayments.creditCard.init).toHaveBeenCalledWith('production', '', '') - }) - it('should handle an error retrieving the manifest from TSYS', () => { self.formController.$valid = true self.controller.tsysService.getManifest.mockReturnValue(Observable.throw('some error')) diff --git a/src/common/services/api/cart.service.js b/src/common/services/api/cart.service.js index 03e9857c1..de63952ef 100644 --- a/src/common/services/api/cart.service.js +++ b/src/common/services/api/cart.service.js @@ -41,7 +41,7 @@ class Cart { } setCartCountCookie (quantity) { - if (!['give.cru.org', 'give-stage2.cru.org', 'give-stage2-next.cru.org', 'give-stage-cloud.cru.org', 'give-prod-cloud.cru.org'].includes(this.$location.host())) { + if (!['give.cru.org', 'give-stage2.cru.org', 'give-dev-cloud.cru.org'].includes(this.$location.host())) { return } diff --git a/src/common/services/api/designations.service.spec.js b/src/common/services/api/designations.service.spec.js index 54145e941..a6675de6b 100644 --- a/src/common/services/api/designations.service.spec.js +++ b/src/common/services/api/designations.service.spec.js @@ -246,7 +246,7 @@ describe('designation service', () => { describe('ministriesList', () => { it('should return a list of ministries', () => { jest.spyOn(self.$location, 'protocol').mockImplementationOnce(() => 'https') - jest.spyOn(self.$location, 'host').mockImplementationOnce(() => 'give-stage-cloud.cru.org') + jest.spyOn(self.$location, 'host').mockImplementationOnce(() => 'give-stage2.cru.org') const pagePath = 'page.html' const ministriesResponse = { ministries: [{ @@ -256,7 +256,7 @@ describe('designation service', () => { extra: 'something-else' }] } - self.$httpBackend.expectGET(`https://give-stage-cloud.cru.org/${pagePath}/jcr:content/content-parsys/designation_search_r.json`) + self.$httpBackend.expectGET(`https://give-stage2.cru.org/${pagePath}/jcr:content/content-parsys/designation_search_r.json`) .respond(200, ministriesResponse) const expectedResult = {