Skip to content

Commit

Permalink
Merge branch 'development' into use-auth-sdk-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraluiz committed Jan 7, 2019
2 parents 8069549 + 5d6a99b commit 3e1181f
Show file tree
Hide file tree
Showing 31 changed files with 3,756 additions and 1,586 deletions.
46 changes: 23 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ module.exports = {

env: {
node: true,
jquery: true
jquery: true,
},

extends: [
'plugin:vue/essential',
'@vue/airbnb'
'@vue/airbnb',
],

rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'max-len': [
'error', { 'code': 120 }
'error', { code: 120 },
],
"no-param-reassign": [
"error",
'no-param-reassign': [
'error',
{
"props": true,
"ignorePropertyModificationsFor": [
"state",
"acc",
"e",
"ctx",
"req",
"request",
"res",
"response",
"$scope"
]
}
props: true,
ignorePropertyModificationsFor: [
'state',
'acc',
'e',
'ctx',
'req',
'request',
'res',
'response',
'$scope',
],
},
],

'graphql/template-strings': [
Expand All @@ -41,14 +41,14 @@ module.exports = {
env: 'literal',
schemaJson: require('./graphql.schema.json'),
},
]
],
},

parserOptions: {
parser: 'babel-eslint'
parser: 'babel-eslint',
},

plugins: [
'graphql'
]
};
'graphql',
],
};
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,22 @@ VUE_APP_CT_API_HOST=https://api.commercetools.co
```

This will set up the necessary environment variables required to run SUNRISE. Feel free to choose any other approach that best suits your needs.


## Run tests
The project has unit and end-to-end tests covering each functionality. Unit tests will run out of the box, but end-to-end tests require some further configuration, explained in the section below.

Test | with [Yarn](https://yarnpkg.com/) | with [NPM](https://www.npmjs.com/) |
------- | ---------------------------------- | ---------------------------------- |
Unit | `yarn test:unit` | `npm run test:unit` |
End-to-end | `yarn test:e2e` | `npm run test:e2e` |

### Configure end-to-end tests
In order to continue, it is necessary that you have full control over the commercetools project associated with SUNRISE.

Follow the same steps explained in the section [How to use your own project data](#how-to-use-your-own-project-data) to create a second API client, but this time create it with the `Admin client` template instead. Then add your new client ID and secret as the following environment variables (e.g. in `.env.local` file):

```shell
CYPRESS_CT_CLIENT_ID=<your client ID>
CYPRESS_CT_CLIENT_SECRET=<your client secret>
```
Loading

0 comments on commit 3e1181f

Please sign in to comment.