@dhis2-ui/tab 9.5.0-alpha.1 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('a Tab with children is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Tab with children is rendered', () => {
6
6
  cy.visitStory('Tab', 'With children');
7
7
  cy.get('[data-test="dhis2-uicore-tab"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the children are visible', () => {
9
+ (0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
10
10
  cy.get('[data-test="dhis2-uicore-tab"]').contains('I am a child').should('be.visible');
11
11
  });
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('a Tab with an icon is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Tab with an icon is rendered', () => {
6
6
  cy.visitStory('Tab', 'With icon');
7
7
  cy.get('[data-test="dhis2-uicore-tab"]').should('be.visible');
8
8
  });
9
- (0, _steps.Then)('the icon is visible', () => {
9
+ (0, _cypressCucumberPreprocessor.Then)('the icon is visible', () => {
10
10
  cy.get('[data-test="dhis2-uicore-tab"]').contains('Icon').should('be.visible');
11
11
  });
@@ -1,22 +1,22 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('a Tab with onClick handler is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a Tab with onClick handler is rendered', () => {
6
6
  cy.visitStory('Tab', 'With onClick');
7
7
  });
8
- (0, _steps.Given)('a disabled Tab with onClick handler is rendered', () => {
8
+ (0, _cypressCucumberPreprocessor.Given)('a disabled Tab with onClick handler is rendered', () => {
9
9
  cy.visitStory('Tab', 'With onClick and disabled');
10
10
  });
11
- (0, _steps.When)('the Tab is clicked', () => {
11
+ (0, _cypressCucumberPreprocessor.When)('the Tab is clicked', () => {
12
12
  cy.get('[data-test="dhis2-uicore-tab"]').click();
13
13
  });
14
- (0, _steps.Then)('the onClick handler is called', () => {
14
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler is called', () => {
15
15
  cy.window().should(win => {
16
16
  expect(win.onClick).to.be.calledWith({});
17
17
  });
18
18
  });
19
- (0, _steps.Then)('the onClick handler is not called', () => {
19
+ (0, _cypressCucumberPreprocessor.Then)('the onClick handler is not called', () => {
20
20
  cy.window().should(win => {
21
21
  expect(win.onClick).not.to.be.called;
22
22
  });
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- (0, _steps.Given)('a TabBar with children is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a TabBar with children is rendered', () => {
6
6
  cy.visitStory('TabBar', 'With children');
7
7
  cy.get('[data-test="dhis2-uicore-tabbar"]').should('be.visible');
8
8
  });
9
- (0, _steps.Given)('a scrollable TabBar with children is rendered', () => {
9
+ (0, _cypressCucumberPreprocessor.Given)('a scrollable TabBar with children is rendered', () => {
10
10
  cy.visitStory('TabBar', 'Scrollable with children');
11
11
  cy.get('[data-test="dhis2-uicore-tabbar"]').should('be.visible');
12
12
  });
13
- (0, _steps.Then)('the children are visible', () => {
13
+ (0, _cypressCucumberPreprocessor.Then)('the children are visible', () => {
14
14
  cy.get('[data-test="dhis2-uicore-tabbar"]').contains('I am a child').should('be.visible');
15
15
  });
@@ -1,48 +1,30 @@
1
1
  "use strict";
2
2
 
3
- var _steps = require("cypress-cucumber-preprocessor/steps");
3
+ var _cypressCucumberPreprocessor = require("@badeball/cypress-cucumber-preprocessor");
4
4
 
5
- /* global before,after */
6
- const handler = err => {
7
- // > This error means that ResizeObserver was not able to deliver all
8
- // > observations within a single animation frame. It is benign (your site
9
- // > will not break). – Aleksandar Totic Apr 15 at 3:14
10
- // -----
11
- // https://stackoverflow.com/a/50387233
12
- if (err.message.match('ResizeObserver loop limit exceeded')) {
13
- return false;
14
- }
15
- };
16
-
17
- before(() => {
18
- Cypress.on('uncaught:exception', handler);
19
- });
20
- after(() => {
21
- Cypress.off('uncaught:exception', handler);
22
- });
23
- (0, _steps.Given)('a tabbar with enough space for all tabs is rendered', () => {
5
+ (0, _cypressCucumberPreprocessor.Given)('a tabbar with enough space for all tabs is rendered', () => {
24
6
  cy.viewport(1024, 768);
25
7
  cy.visitStory('TabBar', 'Scrollable with some tabs');
26
8
  });
27
- (0, _steps.Given)('the tabbar is scrollable', () => {
9
+ (0, _cypressCucumberPreprocessor.Given)('the tabbar is scrollable', () => {
28
10
  cy.get('.scroll-area').should('exist');
29
11
  });
30
- (0, _steps.Given)('a tabbar with too little space for all tabs is rendered', () => {
12
+ (0, _cypressCucumberPreprocessor.Given)('a tabbar with too little space for all tabs is rendered', () => {
31
13
  cy.viewport(300, 768);
32
14
  cy.visitStory('TabBar', 'Scrollable with some tabs');
33
15
  });
34
- (0, _steps.When)('the tabs are visible', () => {
16
+ (0, _cypressCucumberPreprocessor.When)('the tabs are visible', () => {
35
17
  cy.get('[data-test="dhis2-uicore-tab"]').should('exist');
36
18
  });
37
- (0, _steps.When)("the tabbar's width increases", () => {
19
+ (0, _cypressCucumberPreprocessor.When)("the tabbar's width increases", () => {
38
20
  cy.viewport(1024, 768);
39
21
  });
40
- (0, _steps.When)("the tabbar's width decreases", () => {
22
+ (0, _cypressCucumberPreprocessor.When)("the tabbar's width decreases", () => {
41
23
  cy.viewport(300, 768);
42
24
  });
43
- (0, _steps.Then)('no scroll buttons should be visible', () => {
25
+ (0, _cypressCucumberPreprocessor.Then)('no scroll buttons should be visible', () => {
44
26
  cy.get('.scroll-button:visible').should('not.exist');
45
27
  });
46
- (0, _steps.Then)('both scroll buttons should be visible', () => {
28
+ (0, _cypressCucumberPreprocessor.Then)('both scroll buttons should be visible', () => {
47
29
  cy.get('.scroll-button:visible').should('have.length.of', 2);
48
30
  });
@@ -1,4 +1,4 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a Tab with children is rendered', () => {
3
3
  cy.visitStory('Tab', 'With children');
4
4
  cy.get('[data-test="dhis2-uicore-tab"]').should('be.visible');
@@ -1,4 +1,4 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a Tab with an icon is rendered', () => {
3
3
  cy.visitStory('Tab', 'With icon');
4
4
  cy.get('[data-test="dhis2-uicore-tab"]').should('be.visible');
@@ -1,4 +1,4 @@
1
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a Tab with onClick handler is rendered', () => {
3
3
  cy.visitStory('Tab', 'With onClick');
4
4
  });
@@ -1,4 +1,4 @@
1
- import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
1
+ import { Given, Then } from '@badeball/cypress-cucumber-preprocessor';
2
2
  Given('a TabBar with children is rendered', () => {
3
3
  cy.visitStory('TabBar', 'With children');
4
4
  cy.get('[data-test="dhis2-uicore-tabbar"]').should('be.visible');
@@ -1,23 +1,4 @@
1
- /* global before,after */
2
- import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
3
-
4
- const handler = err => {
5
- // > This error means that ResizeObserver was not able to deliver all
6
- // > observations within a single animation frame. It is benign (your site
7
- // > will not break). – Aleksandar Totic Apr 15 at 3:14
8
- // -----
9
- // https://stackoverflow.com/a/50387233
10
- if (err.message.match('ResizeObserver loop limit exceeded')) {
11
- return false;
12
- }
13
- };
14
-
15
- before(() => {
16
- Cypress.on('uncaught:exception', handler);
17
- });
18
- after(() => {
19
- Cypress.off('uncaught:exception', handler);
20
- });
1
+ import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor';
21
2
  Given('a tabbar with enough space for all tabs is rendered', () => {
22
3
  cy.viewport(1024, 768);
23
4
  cy.visitStory('TabBar', 'Scrollable with some tabs');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/tab",
3
- "version": "9.5.0-alpha.1",
3
+ "version": "9.6.0",
4
4
  "description": "UI Tabs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2/ui-constants": "9.5.0-alpha.1",
37
- "@dhis2/ui-icons": "9.5.0-alpha.1",
36
+ "@dhis2/ui-constants": "9.6.0",
37
+ "@dhis2/ui-icons": "9.6.0",
38
38
  "classnames": "^2.3.1",
39
39
  "prop-types": "^15.7.2"
40
40
  },