Unverified Commit eafbb526 authored by Dmitriy Danilov's avatar Dmitriy Danilov Committed by GitHub
Browse files

Merge branch 'development' into fix-chronos-issue

parents 96ad6947 243d3b86
Showing with 854 additions and 540 deletions
+854 -540
Before opening an issue, please search for duplicates (opened and closed)
https://github.com/valor-software/ngx-bootstrap/issues
There's no need to open an issue here if you want to ask general question, use [StackOverflow](https://stackoverflow.com/questions/tagged/ngx-bootstrap) or [Slack](https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWQ5M2Y4OWM0OGJjNmZiOGYyNjFlZTdlOGI1YjcxYWQ2ODhiOTY4NzhiODgwMTIzNDczODIyNWNmM2RlYWRhNTg) instead
---
name: Bug Report!
about: Report a bug to help us fix it
title: ''
labels: bug
assignees: ''
---
Before opening an issue, please search for duplicates (opened and closed) https://github.com/valor-software/ngx-bootstrap/issues There's no need to open an issue here if you want to ask general question, use StackOverflow or Slack instead
Bug description:
Plunker/StackBlitz that reproduces the issue:
### Bug description or feature request:
### Plunker/StackBlitz that reproduces the issue:
Using Plunkr, StackBlitz is the best way to show your issue. Issues without link to an example of reproduction might be closed.
You can use one of starter templates:
......@@ -13,8 +22,7 @@ Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview
StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts
### Versions of ngx-bootstrap, Angular, and Bootstrap:
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap:
......@@ -22,4 +30,8 @@ Angular:
Bootstrap:
### Build system: Angular CLI, System.js, webpack, starter seed:
Build system: Angular CLI, System.js, webpack, starter seed:
**Expected behavior**
A clear and concise description of what you expected to happen.
---
name: Feature Request!
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
---
name: Something Else?
about: Use this to report something that you don't think fits in as a bug report or
a feature request!
title: ''
labels: ''
assignees: ''
---
**Description:**
......@@ -2,6 +2,9 @@ sudo: false
language: node_js
node_js: "10"
services:
- xvfb
notifications:
email: false
......@@ -17,7 +20,7 @@ env:
- BROWSER_PROVIDER_READY_FILE=/tmp/sauce-connect-ready
- LOGS_DIR=/tmp/logs
- CYPRESS_RECORD_KEY=4aa7a1c0-3a4f-444e-b324-6fc305a543a8
- NPM_AUTH_TOKEN_CI_PR=d05d9a8c-02db-413b-a412-aa27ab527213
- NPM_AUTH_TOKEN_CI_PR=$(./scripts/ci/npm-ci-key.sh)
# test cypress smoke
testSmokeCy: &testSmokeCy
......@@ -45,15 +48,17 @@ stages:
if: branch = development AND type = push OR tag =~ ^v\d+
before_install:
- sh -e /etc/init.d/xvfb start
- export NG_CLI_ANALYTICS=ci
- rm -rf node_modules/ngx-bootstrap
- sudo apt-get install libgconf-2-4
- npm install tslint
install:
- npm ci
- npm i ngx-bootstrap-ci@$TRAVIS_COMMIT
- npm run ci:rename-pkg
- if [[ "$NGV" == "latest" ]]; then ./scripts/ci/npm-ng-latest.sh; fi
- if [[ "$NGV" == "next" ]]; then ./scripts/ci/npm-ng-next.sh; fi
- npm i ngx-bootstrap-ci@$TRAVIS_COMMIT
- npm run ci:rename-pkg
- if [[ "$TRAVIS_PULL_REQUEST" != false ]]; then export SAUCE_USERNAME=$SAUCE_USERNAME_PR; export SAUCE_ACCESS_KEY=$SAUCE_ACCESS_KEY_PR; export NPM_AUTH_TOKEN_CI=$NPM_AUTH_TOKEN_CI_PR; fi
jobs:
......@@ -98,6 +103,9 @@ jobs:
- script: npm run test-coverage
name: "Test with current Angular version"
after_success: ./node_modules/.bin/codecov
- script: ng test --configuration ivy && tsc -p schematics/tsconfig.json && npm run test:schematics
name: "Test with current Angular version Ivy:enabled"
env: NGV=ivy
- script: ng test && tsc -p schematics/tsconfig.json && npm run test:schematics
name: "Test with latest Angular version"
env: NGV=latest
......@@ -112,6 +120,9 @@ jobs:
<<: *testSmokeCy
- script: npm run demo.ng-build
name: "Check prod build with current Angular version"
- script: npm run demo.ng-build:ivy
name: "Check prod build with current version Ivy:enabled"
env: NGV=ivy
- script: npm run demo.ng-build
name: "Check prod build with latest Angular version"
env: NGV=latest
......@@ -132,15 +143,22 @@ jobs:
- npm config set '//registry.npmjs.org/:_authToken' $NPM_AUTH_TOKEN_CI
- if [[ "$TRAVIS_PULL_REQUEST" != false ]]; then npm unpublish --tag $TRAVIS_COMMIT --force; fi
# deploy to ngx-bootstrap.surge.sh
- &surge
stage: deploy
script: npm run demo.build
script:
- if [[ "$NGV" == "ivy" ]]; then npm run demo.build:ivy; else npm run demo.build; fi
deploy:
provider: surge
project: ./gh-pages/
domain: ngx-bootstrap.surge.sh
on: development
- <<: *surge
env: NGV=ivy
deploy:
provider: surge
project: ./gh-pages/
domain: ngx-bootstrap-ivy.surge.sh
on: development
- <<: *surge
env: NGV=latest
deploy:
......
This diff is collapsed.
......@@ -50,18 +50,18 @@ and help you to craft the change so that it is successfully accepted into the pr
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using [plunker]. Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. To reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using [plunker]. Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:
- version of Angular used
- the version of Angular used
- version on ngx-bootstrap used
- build system: angular cli, system.js, starter seed used
- and most importantly - a use-case that fails
A minimal reproduce scenario using [plunker] allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. If plunker is not a suitable way to demonstrate the problem (for example for issues related to our npm packaging), please create a standalone git repository demonstrating the problem.
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
We will be insisting on a minimal reproduce scenario to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
You can file new issues by filling out our [new issue form](https://github.com/valor-software/ngx-bootstrap/issues/new).
......@@ -88,7 +88,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
```shell
git commit -a
```
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
Note: the optional commit `-a` command-line option will automatically "add" and "rm" edited files.
* Push your branch to GitHub:
......@@ -163,7 +163,7 @@ The **header** is mandatory and the **scope** of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
Samples: (even more [samples](https://github.com/valor-software/ngx-bootstrap/commits/development))
......@@ -177,7 +177,7 @@ The version in our package.json gets copied to the one we publish, and users nee
```
### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
Must be one of the following:
......@@ -219,18 +219,18 @@ The following is the list of supported scopes:
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* don't capitalize the first letter
* no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
The body should include the motivation for the change and contrast this with previous behaviour.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with space or two newlines. The rest of the commit message is then used for this.
A detailed explanation can be found in this [document][commit-message-format].
......@@ -243,7 +243,7 @@ This `CONTRIBUTING.md` is adapted from the Angular's `CONTRIBUTING.md`, availabl
[coc]: https://github.com/valor-software/ngx-bootstrap/blob/development/CODE_OF_CONDUCT.md
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[github]: https://github.com/valor-software/ngx-bootstrap
[slack]: https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWQ5M2Y4OWM0OGJjNmZiOGYyNjFlZTdlOGI1YjcxYWQ2ODhiOTY4NzhiODgwMTIzNDczODIyNWNmM2RlYWRhNTg
[slack]: https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWVjZGU2MjI4MTVhMGVlMTc2OWRiMzA0NzBhNDU5YzQ0MDM3MWI5NzJjZTUzNzIxZmNjYmFlMjU2MzE0YmY0NWY
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
[plunker]: http://plnkr.co/edit
[stackoverflow]: http://stackoverflow.com/questions/tagged/ngx-bootstrap
......
<a href="http://valor-software.com/ngx-bootstrap/#/">
<h1 align="center">ngx-bootstrap</h1>
</a>
Server side rendered version of this documentation available
<a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and <a href="https://nestjs.com">nest.js</a>
<p align="center">
Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a> or <a href="https://getbootstrap.com/docs/4.0">Bootstrap 4</a> Components with <a href="https://angular.io/">Angular</a>
......@@ -10,17 +12,18 @@ Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a
<a href="https://badge.fury.io/js/ngx-bootstrap"><img src="https://badge.fury.io/js/ngx-bootstrap.svg" alt="npm version" ></a>
<a href="https://npmjs.org/ngx-bootstrap"><img src="https://img.shields.io/npm/dm/ngx-bootstrap.svg" alt="npm downloads" ></a>
<a href="https://travis-ci.org/valor-software/ngx-bootstrap"><img alt="" src="https://travis-ci.org/valor-software/ngx-bootstrap.svg?branch=development"></a>
<a target="_blank" href="https://opencollective.com/ngx-bootstrap"><img src="https://opencollective.com/ngx-bootstrap/tiers/backer/badge.svg?label=backer&color=brightgreen" />
<a target="_blank" href="https://opencollective.com/ngx-bootstrap"><img src="https://opencollective.com/ngx-bootstrap/tiers/backer/badge.svg?label=backer&color=brightgreen" /></a>
<br/>
<a href="https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWQ5M2Y4OWM0OGJjNmZiOGYyNjFlZTdlOGI1YjcxYWQ2ODhiOTY4NzhiODgwMTIzNDczODIyNWNmM2RlYWRhNTg"><img src="https://a.slack-edge.com/66f9/img/icons/ios-256.png" width="25" height="25" alt="slack" ></a>
<a href="https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWVjZGU2MjI4MTVhMGVlMTc2OWRiMzA0NzBhNDU5YzQ0MDM3MWI5NzJjZTUzNzIxZmNjYmFlMjU2MzE0YmY0NWY"><img src="https://thehomeofthefuture.files.wordpress.com/2018/12/Joinslack.png" width="20%" alt="slack" ></a>
</p>
## Links
- [Documentation](http://valor-software.com/ngx-bootstrap/)
- [Release Notes](https://github.com/valor-software/ngx-bootstrap/blob/development/CHANGELOG.md)
- [Slack Community](https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWQ5M2Y4OWM0OGJjNmZiOGYyNjFlZTdlOGI1YjcxYWQ2ODhiOTY4NzhiODgwMTIzNDczODIyNWNmM2RlYWRhNTg)
- [Slack Community](https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWVjZGU2MjI4MTVhMGVlMTc2OWRiMzA0NzBhNDU5YzQ0MDM3MWI5NzJjZTUzNzIxZmNjYmFlMjU2MzE0YmY0NWY)
<!-- [![codecov](https://codecov.io/gh/valor-software/ngx-bootstrap/branch/development/graph/badge.svg)](https://codecov.io/gh/valor-software/ngx-bootstrap) -->
......@@ -35,16 +38,17 @@ Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a
3. [Installation instructions](#installation-instructions)
4. [Usage & Demo](#usage--demo)
5. [API](#api)
6. [Troubleshooting](#troubleshooting)
7. [Contributing](#contribution)
6. [Compatibility](#compatibility)
7. [Troubleshooting](#troubleshooting)
8. [Contributing](#contribution)
## Getting Started
ngx-bootstrap contains all core (and not only) Bootstrap components powered by Angular. So you don't need to include original JS components, but we are using markup and css provided by Bootstrap.
ngx-bootstrap contains all core (and not only) Bootstrap components powered by Angular. So you don't need to include original JS components, but we are using markup and CSS provided by Bootstrap.
## Supporting NGX-Bootstrap
ngx-bootstrap is an Open Source (MIT Licensed) project, it's an independent project with ongoing development made possible thanks to the support of our awesome backers.
If you also would like to show support or simply give back to Open Source community, please consider becoming a backer sponsor of [ngx-bootstrap on OpenCollective](https://opencollective.com/ngx-bootstrap)
If you also would like to show support or simply give back to Open Source community, please consider becoming a backer sponsor of [ngx-bootstrap on OpenCollective](https://opencollective.com/ngx-bootstrap).
All donated funds are managed transparently on OpenCollective and will be used solely for compensating work and expenses for contributors. Valor Software employees and contractors are not eligible to use these funds.
......@@ -90,11 +94,12 @@ You will need bootstrap styles:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
```
##### Method 2
Use the Angular CLI ng add command for updating your Angular project
Use the Angular CLI ng add command for updating your Angular project.
```bash
ng add ngx-bootstrap
```
OR use `ng add` to add needed component (for example tooltip)
Or use `ng add` to add needed component (for example tooltip).
```bash
ng add ngx-bootstrap --component tooltip
```
......@@ -106,7 +111,7 @@ Add component to your page:
</button>
```
### Setting up the bootstrap version manually
Sometimes, your project might contain some library that could interfear with the bootstrap framework, or you might have a customized version of bootstrap. The consequence is that the process of determining bootstrap version might be failed, which can break the UI. In that case, we can still set the bootstrap version manually in the boostraping component (i.e. `AppComonent`):
Sometimes, your project might contain some library that could interfere with the bootstrap framework, or you might have a customized version of bootstrap. The consequence is that the process of determining bootstrap version might be failed, which can break the UI. In that case, we can still set the bootstrap version manually in the bootstrapping component (i.e. `AppComponent`):
```
import { setTheme } from 'ngx-bootstrap/utils';
......@@ -122,15 +127,15 @@ export class AppComponent {
## Usage & Demo
Main source of API documentation and usage scenarios available here:
[https://valor-software.com/ngx-bootstrap/](https://valor-software.com/ngx-bootstrap/)
[https://valor-software.com/ngx-bootstrap/](https://valor-software.com/ngx-bootstrap/).
Additionally you can find demos and docs deployed from latest code with <a href="https://ngx-bootstrap.surge.sh/">angular@latest</a> and <a
href="https://ngx-bootstrap-latest.surge.sh/">angular@next</a>
href="https://ngx-bootstrap-latest.surge.sh/">angular@next</a>.
Server side rendered version of this documentation available <a href="https://ngx-universal.herokuapp.com/">here</a> served with Anguar universal and [nest.js](https://nestjs.com/)
Server side rendered version of this documentation available <a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and [nest.js](https://nestjs.com/).
## API
Check demo page for API [reference](https://valor-software.com/ngx-bootstrap/)
Check demo page for API [reference](https://valor-software.com/ngx-bootstrap/).
### How to use it with:
- `Bootstrap and angular-cli` please refer to [using-with-bootstrap-and-angular-cli](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/bootstrap.md)
......@@ -163,32 +168,46 @@ For local development run:
If you want to run the demo with Angular Universal:
- `npm run demo.serve-universal`
## Compatibility
The only two dependencies are [Angular](https://angular.io) and [Bootstrap](https://getbootstrap.com) CSS.
Here is the versions compatibility list:
| ngx-bootstrap | Angular | Bootstrap CSS |
| ------------- | ------------- | -------------- |
| 5.x.x | 7.x.x - 8.x.x | 3.x.x or 4.x.x |
| 4.x.x | 6.x.x - 7.x.x | 3.x.x or 4.x.x |
| 3.x.x | 6.x.x - 7.x.x | 3.x.x or 4.x.x |
| 2.x.x | 2.x.x - 4.x.x | 3.x.x or 4.x.x |
| 1.x.x | 2.x.x | 3.x.x or 4.x.x |
## Troubleshooting
So if you are in trouble, here's where you can look for help.
The best place to ask questions is on [StackOverflow (under the `ngx-bootstrap` tag)](https://stackoverflow.com/questions/tagged/ngx-bootstrap)
You can also join [our Slack channel](https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWQ5M2Y4OWM0OGJjNmZiOGYyNjFlZTdlOGI1YjcxYWQ2ODhiOTY4NzhiODgwMTIzNDczODIyNWNmM2RlYWRhNTg) and link your stackoverflow question there. But try to avoid asking generic help questions directly on Slack since they can easily get lost in the chat. You can also [search among the existing GitHub issues](https://github.com/valor-software/ngx-bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue).
You can also join [our Slack channel](https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWVjZGU2MjI4MTVhMGVlMTc2OWRiMzA0NzBhNDU5YzQ0MDM3MWI5NzJjZTUzNzIxZmNjYmFlMjU2MzE0YmY0NWY) and link your stackoverflow question there. But try to avoid asking generic help questions directly on Slack since they can easily get lost in the chat. You can also [search among the existing GitHub issues](https://github.com/valor-software/ngx-bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue).
If, **and only if**, none of the above helped, please open a [new issue](https://github.com/valor-software/ngx-bootstrap/issues/new).
## Contribution
Are very welcome! And remember, contribution is not only PRs and code, but any help with docs or helping other developers to solve issues are very appreciated! Thanks in advance!
All contributions very welcome! And remember, contribution is not only PRs and code, but any help with docs or helping other developers to solve issues are very appreciated! Thanks in advance!
Please read our [contribution guidelines](https://github.com/valor-software/ngx-bootstrap/blob/development/CONTRIBUTING.md).
### If you need more modules check [here](https://github.com/valor-software/ng2-plans)
### If you need more modules, check [here](https://github.com/valor-software/ng2-plans)
Please read central `ngx` modules [readme](https://github.com/valor-software/ng2-plans) for details, plans and approach
Please read central `ngx` modules [readme](https://github.com/valor-software/ng2-plans) for details, plans and approach.
### Credits
Crossbrowser testing sponsored by [Saucelabs](https://saucelabs.com/)
[<img src="https://saucelabs.com/content/images/circle-logo@2x.png" alt="Saucelabs" width="31" height="31">](https://saucelabs.com/)
[<img src="https://avatars2.githubusercontent.com/u/88837?s=200&v=4" alt="Saucelabs" width="31" height="31">](https://saucelabs.com/)
End-to-end testing sponsored by [Cypress](https://www.cypress.io/)
[<img src="https://www.cypress.io/img/favicon.ico" alt="Cypress" width="31" height="31">](https://www.cypress.io/)
[<img src="https://raw.githubusercontent.com/cypress-io/cypress-icons/master/src/favicon/favicon.ico" alt="Cypress" width="31" height="31">](https://www.cypress.io/)
### License
MIT
[MIT](https://github.com/valor-software/ngx-bootstrap/blob/development/LICENSE)
......@@ -15,6 +15,7 @@
"index": "demo/src/index.html",
"main": "demo/src/main.ts",
"tsConfig": "demo/src/tsconfig.json",
"aot": true,
"polyfills": "demo/src/polyfills.ts",
"assets": [
"demo/src/assets"
......@@ -45,6 +46,25 @@
}
]
},
"ivy": {
"preserveSymlinks": true,
"optimization": true,
"outputHashing": "all",
"tsConfig": "demo/src/tsconfig-ivy.json",
"sourceMap": false,
"extractCss": true,
"namedChunks": true,
"aot": true,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "demo/src/environments/environment.ts",
"with": "demo/src/environments/environment.prod.ts"
}
]
},
"server": {
"preserveSymlinks": true,
"optimization": true,
......@@ -76,6 +96,9 @@
},
"server": {
"browserTarget": "ngx-bootstrap:build:server"
},
"ivy": {
"browserTarget": "ngx-bootstrap:build:ivy"
}
}
},
......@@ -103,6 +126,11 @@
"assets": [
"demo/src/assets"
]
},
"configurations": {
"ivy": {
"tsConfig": "src/tsconfig-ivy.spec.json"
}
}
},
"lint": {
......
......@@ -3,5 +3,6 @@
"video": false,
"projectId": "5mm2dy",
"responseTimeout": 60000,
"pageLoadTimeout": 120000,
"ignoreTestFiles": ["**/plugins/**.js", "**/support/**", "**/tsconfig.json"]
}
......@@ -118,29 +118,30 @@ describe('Carousel page test suite', () => {
describe('Pause on hover ', () => {
const pauseOnHoverSlides = carousel.exampleDemosArr.pauseOnHover;
it('example contains carousel component with slides, arrows and "Toggle pause on hover" button', () => {
it('example contains carousel component with slides, arrows', () => {
carousel.scrollToMenu('Pause on hover');
carousel.isCarouselHaveIndicatorsItemsCtrls(pauseOnHoverSlides);
carousel.isEachSlideHave(pauseOnHoverSlides, ['.item', '.carousel-caption', 'h3']);
carousel.isBtnTxtEqual(pauseOnHoverSlides, 'Toggle pause on hover ');
});
it('when user click on "Toggle pause on hover" and hover slide - then after 5 sec slide stay opened', () => {
it('when user hover slide - then after 5 sec slide stay opened', () => {
carousel.scrollToMenu('Pause on hover');
carousel.clickOnBtn(pauseOnHoverSlides);
carousel.hoverSlide(pauseOnHoverSlides, 1);
carousel.isCarouselItemActive(pauseOnHoverSlides, 0);
cy.tick(6000);
carousel.isCarouselItemActive(pauseOnHoverSlides, 0);
});
it('when user click on "Toggle pause on hover" again, hover slide - then after 5 sec slide changed', () => {
it('when user hover slide then move mouse out - then after 5 sec slide changed', () => {
carousel.scrollToMenu('Pause on hover');
carousel.dblClickOnBtn(pauseOnHoverSlides);
carousel.hoverSlide(pauseOnHoverSlides, 1);
carousel.isCarouselItemActive(pauseOnHoverSlides, 0);
cy.tick(6000);
carousel.isCarouselItemActive(pauseOnHoverSlides, 0);
carousel.mouseLeave(pauseOnHoverSlides);
cy.tick(6000);
carousel.isCarouselItemActive(pauseOnHoverSlides, 1);
});
});
......
......@@ -18,9 +18,9 @@ describe('Datepicker demo test suite: Custom date format', () => {
"YYYY-MM-DD", "MM/DD/YYYY", "MMMM Do YYYY,h:mm:ss a"`, () => {
const dayToChose = currentDay < 10 ? `0${currentDay}` : currentDay;
const monthToChose = currentMonthNum + 1 < 10 ? `0${currentMonthNum + 1}` : currentMonthNum + 1;
datepicker.isInputHaveAttrs(customFormat, [{ attr: 'formcontrolname', value: 'myDateYMD' }], 0);
datepicker.isInputHaveAttrs(customFormat, [{ attr: 'formcontrolname', value: 'myDateMDY' }], 1);
datepicker.isInputHaveAttrs(customFormat, [{ attr: 'formcontrolname', value: 'myDateFull' }], 2);
datepicker.isInputHaveAttrs(customFormat, [{ attr: 'formcontrolname', value: 'dateYMD' }], 0);
datepicker.isInputHaveAttrs(customFormat, [{ attr: 'formcontrolname', value: 'dateMDY' }], 1);
datepicker.isInputHaveAttrs(customFormat, [{ attr: 'formcontrolname', value: 'dateFull' }], 2);
datepicker.isButtonExist(customFormat, 'Date Picker', 0);
datepicker.isButtonExist(customFormat, 'Date Picker', 1);
datepicker.isButtonExist(customFormat, 'Date Picker', 2);
......
......@@ -7,7 +7,7 @@ describe('Datepicker demo test suite: Inline Datepicker', () => {
beforeEach(() => {
datepicker.navigateTo();
datepicker.scrollToMenu('Inline Datepicker');
datepicker.scrollToMenu('Inline');
});
it(`example contains Datepicker with selected date (Today)`, () => {
......
......@@ -58,7 +58,7 @@ describe('Datepicker demo test suite: Select week', () => {
datepicker.clickOnDatepickerWeekItem(3);
datepicker.isDatepickerOpened(false);
datepicker.isInputValueContain(selectWeek,
`${new Date().getMonth() === 0 ? 12 : new Date().getMonth() - 1}`, 1);
`${new Date().getMonth() === 0 ? 12 : new Date().getMonth()}`, 1);
datepicker.isInputValueContain(selectWeek,
`${new Date().getMonth() === 0 ? new Date().getFullYear() - 1 : new Date().getFullYear()}`, 1);
});
......@@ -70,7 +70,7 @@ describe('Datepicker demo test suite: Select week', () => {
datepicker.clickOnDatepickerWeekItem(3);
datepicker.isDatepickerOpened(false);
datepicker.isInputValueContain(selectWeek,
`${new Date().getMonth() === 0 ? 12 : new Date().getMonth() - 1}`, 1);
`${new Date().getMonth() === 0 ? 12 : new Date().getMonth()}`, 1);
datepicker.isInputValueContain(selectWeek,
`${new Date().getMonth() === 0 ? new Date().getFullYear() - 1 : new Date().getFullYear()}`, 1);
datepicker.clickOnDatepickerInput(selectWeek, 1);
......@@ -103,7 +103,7 @@ describe('Datepicker demo test suite: Select week', () => {
datepicker.isDatepickerOpened(true);
datepicker.clickOnDatepickerWeekItem(3);
datepicker.isDatepickerOpened(false);
datepicker.isInputValueContain(selectWeek, `${new Date().getMonth()}`, 2);
datepicker.isInputValueContain(selectWeek, `${new Date().getMonth() + 1}`, 2);
datepicker.isInputValueContain(selectWeek, `${new Date().getFullYear()}`, 2);
datepicker.clickOnDatepickerInput(selectWeek, 2);
datepicker.isDatepickerOpened(true);
......
......@@ -322,7 +322,7 @@ describe('Pagination demo page test suite', () => {
pagination.isActivePositionEqual(centeringPageLink, '1');
pagination.isPagerDisabled(centeringPageLink, 'Previous', true);
pagination.isPagerDisabled(centeringPageLink, 'Next', false);
pagination.isButtonExist(centeringPageLink, 'Toggle centering current page link');
pagination.isButtonExist(centeringPageLink, 'Current page link center is ON');
});
it('when user clicks on 5th, then active page - 5 and it centered, maximum count of pages - 5', () => {
......@@ -358,7 +358,7 @@ describe('Pagination demo page test suite', () => {
it('when user clicks on 6, "Toggle centering" and "Next", then "last/first" - appeared, like "..."', () => {
pagination.clickOnPage(centeringPageLink, '5');
pagination.clickOnPage(centeringPageLink, '6');
pagination.clickOnPaginationBtn(centeringPageLink, 'Toggle centering current page link');
pagination.clickOnPaginationBtn(centeringPageLink, 'Current page link center is ON');
pagination.clickOnPager(centeringPageLink, 'Next');
pagination.isPaginationLengthEqual(centeringPageLink, 7);
pagination.isActivePositionEqual(centeringPageLink, '7');
......
......@@ -360,4 +360,24 @@ describe('Popover demo page test suite', () => {
popover.isPopoverDismiss(popoverContext);
});
});
describe('Popover with delay', () => {
const delayPopover = popover.exampleDemosArr.delayPopover;
it('when user clicks on "Popover with 0.5sec delay", then popover-container appear', () => {
cy.viewport(1440, 900);
popover.clickOnDemoMenu('Popover with delay');
popover.clickOnBtn(delayPopover);
popover.isPopoverAppears(delayPopover);
popover.isPopoverVisible(delayPopover);
});
it('when user clicks on "Popover with 0.5sec delay" again, then popover-container disappeared', () => {
cy.viewport(1440, 900);
popover.clickOnDemoMenu('Popover with delay');
popover.clickOnBtn(delayPopover);
popover.isPopoverAppears(delayPopover);
popover.clickOnBtn(delayPopover);
popover.isPopoverDismiss(delayPopover);
});
});
});
......@@ -35,12 +35,13 @@ export class AccordionPo extends BaseComponent {
clickOnAccordionGroup(baseSelector: string, itemIndex: number) {
cy.get(`${baseSelector} accordion-group button`)
.eq(itemIndex)
.click();
.click()
.wait(500);
}
isItemContentVisible(baseSelector: string, itemIndex: number, visible: boolean) {
cy.get(`${baseSelector} .panel-body`)
.eq(itemIndex)
.eq(itemIndex, {timeout: 10000})
.should(visible ? 'be.visible' : 'not.be.visible');
}
......
......@@ -31,7 +31,7 @@ export abstract class BaseComponent {
isBtnTxtEqual(baseSelector: string, expectedBtnTxt: string, buttonIndex?: number) {
cy.get(`${ baseSelector } button`).eq(buttonIndex ? buttonIndex : 0).invoke('text')
.should(btnTxt => expect(btnTxt).to.equal(expectedBtnTxt));
.should(btnTxt => expect(btnTxt.trim()).to.equal(expectedBtnTxt.trim()));
}
isBtnDisabled(baseSelector: string, disabled: boolean, buttonIndex = 0) {
......@@ -123,7 +123,7 @@ export abstract class BaseComponent {
isButtonExist(baseSelector: string, buttonName: string, buttonNumber?: number, exist = true) {
if (exist === true) {
cy.get(`${baseSelector} button`).eq(buttonNumber ? buttonNumber : 0).invoke('text')
.should(btnTxt => expect(btnTxt).to.equal(buttonName));
.should(btnTxt => expect(btnTxt.trim()).to.equal(buttonName.trim()));
} else {
cy.get(`${baseSelector} button`).contains(buttonName).should('not.exist');
}
......
......@@ -16,7 +16,7 @@ export class CarouselPo extends BaseComponent {
optionalCaptions: 'demo-carousel-captions',
configuringDefaults: 'demo-carousel-config',
dynamicSlides: 'demo-carousel-dynamic',
pauseOnHover: 'demo-carousel-no-pause',
pauseOnHover: 'demo-carousel-pause-on-hover',
customContent: 'demo-carousel-custom-content',
disableLooping: 'demo-carousel-disable-looping',
disableIndicator: 'demo-carousel-disable-indicator',
......@@ -73,6 +73,10 @@ export class CarouselPo extends BaseComponent {
cy.get(`${baseSelector} ${this.carouselClass} div`).eq(slideIndex).trigger('mouseenter');
}
mouseLeave(baseSelector: string) {
cy.get(`${baseSelector} ${this.carouselClass}`).trigger('mouseleave');
}
isCarouselIndicatorDisabled(baseSelector: string, disabled: boolean) {
cy.get(`${baseSelector} ${this.carouselClass}`)
.should(disabled ? 'to.not.have.descendants' : 'to.have.descendants', this.indicatorClass)
......
......@@ -23,7 +23,7 @@ export class LandingPo extends BaseComponent {
stackoverflowUrl = 'https://stackoverflow.com/questions/tagged/ngx-bootstrap';
githubUrl = 'https://github.com/valor-software/ngx-bootstrap';
slackUrl = 'https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWQ5M2Y4OWM0OGJjNmZiOGYyNjFlZTdlOGI1YjcxYWQ2ODhiOTY4NzhiODgwMTIzNDczODIyNWNmM2RlYWRhNTg';
slackUrl = 'https://join.slack.com/t/ngx-home/shared_invite/enQtNTExMTY5MzcwMTM0LWVjZGU2MjI4MTVhMGVlMTc2OWRiMzA0NzBhNDU5YzQ0MDM3MWI5NzJjZTUzNzIxZmNjYmFlMjU2MzE0YmY0NWY';
teamUrl = 'https://github.com/valor-software';
contributorsUrl = 'https://github.com/valor-software/ngx-bootstrap/graphs/contributors';
......
......@@ -25,7 +25,8 @@ export class PopoverPo extends BaseComponent {
triggerIsOpen: 'demo-popover-trigger-by-isopen',
componentLevelStyling: 'demo-popover-styling-local',
customClass: 'demo-popover-class',
popoverContext: 'demo-popover-context'
popoverContext: 'demo-popover-context',
delayPopover: 'demo-popover-delay'
};
isPopoverPlacementCorrect(baseSelector: string, placement: string) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment