mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
Get tests for Button passing again
This commit is contained in:
parent
40278c8827
commit
acd44a1e0e
@ -145,7 +145,7 @@ export const ButtonMixin = <T extends Constructor>(superclass : T) => class exte
|
|||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
...super.properties,
|
...super.properties,
|
||||||
image: {type: String},
|
image: {type: String, noAccessor: true},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If button is set to readonly, do we want to hide it completely (old behaviour) or show it as disabled
|
* If button is set to readonly, do we want to hide it completely (old behaviour) or show it as disabled
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
|
import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
|
||||||
import '../Et2Image/Et2Image';
|
import '../Et2Image/Et2Image';
|
||||||
import {SlButton} from "@shoelace-style/shoelace";
|
import {SlButton} from "@shoelace-style/shoelace";
|
||||||
|
import {ButtonMixin} from "./ButtonMixin";
|
||||||
|
import {PropertyValues} from "@lion/core";
|
||||||
|
|
||||||
|
|
||||||
export class Et2Button extends ButtonMixin(Et2InputWidget(SlButton))
|
export class Et2Button extends ButtonMixin(Et2InputWidget(SlButton))
|
||||||
|
@ -55,12 +55,14 @@ describe("Button widget", () =>
|
|||||||
|
|
||||||
it("gets an icon", async() =>
|
it("gets an icon", async() =>
|
||||||
{
|
{
|
||||||
|
// Wait for the render to finish
|
||||||
|
await element.updateComplete;
|
||||||
|
|
||||||
element.image = "check";
|
element.image = "check";
|
||||||
|
|
||||||
// Wait for the render to finish
|
// Wait for the render to finish
|
||||||
await element.updateComplete;
|
await element.updateComplete;
|
||||||
|
let image = element.querySelectorAll("et2-image");
|
||||||
let image = element.querySelectorAll("img");
|
|
||||||
assert.equal(image.length, 1);
|
assert.equal(image.length, 1);
|
||||||
assert.equal(image[0].src, element.egw().image("check"));
|
assert.equal(image[0].src, element.egw().image("check"));
|
||||||
})
|
})
|
||||||
|
@ -46,7 +46,7 @@ export default {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
name: 'api',
|
name: 'api',
|
||||||
files: 'api/js/etemplate/**/test/*.test.js'
|
files: 'api/js/etemplate/**/test/*.test.ts'
|
||||||
}
|
}
|
||||||
].concat(
|
].concat(
|
||||||
appJS.map(app =>
|
appJS.map(app =>
|
||||||
|
Loading…
Reference in New Issue
Block a user