Skip to content

Commit

Permalink
Merge pull request #182 from PNKBizz/9.0
Browse files Browse the repository at this point in the history
9.0
  • Loading branch information
PNKBizz authored Nov 12, 2019
2 parents 972a8c0 + 43a8416 commit 44c6989
Show file tree
Hide file tree
Showing 28 changed files with 4,709 additions and 199 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
},
"extends": [
"plugin:vue/recommended",
"plugin:jest/recommended",
"@vue/airbnb"
],
"globals": {
Expand All @@ -18,12 +19,14 @@ module.exports = {
"no-param-reassign": 0,
"consistent-return": 0,
"no-plusplus": 0,
"prefer-destructuring": 0,
"vue/max-attributes-per-line": ['error', {
singleline: 4,
multiline: { max: 1, allowFirstLine: false },
}],
"vue/no-v-html": 0,
"vue/require-default-prop": 0
"vue/require-default-prop": 0,

},
"parserOptions": {
"parser": "babel-eslint"
Expand Down
19 changes: 8 additions & 11 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
const presets = [
[
"@babel/preset-env",
{
targets: "> 0.25%, not dead",
"modules": false
},
],
];

module.exports = { presets };
module.exports = {
"presets": [["@babel/preset-env", { "modules": false }]],
"env": {
"test": {
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]]
}
}
};
3 changes: 3 additions & 0 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"baseUrl": "http://localhost:8080"
}
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
42 changes: 42 additions & 0 deletions cypress/integration/tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
describe('Check functionality', () => {
it('maps should load', () => {
cy.visit('/');

cy.get('.passedMap1 input[value="loaded"]')
.should('be.checked');

cy.get('.passedMap2 input[value="loaded"]')
.should('be.checked');

cy.get('.passedMap3 input[value="loaded"]')
.should('be.checked');
});

it('markers should be edit', () => {
cy.get('#changeButton')
.click();

cy.get('.passedMap1 input[value="edited"]')
.should('be.checked');

cy.get('.passedMap2 input[value="edited"]')
.should('be.checked');

cy.get('.passedMap3 input[value="edited"]')
.should('be.checked');
});

it('markers should be delete', () => {
cy.get('#filterButton')
.click();

cy.get('.passedMap1 input[value="filtered"]')
.should('be.checked');

cy.get('.passedMap2 input[value="filtered"]')
.should('be.checked');

cy.get('.passedMap3 input[value="filtered"]')
.should('be.checked');
});
});
17 changes: 17 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
25 changes: 25 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
5 changes: 4 additions & 1 deletion docs/en/guide/Map.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The attributes `coords`, `placemarks` и `zoom` are observable. The map is react
| ----- | ----- |
| 'click' | [map event](https://tech.yandex.ru/maps/doc/jsapi/2.1/dg/concepts/events-docpage/) |
| 'map-was-initialized' | Link to [map instance](https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/reference/Map-docpage/) |
| 'markers-was-change' | Array of changed markers ids |
| 'markers-was-delete' | Array of deleted markers ids |

## Attributes

Expand All @@ -33,6 +35,7 @@ The attributes `coords`, `placemarks` и `zoom` are observable. The map is react
| use-object-manager | Boolean | Set `true` for use Object Manager. Used if there is huge count of markers on the map. *Default: false* |
| object-manager-clusterize | Boolean | Clustering with Object Manager. *Default: true* |
| ymap-class | String | Defines class for element, where rendering the map instance. If the attribute is not defined, the element uses style: `width: 100%; height: 100%;` |
| init-without-markers | Boolean | Set`false`for prevent init and render map if there are not markers on the map. Default: `true` |
| init-without-markers | Boolean | Set to `false` for prevent init and render map if there are no markers on the map. Default: `true` |
| show-all-markers | Boolean | Set to `true` to initialize map with all markers inside map bounds. Default: `false` |
| [options](https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/reference/Map-docpage/#Map__param-options) | Object | Map options. |

3 changes: 3 additions & 0 deletions docs/guide/Map.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
| ----- | ----- |
| 'click' | [map event](https://tech.yandex.ru/maps/doc/jsapi/2.1/dg/concepts/events-docpage/) |
| 'map-was-initialized' | Ссылка на [инстанс карты](https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/reference/Map-docpage/) |
| 'markers-was-change' | Массив идентификаторов измененных маркеров |
| 'markers-was-delete' | Массив идентификаторов удаленных маркеров |

## Attributes

Expand All @@ -34,4 +36,5 @@
| object-manager-clusterize | Boolean | Кластеризация при использовании Object Mananger. *Default: true* |
| ymap-class | String | Определяет класс для элемента, где рендерится инстанс карты. Если аттрибут не определен - элемент использует стиль: `width: 100%; height: 100%;` |
| init-without-markers | Boolean | Установите значение в `false`, чтобы карта не отображалась при отсутствии маркеров. Default: `true` |
| show-all-markers | Boolean | Установите значение в `true`, чтобы границы карты при инициализации вмещали все маркеры. Default: `false` |
| [options](https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/reference/Map-docpage/#Map__param-options) | Object | Опции карты |
33 changes: 33 additions & 0 deletions examples/Cypress/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/recommended",
"plugin:jest/recommended",
"@vue/airbnb"
],
"globals": {
"ymaps": "readonly"
},
"rules": {
"no-console": 0,
"import/no-unresolved": 0,
"import/extensions": 0,
"import/prefer-default-export": 0,
"no-param-reassign": 0,
"consistent-return": 0,
"no-plusplus": 0,
"prefer-destructuring": 0,
"vue/max-attributes-per-line": ['error', {
singleline: 4,
multiline: { max: 1, allowFirstLine: false },
}],
"vue/no-v-html": 0,
"vue/require-default-prop": 0,
},
"parserOptions": {
"parser": "babel-eslint"
}
}
21 changes: 21 additions & 0 deletions examples/Cypress/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
29 changes: 29 additions & 0 deletions examples/Cypress/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# cypress

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 5 additions & 0 deletions examples/Cypress/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
32 changes: 32 additions & 0 deletions examples/Cypress/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "cypress",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.3.2",
"vue": "^2.6.10"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",
"@vue/cli-plugin-eslint": "^4.0.0",
"@vue/cli-service": "^4.0.0",
"babel-eslint": "^10.0.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10"
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
Binary file added examples/Cypress/public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions examples/Cypress/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>cypress</title>
</head>
<body>
<noscript>
<strong>We're sorry but cypress doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
Loading

0 comments on commit 44c6989

Please sign in to comment.