Skip to content

Commit

Permalink
Merge branch 'develop' into feature/bulk-code-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Jun 2, 2022
2 parents e6f1466 + 6932246 commit eeb1ee5
Show file tree
Hide file tree
Showing 94 changed files with 28,332 additions and 29,707 deletions.
6 changes: 2 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"presets": [
"next/babel"
]
}
"presets": ["next/babel"]
}
3 changes: 0 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
## Development Defaults
## Used by `next dev` or `npm run dev`
## Overridded by the ones set in Vercel

## For running development builds on local use - `.env.development.local`

## `.env.development` stays in git with default or empty values

API_ENDPOINT=app-development.plant-for-the-planet.org
AUTH0_CUSTOM_DOMAIN=pftp.eu.auth0.com
AUTH0_CLIENT_ID=yxABVrSIbmSO6QeTfZjkJefDnW2vrE7y
Expand Down
26 changes: 20 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
env: {
node: true,
browser: true,
es2020: true,
},
Expand All @@ -19,15 +20,15 @@ module.exports = {
ecmaVersion: 11,
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
],
plugins: ['react', '@typescript-eslint', '@emotion', 'cypress'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/jsx-props-no-spreading': 'off',
'no-use-before-define': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.tsx'] }],
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.tsx'] },
],
'react/jsx-indent': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
Expand All @@ -37,9 +38,22 @@ module.exports = {
'@typescript-eslint/no-empty-function': 'off',
'no-empty-pattern': 'off',
'react/display-name': 'off',
'react/no-find-dom-node': 'off'
'react/no-find-dom-node': 'off',
'@emotion/jsx-import': 'error',
'@emotion/no-vanilla': 'error',
'@emotion/import-from-emotion': 'error',
'@emotion/styled-import': 'error',
'@typescript-eslint/no-var-requires': 0,
'react/prop-types': 'off',
'cypress/no-assigning-return-values': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/assertion-before-screenshot': 'warn',
'cypress/no-force': 'warn',
'cypress/no-async-tests': 'error',
'cypress/no-pause': 'error',
},
globals: {
React: 'writable',
cy: true,
},
};
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false
}
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

107 changes: 54 additions & 53 deletions cypress/integration/donations.spec.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,61 @@
/// <reference types="cypress" />

describe(("Donations"),() => {
it("Basic Donations",()=> {
cy.BasicDonation()
cy.cardPayment("4242424242424242", "424", "242")
})

it("Gift Donation", () => {
cy.giftDonation()
cy.cardPayment("4242424242424242", "424", "242")
})

// This test does not work in all enviroments as language is auto detected
// and "Germany" cannot be found in other languages then English.
//
// This also fails for other reasons:
// `cy.click()` failed because the center of this element is hidden from view
/*
import cy from 'cypress';

describe('Donations', () => {
it('Basic Donations', () => {
cy.BasicDonation();
cy.cardPayment('4242424242424242', '424', '242');
});

it('Gift Donation', () => {
cy.giftDonation();
cy.cardPayment('4242424242424242', '424', '242');
});

// This test does not work in all enviroments as language is auto detected
// and "Germany" cannot be found in other languages then English.
//
// This also fails for other reasons:
// `cy.click()` failed because the center of this element is hidden from view
/*
it("Change currency and custom tree donation", () => {
cy.customTreeDonation()
cy.cardPayment("4242424242424242", "424", "242")
})
*/

it("Multiple Donations", () => {
cy.multipleDonation()
cy.cardPayment("4242424242424242", "424", "242")
})

// International Cards
it("Testing with Germany Visa", () => {
cy.BasicDonation()
cy.cardPayment("4000002760000016", "424", "242")
});

it("Testing with Spain Visa", () => {
cy.spainDonation()
cy.cardPayment("4000007240000007", "424", "242")
});

// error testing
it("Testing with Charge declined error", () => {
cy.BasicDonation()
cy.paymentError("4000000000000002", "424", "242")
});
it("Testing with Insufficient funds error", () => {
cy.BasicDonation()
cy.paymentError("4000000000009995", "424", "242")
});
it("Testing with CVC fails", () => {
cy.BasicDonation()
cy.paymentError("4000000000000101", "424", "242")
});

it("Gift Removal using Search bar", () => {
cy.giftRemove()
cy.cardPayment("4242424242424242", "424", "242")
})
})
it('Multiple Donations', () => {
cy.multipleDonation();
cy.cardPayment('4242424242424242', '424', '242');
});

// International Cards
it('Testing with Germany Visa', () => {
cy.BasicDonation();
cy.cardPayment('4000002760000016', '424', '242');
});

it('Testing with Spain Visa', () => {
cy.spainDonation();
cy.cardPayment('4000007240000007', '424', '242');
});

// error testing
it('Testing with Charge declined error', () => {
cy.BasicDonation();
cy.paymentError('4000000000000002', '424', '242');
});
it('Testing with Insufficient funds error', () => {
cy.BasicDonation();
cy.paymentError('4000000000009995', '424', '242');
});
it('Testing with CVC fails', () => {
cy.BasicDonation();
cy.paymentError('4000000000000101', '424', '242');
});

it('Gift Removal using Search bar', () => {
cy.giftRemove();
cy.cardPayment('4242424242424242', '424', '242');
});
});
Loading

0 comments on commit eeb1ee5

Please sign in to comment.