@instructure/ui-pill 9.2.1-snapshot-9 → 9.2.1-snapshot-11
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.
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [9.2.1-snapshot-
|
|
6
|
+
## [9.2.1-snapshot-11](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.2.1-snapshot-11) (2024-07-16)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-pill
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _Pill, _Pill2, _Pill3, _Pill4;
|
|
1
|
+
var _Pill, _Pill2, _Pill3, _Pill4, _Pill5;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -35,33 +35,40 @@ describe('<Pill />', () => {
|
|
|
35
35
|
it('should render', async () => {
|
|
36
36
|
const _render = render(_Pill || (_Pill = /*#__PURE__*/React.createElement(Pill, null, "Overdue"))),
|
|
37
37
|
container = _render.container;
|
|
38
|
+
const pill = container.querySelector('div[class$="-pill"]');
|
|
39
|
+
expect(pill).toBeInTheDocument();
|
|
40
|
+
expect(pill).toHaveTextContent('Overdue');
|
|
41
|
+
});
|
|
42
|
+
it('should display text', async () => {
|
|
43
|
+
const _render2 = render(_Pill2 || (_Pill2 = /*#__PURE__*/React.createElement(Pill, null, "Overdue"))),
|
|
44
|
+
container = _render2.container;
|
|
38
45
|
expect(container).toHaveTextContent('Overdue');
|
|
39
46
|
});
|
|
40
47
|
it('should display status text', async () => {
|
|
41
|
-
const
|
|
48
|
+
const _render3 = render(_Pill3 || (_Pill3 = /*#__PURE__*/React.createElement(Pill, {
|
|
42
49
|
statusLabel: "Statuslabel"
|
|
43
50
|
}, "Overdue"))),
|
|
44
|
-
container =
|
|
51
|
+
container = _render3.container;
|
|
45
52
|
expect(container).toHaveTextContent('Statuslabel:');
|
|
46
53
|
expect(container).toHaveTextContent('Overdue');
|
|
47
54
|
});
|
|
48
55
|
it('should render icon text', async () => {
|
|
49
|
-
const
|
|
56
|
+
const _render4 = render(_Pill4 || (_Pill4 = /*#__PURE__*/React.createElement(Pill, {
|
|
50
57
|
statusLabel: "Statuslabel",
|
|
51
58
|
renderIcon: /*#__PURE__*/React.createElement(IconEyeLine, {
|
|
52
59
|
color: "auto",
|
|
53
60
|
title: "Love"
|
|
54
61
|
})
|
|
55
62
|
}, "Overdue"))),
|
|
56
|
-
container =
|
|
63
|
+
container = _render4.container;
|
|
57
64
|
const svg = container.querySelector('svg');
|
|
58
65
|
expect(container).toHaveTextContent('Statuslabel:');
|
|
59
66
|
expect(container).toHaveTextContent('Overdue');
|
|
60
67
|
expect(svg).toHaveAttribute('name', 'IconEye');
|
|
61
68
|
});
|
|
62
69
|
it('should be accessible', async () => {
|
|
63
|
-
const
|
|
64
|
-
container =
|
|
70
|
+
const _render5 = render(_Pill5 || (_Pill5 = /*#__PURE__*/React.createElement(Pill, null, "Overdue"))),
|
|
71
|
+
container = _render5.container;
|
|
65
72
|
const axeCheck = await runAxeCheck(container);
|
|
66
73
|
expect(axeCheck).toBe(true);
|
|
67
74
|
});
|
|
@@ -7,7 +7,7 @@ require("@testing-library/jest-dom");
|
|
|
7
7
|
var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
|
|
8
8
|
var _index = require("../index");
|
|
9
9
|
var _IconEyeLine = require("@instructure/ui-icons/lib/IconEyeLine.js");
|
|
10
|
-
var _Pill, _Pill2, _Pill3, _Pill4;
|
|
10
|
+
var _Pill, _Pill2, _Pill3, _Pill4, _Pill5;
|
|
11
11
|
/*
|
|
12
12
|
* The MIT License (MIT)
|
|
13
13
|
*
|
|
@@ -36,33 +36,40 @@ describe('<Pill />', () => {
|
|
|
36
36
|
it('should render', async () => {
|
|
37
37
|
const _render = (0, _react2.render)(_Pill || (_Pill = /*#__PURE__*/_react.default.createElement(_index.Pill, null, "Overdue"))),
|
|
38
38
|
container = _render.container;
|
|
39
|
+
const pill = container.querySelector('div[class$="-pill"]');
|
|
40
|
+
expect(pill).toBeInTheDocument();
|
|
41
|
+
expect(pill).toHaveTextContent('Overdue');
|
|
42
|
+
});
|
|
43
|
+
it('should display text', async () => {
|
|
44
|
+
const _render2 = (0, _react2.render)(_Pill2 || (_Pill2 = /*#__PURE__*/_react.default.createElement(_index.Pill, null, "Overdue"))),
|
|
45
|
+
container = _render2.container;
|
|
39
46
|
expect(container).toHaveTextContent('Overdue');
|
|
40
47
|
});
|
|
41
48
|
it('should display status text', async () => {
|
|
42
|
-
const
|
|
49
|
+
const _render3 = (0, _react2.render)(_Pill3 || (_Pill3 = /*#__PURE__*/_react.default.createElement(_index.Pill, {
|
|
43
50
|
statusLabel: "Statuslabel"
|
|
44
51
|
}, "Overdue"))),
|
|
45
|
-
container =
|
|
52
|
+
container = _render3.container;
|
|
46
53
|
expect(container).toHaveTextContent('Statuslabel:');
|
|
47
54
|
expect(container).toHaveTextContent('Overdue');
|
|
48
55
|
});
|
|
49
56
|
it('should render icon text', async () => {
|
|
50
|
-
const
|
|
57
|
+
const _render4 = (0, _react2.render)(_Pill4 || (_Pill4 = /*#__PURE__*/_react.default.createElement(_index.Pill, {
|
|
51
58
|
statusLabel: "Statuslabel",
|
|
52
59
|
renderIcon: /*#__PURE__*/_react.default.createElement(_IconEyeLine.IconEyeLine, {
|
|
53
60
|
color: "auto",
|
|
54
61
|
title: "Love"
|
|
55
62
|
})
|
|
56
63
|
}, "Overdue"))),
|
|
57
|
-
container =
|
|
64
|
+
container = _render4.container;
|
|
58
65
|
const svg = container.querySelector('svg');
|
|
59
66
|
expect(container).toHaveTextContent('Statuslabel:');
|
|
60
67
|
expect(container).toHaveTextContent('Overdue');
|
|
61
68
|
expect(svg).toHaveAttribute('name', 'IconEye');
|
|
62
69
|
});
|
|
63
70
|
it('should be accessible', async () => {
|
|
64
|
-
const
|
|
65
|
-
container =
|
|
71
|
+
const _render5 = (0, _react2.render)(_Pill5 || (_Pill5 = /*#__PURE__*/_react.default.createElement(_index.Pill, null, "Overdue"))),
|
|
72
|
+
container = _render5.container;
|
|
66
73
|
const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
|
|
67
74
|
expect(axeCheck).toBe(true);
|
|
68
75
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-pill",
|
|
3
|
-
"version": "9.2.1-snapshot-
|
|
3
|
+
"version": "9.2.1-snapshot-11",
|
|
4
4
|
"description": "A UI component to communicate concise status.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,27 +24,27 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.24.5",
|
|
27
|
-
"@instructure/console": "9.2.1-snapshot-
|
|
28
|
-
"@instructure/emotion": "9.2.1-snapshot-
|
|
29
|
-
"@instructure/shared-types": "9.2.1-snapshot-
|
|
30
|
-
"@instructure/ui-react-utils": "9.2.1-snapshot-
|
|
31
|
-
"@instructure/ui-testable": "9.2.1-snapshot-
|
|
32
|
-
"@instructure/ui-tooltip": "9.2.1-snapshot-
|
|
33
|
-
"@instructure/ui-truncate-text": "9.2.1-snapshot-
|
|
34
|
-
"@instructure/ui-utils": "9.2.1-snapshot-
|
|
35
|
-
"@instructure/ui-view": "9.2.1-snapshot-
|
|
27
|
+
"@instructure/console": "9.2.1-snapshot-11",
|
|
28
|
+
"@instructure/emotion": "9.2.1-snapshot-11",
|
|
29
|
+
"@instructure/shared-types": "9.2.1-snapshot-11",
|
|
30
|
+
"@instructure/ui-react-utils": "9.2.1-snapshot-11",
|
|
31
|
+
"@instructure/ui-testable": "9.2.1-snapshot-11",
|
|
32
|
+
"@instructure/ui-tooltip": "9.2.1-snapshot-11",
|
|
33
|
+
"@instructure/ui-truncate-text": "9.2.1-snapshot-11",
|
|
34
|
+
"@instructure/ui-utils": "9.2.1-snapshot-11",
|
|
35
|
+
"@instructure/ui-view": "9.2.1-snapshot-11",
|
|
36
36
|
"prop-types": "^15.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-axe-check": "9.2.1-snapshot-
|
|
40
|
-
"@instructure/ui-babel-preset": "9.2.1-snapshot-
|
|
41
|
-
"@instructure/ui-color-utils": "9.2.1-snapshot-
|
|
42
|
-
"@instructure/ui-icons": "9.2.1-snapshot-
|
|
43
|
-
"@instructure/ui-scripts": "9.2.1-snapshot-
|
|
44
|
-
"@instructure/ui-test-locator": "9.2.1-snapshot-
|
|
45
|
-
"@instructure/ui-test-queries": "9.2.1-snapshot-
|
|
46
|
-
"@instructure/ui-test-utils": "9.2.1-snapshot-
|
|
47
|
-
"@instructure/ui-themes": "9.2.1-snapshot-
|
|
39
|
+
"@instructure/ui-axe-check": "9.2.1-snapshot-11",
|
|
40
|
+
"@instructure/ui-babel-preset": "9.2.1-snapshot-11",
|
|
41
|
+
"@instructure/ui-color-utils": "9.2.1-snapshot-11",
|
|
42
|
+
"@instructure/ui-icons": "9.2.1-snapshot-11",
|
|
43
|
+
"@instructure/ui-scripts": "9.2.1-snapshot-11",
|
|
44
|
+
"@instructure/ui-test-locator": "9.2.1-snapshot-11",
|
|
45
|
+
"@instructure/ui-test-queries": "9.2.1-snapshot-11",
|
|
46
|
+
"@instructure/ui-test-utils": "9.2.1-snapshot-11",
|
|
47
|
+
"@instructure/ui-themes": "9.2.1-snapshot-11",
|
|
48
48
|
"@testing-library/jest-dom": "^6.4.5",
|
|
49
49
|
"@testing-library/react": "^15.0.7",
|
|
50
50
|
"vitest": "^1.6.0"
|
|
@@ -34,6 +34,14 @@ import { IconEyeLine } from '@instructure/ui-icons'
|
|
|
34
34
|
describe('<Pill />', () => {
|
|
35
35
|
it('should render', async () => {
|
|
36
36
|
const { container } = render(<Pill>Overdue</Pill>)
|
|
37
|
+
const pill = container.querySelector('div[class$="-pill"]')
|
|
38
|
+
|
|
39
|
+
expect(pill).toBeInTheDocument()
|
|
40
|
+
expect(pill).toHaveTextContent('Overdue')
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
it('should display text', async () => {
|
|
44
|
+
const { container } = render(<Pill>Overdue</Pill>)
|
|
37
45
|
|
|
38
46
|
expect(container).toHaveTextContent('Overdue')
|
|
39
47
|
})
|