vueless 1.0.2-beta.23 → 1.0.2-beta.24
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/package.json
CHANGED
|
@@ -194,6 +194,7 @@ describe("UButton.vue", () => {
|
|
|
194
194
|
// Block prop
|
|
195
195
|
it("applies block class when block prop is true", () => {
|
|
196
196
|
const block = true;
|
|
197
|
+
const expectedClass = "w-full";
|
|
197
198
|
|
|
198
199
|
const component = mount(UButton, {
|
|
199
200
|
props: {
|
|
@@ -201,12 +202,13 @@ describe("UButton.vue", () => {
|
|
|
201
202
|
},
|
|
202
203
|
});
|
|
203
204
|
|
|
204
|
-
expect(component.attributes("class")).toContain(
|
|
205
|
+
expect(component.attributes("class")).toContain(expectedClass);
|
|
205
206
|
});
|
|
206
207
|
|
|
207
208
|
// Round prop
|
|
208
209
|
it("applies round class when round prop is true", () => {
|
|
209
210
|
const round = true;
|
|
211
|
+
const expectedClass = "rounded-full";
|
|
210
212
|
|
|
211
213
|
const component = mount(UButton, {
|
|
212
214
|
props: {
|
|
@@ -214,7 +216,7 @@ describe("UButton.vue", () => {
|
|
|
214
216
|
},
|
|
215
217
|
});
|
|
216
218
|
|
|
217
|
-
expect(component.attributes("class")).toContain(
|
|
219
|
+
expect(component.attributes("class")).toContain(expectedClass);
|
|
218
220
|
});
|
|
219
221
|
|
|
220
222
|
// Square prop
|
|
@@ -245,6 +247,7 @@ describe("UButton.vue", () => {
|
|
|
245
247
|
it("shows loader when loading prop is true", async () => {
|
|
246
248
|
const loading = true;
|
|
247
249
|
const label = "Button with some long text";
|
|
250
|
+
const expectedClass = "pointer-events-none";
|
|
248
251
|
|
|
249
252
|
const component = mount(UButton, {
|
|
250
253
|
props: {
|
|
@@ -255,8 +258,8 @@ describe("UButton.vue", () => {
|
|
|
255
258
|
|
|
256
259
|
expect(component.text()).not.toBe(label);
|
|
257
260
|
expect(component.findComponent(ULoader).exists()).toBe(true);
|
|
258
|
-
expect(component.find("
|
|
259
|
-
expect(component.attributes("class")).toContain(
|
|
261
|
+
expect(component.find("[vl-key='invisible']").exists()).toBe(true);
|
|
262
|
+
expect(component.attributes("class")).toContain(expectedClass); // Unclickable
|
|
260
263
|
});
|
|
261
264
|
|
|
262
265
|
// ID prop
|