@spectrum-web-components/progress-circle
Advanced tools
Comparing version 0.42.4 to 0.42.5
{ | ||
"name": "@spectrum-web-components/progress-circle", | ||
"version": "0.42.4", | ||
"version": "0.42.5", | ||
"publishConfig": { | ||
@@ -60,4 +60,4 @@ "access": "public" | ||
"dependencies": { | ||
"@spectrum-web-components/base": "^0.42.4", | ||
"@spectrum-web-components/shared": "^0.42.4" | ||
"@spectrum-web-components/base": "^0.42.5", | ||
"@spectrum-web-components/shared": "^0.42.5" | ||
}, | ||
@@ -73,3 +73,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "4924ffd06681ced537edaed873a9ce8b42cf155c" | ||
"gitHead": "f29fd737947945de8cd6f5bc03fb389d386c9c3a" | ||
} |
@@ -12,2 +12,59 @@ "use strict"; | ||
); | ||
describe("dev mode", () => { | ||
let consoleWarnStub; | ||
before(() => { | ||
window.__swc.verbose = true; | ||
consoleWarnStub = stub(console, "warn"); | ||
}); | ||
afterEach(() => { | ||
consoleWarnStub.resetHistory(); | ||
}); | ||
after(() => { | ||
window.__swc.verbose = false; | ||
consoleWarnStub.restore(); | ||
}); | ||
it("warns in Dev Mode when accessible attributes are not leveraged", async () => { | ||
const el = await fixture(html` | ||
<sp-progress-circle progress="50"></sp-progress-circle> | ||
`); | ||
await elementUpdated(el); | ||
expect(consoleWarnStub.called).to.be.true; | ||
const spyCall = consoleWarnStub.getCall(0); | ||
expect( | ||
spyCall.args.at(0).includes("accessible"), | ||
"confirm accessibility-centric message" | ||
).to.be.true; | ||
expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({ | ||
data: { | ||
localName: "sp-progress-circle", | ||
type: "accessibility", | ||
level: "default" | ||
} | ||
}); | ||
}); | ||
it("warns in Dev Mode when overBackground attribute is supplied", async () => { | ||
const el = await fixture(html` | ||
<sp-progress-circle | ||
progress="50" | ||
?over-background=${true} | ||
></sp-progress-circle> | ||
`); | ||
await elementUpdated(el); | ||
expect(consoleWarnStub.called).to.be.true; | ||
const spyCall = consoleWarnStub.getCall(0); | ||
expect( | ||
spyCall.args.at(0).includes( | ||
'element will stop accepting the "over-background" attribute' | ||
), | ||
"confirm attribute deprecation message" | ||
).to.be.true; | ||
expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({ | ||
data: { | ||
localName: "sp-progress-circle", | ||
type: "api", | ||
level: "deprecation" | ||
} | ||
}); | ||
}); | ||
}); | ||
it("loads", async () => { | ||
@@ -65,23 +122,2 @@ const el = await fixture(html` | ||
}); | ||
it("warns in Dev Mode when accessible attributes are not leveraged", async () => { | ||
const consoleWarnStub = stub(console, "warn"); | ||
const el = await fixture(html` | ||
<sp-progress-circle progress="50"></sp-progress-circle> | ||
`); | ||
await elementUpdated(el); | ||
expect(consoleWarnStub.called).to.be.true; | ||
const spyCall = consoleWarnStub.getCall(0); | ||
expect( | ||
spyCall.args.at(0).includes("accessible"), | ||
"confirm accessibility-centric message" | ||
).to.be.true; | ||
expect(spyCall.args.at(-1), "confirm `data` shape").to.deep.equal({ | ||
data: { | ||
localName: "sp-progress-circle", | ||
type: "accessibility", | ||
level: "default" | ||
} | ||
}); | ||
consoleWarnStub.restore(); | ||
}); | ||
it("accepts `aria-label`", async () => { | ||
@@ -88,0 +124,0 @@ const el = await fixture(html` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
153943
883