@spectrum-web-components/progress-circle 0.6.0-devmode.0 → 0.7.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.
- package/README.md +5 -5
- package/custom-elements.json +17 -0
- package/package.json +4 -4
- package/sp-progress-circle.dev.js +1 -0
- package/sp-progress-circle.dev.js.map +1 -1
- package/sp-progress-circle.js +1 -2
- package/sp-progress-circle.js.map +2 -2
- package/src/ProgressCircle.d.ts +2 -0
- package/src/ProgressCircle.dev.js +39 -11
- package/src/ProgressCircle.dev.js.map +2 -2
- package/src/ProgressCircle.js +6 -90
- package/src/ProgressCircle.js.map +3 -3
- package/src/index.dev.js +1 -0
- package/src/index.dev.js.map +1 -1
- package/src/index.js +1 -1
- package/src/index.js.map +1 -1
- package/src/progress-circle.css.dev.js +59 -64
- package/src/progress-circle.css.dev.js.map +2 -2
- package/src/progress-circle.css.js +60 -68
- package/src/progress-circle.css.js.map +3 -3
- package/src/spectrum-config.js +8 -3
- package/src/spectrum-progress-circle.css.dev.js +59 -64
- package/src/spectrum-progress-circle.css.dev.js.map +2 -2
- package/src/spectrum-progress-circle.css.js +60 -68
- package/src/spectrum-progress-circle.css.js.map +3 -3
- package/stories/progress-circle.stories.js +28 -6
- package/stories/progress-circle.stories.js.map +2 -2
- package/test/benchmark/basic-test.js +1 -0
- package/test/benchmark/basic-test.js.map +1 -1
- package/test/progress-circle.test-vrt.js +1 -0
- package/test/progress-circle.test-vrt.js.map +2 -2
- package/test/progress-circle.test.js +9 -3
- package/test/progress-circle.test.js.map +1 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
import { elementUpdated, expect, fixture, html } from "@open-wc/testing";
|
|
2
3
|
import "@spectrum-web-components/progress-circle/sp-progress-circle.js";
|
|
3
4
|
import { stub } from "sinon";
|
|
4
5
|
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
|
5
6
|
describe("ProgressCircle", () => {
|
|
6
|
-
testForLitDevWarnings(
|
|
7
|
+
testForLitDevWarnings(
|
|
8
|
+
async () => await fixture(html`
|
|
7
9
|
<sp-progress-circle label="Loading"></sp-progress-circle>
|
|
8
|
-
`)
|
|
10
|
+
`)
|
|
11
|
+
);
|
|
9
12
|
it("loads", async () => {
|
|
10
13
|
const el = await fixture(html`
|
|
11
14
|
<sp-progress-circle label="Loading"></sp-progress-circle>
|
|
@@ -57,7 +60,10 @@ describe("ProgressCircle", () => {
|
|
|
57
60
|
await elementUpdated(el);
|
|
58
61
|
expect(consoleWarnStub.called).to.be.true;
|
|
59
62
|
const spyCall = consoleWarnStub.getCall(0);
|
|
60
|
-
expect(
|
|
63
|
+
expect(
|
|
64
|
+
spyCall.args.at(0).includes("accessible"),
|
|
65
|
+
"confirm accessibility-centric message"
|
|
66
|
+
).to.be.true;
|
|
61
67
|
expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({
|
|
62
68
|
data: {
|
|
63
69
|
localName: "sp-progress-circle",
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["progress-circle.test.ts"],
|
|
4
4
|
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { elementUpdated, expect, fixture, html } from '@open-wc/testing';\n\nimport '@spectrum-web-components/progress-circle/sp-progress-circle.js';\nimport { ProgressCircle } from '@spectrum-web-components/progress-circle';\nimport { stub } from 'sinon';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\n\ndescribe('ProgressCircle', () => {\n testForLitDevWarnings(\n async () =>\n await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `)\n );\n it('loads', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle label=\"Loading\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('loads - [indeterminate]', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n indeterminate\n label=\"Loading\"\n ></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n expect(el).to.not.be.undefined;\n\n await expect(el).to.be.accessible();\n });\n it('accepts user `role`', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n role=\"progressbar\"\n label=\"With user role\"\n ></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.getAttribute('role')).to.equal('progressbar');\n });\n it('returns to indeterminate', async () => {\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle\n progress=\"50\"\n label=\"Will be indeterminate\"\n ></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.true;\n expect(el.getAttribute('aria-valuenow')).to.equal('50');\n\n el.indeterminate = true;\n\n await elementUpdated(el);\n\n expect(el.hasAttribute('aria-valuenow')).to.be.false;\n });\n it('warns in Dev Mode when accessible attributes are not leveraged', async () => {\n const consoleWarnStub = stub(console, 'warn');\n const el = await fixture<ProgressCircle>(html`\n <sp-progress-circle progress=\"50\"></sp-progress-circle>\n `);\n\n await elementUpdated(el);\n\n expect(consoleWarnStub.called).to.be.true;\n const spyCall = consoleWarnStub.getCall(0);\n expect(\n spyCall.args.at(0).includes('accessible'),\n 'confirm accessibility-centric message'\n ).to.be.true;\n expect(spyCall.args.at(-1), 'confirm `data` shape').to.deep.equal({\n data: {\n localName: 'sp-progress-circle',\n type: 'accessibility',\n level: 'default',\n },\n });\n consoleWarnStub.restore();\n });\n});\n"],
|
|
5
|
-
"mappings": "AAYA;
|
|
5
|
+
"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