-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
592: Fix hubspot form build r=Strift a=Strift This PR: - Add default values for Hubspot form - Add a `prebuild` script that checks that the env are available - Bump version to create a new release Co-authored-by: Strift <[email protected]>
- Loading branch information
Showing
6 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Hubspot newsletter | ||
REACT_APP_HUBSPOT_PORTAL_ID=25945010 | ||
REACT_APP_HUBSPOT_FORM_GUID=991e2a09-77c2-4428-9242-ebf26bfc6c64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const WAITING_TIME = Cypress.env('waitingTime') | ||
|
||
describe(`Right side panel`, () => { | ||
beforeEach(() => { | ||
cy.saveApiTokenCookie() | ||
|
@@ -18,4 +20,13 @@ describe(`Right side panel`, () => { | |
cy.get('button[aria-label="Open Panel"]').click() | ||
cy.get('[data-testid="right-panel"]').should('be.visible') | ||
}) | ||
|
||
it('Should allow subscribing to the newsletter', () => { | ||
cy.get('input[placeholder="Enter your email"]').type('[email protected]') | ||
cy.get('button[aria-label="Subscribe"]').click() | ||
cy.wait(WAITING_TIME) | ||
cy.get('[data-testid="right-panel"]').within(() => { | ||
cy.get('p').should('contain', 'Thanks for subscribing!') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default '0.2.17' | ||
export default '0.2.18' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-disable no-console */ | ||
|
||
const requiredEnv = ['REACT_APP_API_URL', 'REACT_APP_ANOTHER_ENV_VAR'] | ||
|
||
const missingEnv = requiredEnv.filter((env) => !process.env[env]) | ||
|
||
if (missingEnv.length > 0) { | ||
console.error( | ||
`Missing required environment variables: ${missingEnv.join(', ')}` | ||
) | ||
process.exit(1) | ||
} | ||
console.log('All required environment variables are set.') |