Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPLOY 2024.08.01 #1569

Merged
merged 13 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:

- name: Download Azion CLI
run: |
wget https://github.com/aziontech/azion/releases/download/1.29.0/azion_1.29.0_linux_amd64.apk
apk add --allow-untrusted azion_1.29.0_linux_amd64.apk
wget https://github.com/aziontech/azion/releases/download/1.34.2/azion_1.34.2_linux_amd64.apk
apk add --allow-untrusted azion_1.34.2_linux_amd64.apk

- name: Configure Azion CLI
run: azion -t ${{ secrets.PLATFORM_KIT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:

- name: Download Azion CLI
run: |
wget https://github.com/aziontech/azion/releases/download/1.34.1/azion_1.34.1_linux_amd64.apk
apk add --allow-untrusted azion_1.34.1_linux_amd64.apk
wget https://github.com/aziontech/azion/releases/download/1.34.2/azion_1.34.2_linux_amd64.apk
apk add --allow-untrusted azion_1.34.2_linux_amd64.apk

- name: Configure Azion CLI
run: azion -t ${{ secrets.PLATFORM_KIT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This project utilizes Stripe for payment processing, and it requires environment
Environment Variables
You need to set the following environment variables in your .env file or environment configuration:

* `VITE_DEV_STRIPE_TOKEN`: This is your Stripe API key for the development environment. It's typically used for local testing during development.
* `VITE_STRIPE_TOKEN_DEV`: This is your Stripe API key for the development environment. It's typically used for local testing during development.

* `VITE_STRIPE_TOKEN_STAGE`: This is your Stripe API key for the staging environment. It's typically used for testing purposes before deploying to production.

Expand All @@ -107,7 +107,7 @@ You need to set the following environment variables in your .env file or environ
Create a `.env` file at the root of your project and add the following lines, replacing the placeholder keys with your actual Stripe API keys:

```bash
VITE_DEV_STRIPE_TOKEN=pk_test_yourDevApiKeyHere
VITE_STRIPE_TOKEN_DEV=pk_test_yourDevApiKeyHere
VITE_STRIPE_TOKEN_STAGE=pk_test_yourStageApiKeyHere
VITE_STRIPE_TOKEN_PROD=pk_live_yourProductionApiKeyHere
```
Expand Down
89 changes: 47 additions & 42 deletions azion/production/azion.json
Original file line number Diff line number Diff line change
@@ -1,161 +1,166 @@
{
"name": "console_kit_production",
"bucket": "consolekitproduction",
"name": "console_kit_31-07-2024",
"bucket": "consolekit31-07-2024",
"preset": "vue",
"mode": "deliver",
"env": "production",
"prefix": "20240625173345",
"prefix": "20240731102422",
"not-first-run": true,
"function": {
"id": 25650,
"id": 27312,
"name": "__DEFAULT__",
"file": ".edge/worker.js",
"args": "azion/production/args.json",
"instance-id": 24884,
"instance-id": 26354,
"instance-name": "__DEFAULT__",
"cache-id": 0
},
"application": {
"id": 1719268926,
"id": 1722431647,
"name": "__DEFAULT__"
},
"domain": {
"id": 1719266455,
"name": "console_kit_production",
"domain_name": "ivslss619f.map.azionedge.net",
"url": "https://ivslss619f.map.azionedge.net"
"id": 1722432873,
"name": "console_kit_31-07-2024",
"domain_name": "gzjntb7vdt.map.azionedge.net",
"url": "https://gzjntb7vdt.map.azionedge.net"
},
"rt-purge": {
"purge_on_publish": true
},
"origin": [
{
"origin-id": 139231,
"origin-key": "811175b6-1438-41b7-a890-0a661f6ef3f8",
"origin-id": 142752,
"origin-key": "ef85b806-9eac-4e47-99a6-f9267a5bd9a4",
"name": "origin-storage-default"
},
{
"origin-id": 139232,
"origin-key": "0c2a4c1f-3f32-4b89-8433-f63463bbc812",
"origin-id": 142753,
"origin-key": "c9f8a8c3-8121-414c-9a3c-208a263bc846",
"name": "origin-manager"
},
{
"origin-id": 139233,
"origin-key": "d4129eb3-de13-41ce-b300-78c9d40b9a6d",
"origin-id": 142754,
"origin-key": "d4cea926-0592-456a-a913-eff4268b7bd7",
"name": "origin-vcs"
},
{
"origin-id": 139234,
"origin-key": "445a7bba-47b2-4f21-aaed-48cd218ce125",
"origin-id": 142755,
"origin-key": "341ed3e6-59ef-4b9b-a19b-f43a1d1501d4",
"name": "origin-cities"
},
{
"origin-id": 139235,
"origin-key": "8420c41b-53c3-468f-983a-611e2009293b",
"origin-id": 142756,
"origin-key": "dcd816a3-8680-4281-96b9-ce1e8cb05e0d",
"name": "origin-sso"
},
{
"origin-id": 139236,
"origin-key": "3d92d42f-26b5-4341-a0f8-61ead6bb36d6",
"origin-id": 142757,
"origin-key": "2654d973-9e40-4b07-ab04-79064c2f6dce",
"name": "origin-api"
},
{
"origin-id": 139237,
"origin-key": "07b56aa4-41e6-40f5-9db2-1e911ba4193f",
"origin-id": 142758,
"origin-key": "6589b741-6654-4e8d-bb4e-b6c0c850d750",
"name": "origin-script-runner"
}
],
"rules-engine": {
"created": false,
"rules": [
{
"id": 263048,
"id": 269748,
"name": "Apply Common Configuration for All Requests",
"phase": "request"
},
{
"id": 263049,
"id": 269749,
"name": "Set Storage Origin for All Requests",
"phase": "request"
},
{
"id": 263050,
"id": 269750,
"name": "Deliver Static Assets from Storage",
"phase": "request"
},
{
"id": 263051,
"id": 269751,
"name": "Redirect All Non-Asset Requests to to index.html",
"phase": "request"
},
{
"id": 263052,
"id": 269752,
"name": "Route API Default Requests to API Origin",
"phase": "request"
},
{
"id": 263053,
"id": 269753,
"name": "Route Specific API Services to Marketplace Origin",
"phase": "request"
},
{
"id": 263054,
"id": 269754,
"name": "Route Specific API Services to Template Engine Origin",
"phase": "request"
},
{
"id": 263055,
"id": 269755,
"name": "Route Specific API Services to Script Runner Origin",
"phase": "request"
},
{
"id": 263056,
"id": 269756,
"name": "Route Version Control System API to VCS Origin",
"phase": "request"
},
{
"id": 263057,
"id": 269757,
"name": "Route User Authentication and Account Management to SSO Origin",
"phase": "request"
},
{
"id": 263058,
"id": 269758,
"name": "Route GraphQL City Queries to Cities Origin",
"phase": "request"
},
{
"id": 263059,
"id": 269759,
"name": "Route GraphQL Billing Queries to Manager Origin",
"phase": "request"
},
{
"id": 269760,
"name": "Rewrite _azrt Cookie",
"phase": "response"
},
{
"id": 263060,
"id": 269761,
"name": "Rewrite azsid Cookie",
"phase": "response"
},
{
"id": 263061,
"id": 269762,
"name": "Rewrite _azat Cookie",
"phase": "response"
},
{
"id": 263062,
"id": 269763,
"name": "Secure Headers",
"phase": "response"
}
]
},
"cache-settings": [
{
"id": 157896,
"id": 161051,
"name": "Statics - Cache"
},
{
"id": 157897,
"id": 161052,
"name": "Marketplace - Cache"
},
{
"id": 157898,
"id": 161053,
"name": "Cities - Cache"
}
]
Expand Down
42 changes: 42 additions & 0 deletions cypress/e2e/account-settings/update-account-settings.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* eslint-disable cypress/no-unnecessary-waiting */
import selectors from '../../support/selectors'
import generateUniqueName from '../../support/utils'

const fixtures = {
companyName: 'Company Name',
companyId: '00.000.000/0001-00',
postalCode: '14055-010',
address: '13, Elm Street',
complement: 'Apt. 123'
}

describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Account Settings')

fixtures.companyName = generateUniqueName('companyName')
cy.wait(3000)
})

it('should update account settings successfully', () => {
// Arrange
cy.get(selectors.accountSettings.companyName).clear()
cy.get(selectors.accountSettings.companyId).clear()
cy.get(selectors.accountSettings.postalCode).clear()

// Act
cy.get(selectors.accountSettings.companyName).type(fixtures.companyName, { delay: 0 })
cy.get(selectors.accountSettings.companyId).type(fixtures.companyId, { delay: 0 })
cy.get(selectors.accountSettings.postalCode).type(fixtures.postalCode, { delay: 0 })

cy.get(selectors.accountSettings.submitButton).click()

// Assert
cy.verifyToast('success', 'Your account settings have been updated')
cy.openProduct('Account Settings')
cy.get(selectors.accountSettings.companyName).should('have.value', fixtures.companyName)
cy.get(selectors.accountSettings.companyId).should('have.value', fixtures.companyId)
cy.get(selectors.accountSettings.postalCode).should('have.value', fixtures.postalCode)
})
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable cypress/no-unnecessary-waiting */
import selectors from '../support/selectors'
import generateUniqueName from '../support/utils'
import selectors from '../../support/selectors'
import generateUniqueName from '../../support/utils'

const fixtures = {
companyName: 'Company Name',
Expand All @@ -19,27 +19,6 @@ describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
cy.wait(3000)
})

it('should update account settings successfully', () => {
// Arrange
cy.get(selectors.accountSettings.companyName).clear()
cy.get(selectors.accountSettings.companyId).clear()
cy.get(selectors.accountSettings.postalCode).clear()

// Act
cy.get(selectors.accountSettings.companyName).type(fixtures.companyName, { delay: 0 })
cy.get(selectors.accountSettings.companyId).type(fixtures.companyId, { delay: 0 })
cy.get(selectors.accountSettings.postalCode).type(fixtures.postalCode, { delay: 0 })

cy.get(selectors.accountSettings.submitButton).click()

// Assert
cy.verifyToast('success', 'Your account settings have been updated')
cy.openProduct('Account Settings')
cy.get(selectors.accountSettings.companyName).should('have.value', fixtures.companyName)
cy.get(selectors.accountSettings.companyId).should('have.value', fixtures.companyId)
cy.get(selectors.accountSettings.postalCode).should('have.value', fixtures.postalCode)
})

it('should update address info successfully', () => {
// Arrange
const randomCountryOption = Math.floor(Math.random() * 5)
Expand Down Expand Up @@ -96,23 +75,4 @@ describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
cy.get(selectors.accountSettings.address).should('have.value', fixtures.address)
cy.get(selectors.accountSettings.complement).should('have.value', fixtures.complement)
})

it('should update the billing email list successfully', () => {
// Arrange
const uniquePrefix = generateUniqueName('email')
const emails = `${uniquePrefix}@mail.com;${uniquePrefix}@example.com`

cy.get(selectors.accountSettings.billingEmails).clear()

// Act
cy.get(selectors.accountSettings.billingEmails).type(emails, { delay: 0 })

cy.get(selectors.accountSettings.submitButton).click()

// Assert
cy.verifyToast('success', 'Your account settings have been updated')
cy.openProduct('Account Settings')

cy.get(selectors.accountSettings.billingEmails).should('have.value', emails)
})
})
})
40 changes: 40 additions & 0 deletions cypress/e2e/account-settings/update-billing-email.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* eslint-disable cypress/no-unnecessary-waiting */
import selectors from '../../support/selectors'
import generateUniqueName from '../../support/utils'

const fixtures = {
companyName: 'Company Name',
companyId: '00.000.000/0001-00',
postalCode: '14055-010',
address: '13, Elm Street',
complement: 'Apt. 123'
}

describe('Account Settings spec', { tags: ['@dev', '@xfail'] }, () => {
beforeEach(() => {
cy.login()
cy.openProduct('Account Settings')

fixtures.companyName = generateUniqueName('companyName')
cy.wait(3000)
})

it('should update the billing email list successfully', () => {
// Arrange
const uniquePrefix = generateUniqueName('email')
const emails = `${uniquePrefix}@mail.com;${uniquePrefix}@example.com`

cy.get(selectors.accountSettings.billingEmails).clear()

// Act
cy.get(selectors.accountSettings.billingEmails).type(emails, { delay: 0 })

cy.get(selectors.accountSettings.submitButton).click()

// Assert
cy.verifyToast('success', 'Your account settings have been updated')
cy.openProduct('Account Settings')

cy.get(selectors.accountSettings.billingEmails).should('have.value', emails)
})
})
Loading
Loading