mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-19 04:46:42 +02:00
Get tests for Button passing again
This commit is contained in:
@@ -145,7 +145,7 @@ export const ButtonMixin = <T extends Constructor>(superclass : T) => class exte
|
||||
{
|
||||
return {
|
||||
...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
|
||||
|
@@ -12,6 +12,8 @@
|
||||
import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
|
||||
import '../Et2Image/Et2Image';
|
||||
import {SlButton} from "@shoelace-style/shoelace";
|
||||
import {ButtonMixin} from "./ButtonMixin";
|
||||
import {PropertyValues} from "@lion/core";
|
||||
|
||||
|
||||
export class Et2Button extends ButtonMixin(Et2InputWidget(SlButton))
|
||||
|
@@ -55,12 +55,14 @@ describe("Button widget", () =>
|
||||
|
||||
it("gets an icon", async() =>
|
||||
{
|
||||
// Wait for the render to finish
|
||||
await element.updateComplete;
|
||||
|
||||
element.image = "check";
|
||||
|
||||
// Wait for the render to finish
|
||||
await element.updateComplete;
|
||||
|
||||
let image = element.querySelectorAll("img");
|
||||
let image = element.querySelectorAll("et2-image");
|
||||
assert.equal(image.length, 1);
|
||||
assert.equal(image[0].src, element.egw().image("check"));
|
||||
})
|
||||
|
Reference in New Issue
Block a user