web: Testing and documenting the simple things
This commit adds unit tests for the Alerts and EmptyState elements. It includes a new test/documentation feature; elements can now be fully documented with text description and active controls. It *removes* the `babel` imports entirely. Either we don't need them, or the components that do need them are importing them automatically. [An outstanding bug in WebDriverIO](https://github.com/webdriverio/webdriverio/issues/12056) unfortunately means that the tests cannot be run in parallel for the time being.While one test is running, the compiler for other tests becomes unreliable. They're currently working on this issue. I have set the `maxInstances` to **1**. I have updated the `<ak-alert>` component just a bit, providing an attribute alternative to the `Level` property; now instead of passing it a `<ak-alert level=${Levels.Warning}>` properties, you can just say `<ak-alert warning>` and it'll work just fine. The old way is still the default behavior. The default behavior for `EmptyState` was a little confusing; I've re-arranged it for clarity. Since I touched it, I also added the `interface` and `HTMLElementTagNameMap` declarations. Added documentation to all the elements I've touched (so far).
This commit is contained in:
@ -36,6 +36,10 @@ const StatusMap = new Map<TaskStatus, string>([
|
||||
|
||||
const SPINNER_TIMEOUT = 1000 * 1.5; // milliseconds
|
||||
|
||||
export interface IBaseTaskButton {
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* BaseTaskButton
|
||||
*
|
||||
@ -46,7 +50,6 @@ const SPINNER_TIMEOUT = 1000 * 1.5; // milliseconds
|
||||
* `onFailure` call their `super.` equivalents.
|
||||
*
|
||||
*/
|
||||
|
||||
export abstract class BaseTaskButton extends CustomEmitterElement(AKElement) {
|
||||
eventPrefix = "ak-button";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user