mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-21 22:22:15 +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 {
|
||||
...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"));
|
||||
})
|
||||
|
@ -46,7 +46,7 @@ export default {
|
||||
[
|
||||
{
|
||||
name: 'api',
|
||||
files: 'api/js/etemplate/**/test/*.test.js'
|
||||
files: 'api/js/etemplate/**/test/*.test.ts'
|
||||
}
|
||||
].concat(
|
||||
appJS.map(app =>
|
||||
|
Loading…
Reference in New Issue
Block a user