Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): add full e2e coverage for Popover component #5001

Merged

Conversation

dmitry-zhemchugov
Copy link
Contributor

PR Checklist

Before creating new PR, please take a look at checklist below to make sure that you've done everything that needs to be done before we can merge it.

  • read and followed the CONTRIBUTING.md guide.
  • built and tested the changes locally.
  • added/updated tests.
  • added/updated API documentation.
  • added/updated demos.

@ghost ghost added the needs review label Jan 10, 2019
@codecov
Copy link

codecov bot commented Jan 10, 2019

Codecov Report

Merging #5001 into development will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5001      +/-   ##
===============================================
+ Coverage        74.79%   74.81%   +0.01%     
===============================================
  Files              277      277              
  Lines             8436     8436              
  Branches          1603     1603              
===============================================
+ Hits              6310     6311       +1     
+ Misses            1680     1677       -3     
- Partials           446      448       +2
Impacted Files Coverage Δ
src/chronos/i18n/it.ts 71.42% <0%> (-28.58%) ⬇️
src/chronos/i18n/uk.ts 78.04% <0%> (-2.44%) ⬇️
src/chronos/i18n/cs.ts 86.44% <0%> (+1.69%) ⬆️
src/chronos/i18n/sk.ts 82.97% <0%> (+2.12%) ⬆️
src/chronos/i18n/pl.ts 74.35% <0%> (+5.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac55b08...a34bfd5. Read the comment docs.

@ludmilanesvitiy
Copy link
Contributor

ludmilanesvitiy commented Jan 11, 2019

@dmitry-zhemchugov All PR labels, reviewers, assignees should be similar to #4871


describe('Placement popover', () => {

const basic = popover.exampleDemosArr.placement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

placementDemo

@@ -55,6 +55,18 @@ export abstract class BaseComponent {
cy.get(`${ baseSelector } input`).eq(inputIndex ? inputIndex : 0).dblclick();
}

typeOnInput(baseSelector: string, forInput: string, inputIndex?: number) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as clearInputAndSendKeys method, in this class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to remove it

dynamicHtml: 'demo-popover-dynamic-html',
appendToBody: 'demo-popover-container',
visibilityEvents: 'demo-popover-events',
eventTextBlock: 'pre.card.card-block.card-header.mb-3',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. bad selector, need to find more stable
  2. it should be not in the exampleDemosArr

cy.get(`${baseSelector}`).should('not.to.have.descendants', this.containerPopover);
}

isEventShown(baseSelector1: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does it mean baseSelector1 ?

cy.get(`${baseSelector1}`).contains('shown');
}

isEventHidden(baseSelector1: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does it mean baseSelector1 ?

});

it('when user clicks on "Preconfigured popover" again, nothing happens', () => {
popover.clickOnBtn(configuringDefaults);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2

const popover = new PopoverPo();

beforeEach(() => popover.navigateTo());
before(() => popover.navigateTo());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beforeEach

cypress/integration/popover_page_spec.ts Show resolved Hide resolved
@valorkin valorkin merged commit 3550758 into valor-software:development Jan 14, 2019
@ghost ghost removed the ready for merge label Jan 14, 2019
@valorkin valorkin added this to the 3.1.5 milestone Jan 14, 2019
leo6104 pushed a commit to leo6104/ngx-bootstrap that referenced this pull request Oct 10, 2019
IraErshova pushed a commit to IraErshova/ngx-bootstrap that referenced this pull request Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants