Skip to content

Commit

Permalink
Merge pull request #27 from basiqio-oss/DX-583-starter-kit-add-analyt…
Browse files Browse the repository at this point in the history
…ics-on-the-av-starter-kit

DX-583 Add analytics on the AV starterKit
  • Loading branch information
basiq-ash authored Feb 12, 2024
2 parents 133bfd1 + 2a116fc commit 18659f5
Show file tree
Hide file tree
Showing 9 changed files with 1,287 additions and 204 deletions.
1 change: 0 additions & 1 deletion .env.sample

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
uses: actions/checkout@v3

- name: Cypress run
- uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v5
env:
BASIQ_API_KEY: ${{ secrets.BASIQ_API_KEY }}
with:
build: next build
build: yarn build
start: yarn run start
wait-on: http://localhost:3000
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useEffect } from 'react';
import { Analytics } from '@vercel/analytics/react';
import { useTernaryState } from '../../utils/useTernaryState';
import { ProgressBar } from '../ProgressBar';
import { AccountVerificationFormStep0SignUp } from './AccountVerificationFormStep0SignUp';
Expand Down Expand Up @@ -290,7 +291,7 @@ export function AccountVerificationForm() {
</defs>
</svg>
<div style={{position: "absolute", bottom: "10px", right: "left"}}>
&#9888; <strong>This is a Demo app.</strong>
&#9888; <strong>This is a demo app.</strong>
</div>
</div>

Expand All @@ -301,6 +302,7 @@ export function AccountVerificationForm() {
onConfirm={cancel}
cancelling={cancelling}
/>
<Analytics />
</>
);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { useState } from 'react';
import { useTernaryState } from '../../utils/useTernaryState';
import { Button } from '../Button';
Expand Down Expand Up @@ -194,4 +193,4 @@ export function AccountVerificationFormStep1PreConsent() {
</div>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function AccountVerificationFormStep3LoadingSteps() {

useEffect(() => {
const newJobId = new URLSearchParams(window.location.search).get("jobId");
//console.log(newJobId);
console.log(newJobId);
setJobId(newJobId);
}, [])

Expand Down
12 changes: 12 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:3000',
},
})
4 changes: 2 additions & 2 deletions cypress/integration/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Account verification form', () => {
cy.route('/api/**').as('api');
cy.route('https://au-api.basiq.io/**').as('basiqApi');
});

/*
it('Completes step 0 - SignUp', () => {
// Start from the "/account-verification" page
cy.visit('http://localhost:3000/account-verification');
Expand All @@ -26,7 +26,7 @@ describe('Account verification form', () => {
// Submit the form
cy.get('button[type="submit"]').click();
});
/*
it('Completes step 1 - PreConsent', () => {
// Check the step number
cy.get('[data-cy="current-step"]').contains('2');
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
},
"dependencies": {
"@headlessui/react": "^1.4.2",
"@vercel/analytics": "^1.1.3",
"axios": "^0.24.0",
"ms": "^2.1.3",
"next": "latest",
"qs": "^6.10.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hot-toast": "^2.1.1",
"react-use-form-state": "^0.13.2"
},
Expand Down
Loading

0 comments on commit 18659f5

Please sign in to comment.