@jahia/cypress 1.0.8 → 1.1.0
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/.graphqlconfig +16 -0
- package/README.md +2 -0
- package/dist/page-object/baseComponent.d.ts +2 -0
- package/dist/page-object/baseComponent.js +14 -0
- package/dist/page-object/moonstone/menu.js +5 -1
- package/dist/support/fixture.js +6 -2
- package/dist/support/index.d.ts +1 -0
- package/dist/support/index.js +1 -0
- package/dist/support/provisioning/executeGroovy.d.ts +8 -2
- package/dist/support/provisioning/executeGroovy.js +8 -2
- package/dist/support/provisioning/runProvisioningScript.d.ts +7 -2
- package/dist/support/provisioning/runProvisioningScript.js +10 -4
- package/dist/support/registerSupport.js +2 -0
- package/dist/support/repeatUntil.d.ts +15 -0
- package/dist/support/repeatUntil.js +52 -0
- package/fixtures/graphql/jcr/addNode.graphql +16 -0
- package/fixtures/graphql/jcr/deleteNode.graphql +5 -0
- package/fixtures/graphql/jcr/mutateNode.graphql +13 -0
- package/fixtures/groovy/admin/createSite.groovy +14 -0
- package/fixtures/groovy/admin/deleteSite.groovy +6 -0
- package/package.json +2 -2
- package/schema.graphql +2874 -0
- package/src/page-object/baseComponent.ts +5 -0
- package/src/page-object/moonstone/menu.ts +5 -1
- package/src/support/fixture.ts +5 -2
- package/src/support/index.ts +1 -0
- package/src/support/provisioning/executeGroovy.md +9 -0
- package/src/support/provisioning/executeGroovy.ts +15 -3
- package/src/support/provisioning/runProvisioningScript.md +9 -0
- package/src/support/provisioning/runProvisioningScript.ts +17 -5
- package/src/support/registerSupport.ts +2 -0
- package/src/support/repeatUntil.md +40 -0
- package/src/support/repeatUntil.ts +59 -0
- package/.idea/jahia-cypress.iml +0 -9
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/sonarlint/issuestore/8/9/8995cd54601f633e8bca96b4e0b06ae4272afe02 +0 -3
- package/.idea/sonarlint/issuestore/index.pb +0 -3
- package/.idea/vcs.xml +0 -6
- package/dist/page-object/iframe.d.ts +0 -10
- package/dist/page-object/iframe.js +0 -46
- package/dist/page-object/moonstone/muiinput.d.ts +0 -8
- package/dist/page-object/moonstone/muiinput.js +0 -36
- package/dist/page-object/moonstone/muiradio.d.ts +0 -5
- package/dist/page-object/moonstone/muiradio.js +0 -32
- package/fixtures/test.json +0 -0
- package/yalc.lock +0 -9
|
@@ -3,6 +3,7 @@ import Chainable = Cypress.Chainable;
|
|
|
3
3
|
export type ComponentType<Component> = { new(p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component, defaultSelector: string };
|
|
4
4
|
|
|
5
5
|
export class BaseComponent {
|
|
6
|
+
static defaultSelector = ''
|
|
6
7
|
static count = 0
|
|
7
8
|
|
|
8
9
|
element: Chainable<JQuery>
|
|
@@ -22,4 +23,8 @@ export class BaseComponent {
|
|
|
22
23
|
|
|
23
24
|
return cy.get('@component' + this.id, {log: false})
|
|
24
25
|
}
|
|
26
|
+
|
|
27
|
+
should(arg, ...others) {
|
|
28
|
+
return cy.get('@component' + this.id, {log: false}).should(arg, ...others)
|
|
29
|
+
}
|
|
25
30
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import {BaseComponent} from "../baseComponent"
|
|
2
2
|
|
|
3
3
|
export class Menu extends BaseComponent {
|
|
4
|
-
static defaultSelector = '.moonstone-menu'
|
|
4
|
+
static defaultSelector = '.moonstone-menu:visible'
|
|
5
5
|
|
|
6
6
|
select(item: string): Menu {
|
|
7
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
8
|
+
cy.wait(500)
|
|
7
9
|
this.get().find(`.moonstone-menuItem`).should("contain", item).contains(item).trigger('click')
|
|
8
10
|
return this
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
selectByRole(item: string): Menu {
|
|
14
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
15
|
+
cy.wait(500)
|
|
12
16
|
this.get().find(`.moonstone-menuItem[data-sel-role="${item}"]`).trigger('click')
|
|
13
17
|
return this
|
|
14
18
|
}
|
package/src/support/fixture.ts
CHANGED
|
@@ -6,7 +6,6 @@ export const fixture = function(originalCommand: ((...args: any[]) => any), fixt
|
|
|
6
6
|
return originalCommand(fixture, ...args).then(f => {
|
|
7
7
|
return f
|
|
8
8
|
}).catch((err) => {
|
|
9
|
-
console.log(err)
|
|
10
9
|
return null;
|
|
11
10
|
});
|
|
12
11
|
}).then(file => {
|
|
@@ -16,7 +15,11 @@ export const fixture = function(originalCommand: ((...args: any[]) => any), fixt
|
|
|
16
15
|
encoding = args[0]
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
try {
|
|
19
|
+
cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixture, encoding, {log: false, timeout: 0})
|
|
20
|
+
} catch (e) {
|
|
21
|
+
console.log(e)
|
|
22
|
+
}
|
|
20
23
|
}
|
|
21
24
|
})
|
|
22
25
|
};
|
package/src/support/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ This commands execute a groovy script from fixtures folder
|
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
cy.executeGroovy('script.groovy')
|
|
13
|
+
cy.executeGroovy('script.groovy', null, {url: 'http://jahia-processing.jahia.net:8080', username: 'root', password: 'root1234'})
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
### Arguments
|
|
@@ -18,6 +19,14 @@ cy.executeGroovy('script.groovy')
|
|
|
18
19
|
|
|
19
20
|
The name of the script file, in fixtures folder
|
|
20
21
|
|
|
22
|
+
#### > jahiaServer (`JahiaServer`)
|
|
23
|
+
|
|
24
|
+
A Jahia server can be specified if there is a need to use something other than default. This is useful when using Jahia in cluster, if there is a need to redirect a provisioning script to a specific Jahia server (for example a processig node).
|
|
25
|
+
|
|
26
|
+
- url: (`string`) : The url of the server (for example: http://processing.jahia.net:8080)
|
|
27
|
+
- username: (`string`) : Root user
|
|
28
|
+
- password: (`string`) : Password for the root user
|
|
29
|
+
|
|
21
30
|
### Yields
|
|
22
31
|
|
|
23
32
|
The groovy script result (set with `setResult()` within groovy code)
|
|
@@ -9,12 +9,24 @@ declare global {
|
|
|
9
9
|
namespace Cypress {
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
11
|
interface Chainable<Subject> {
|
|
12
|
-
executeGroovy(scriptFile: string, replacements?: { [key: string]: string }): Chainable<any>
|
|
12
|
+
executeGroovy(scriptFile: string, replacements?: { [key: string]: string }, jahiaServer?: JahiaServer): Chainable<any>
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
type JahiaServer = {
|
|
18
|
+
url: string;
|
|
19
|
+
username: string;
|
|
20
|
+
password: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const serverDefaults = {
|
|
24
|
+
url: Cypress.config().baseUrl,
|
|
25
|
+
username: 'root',
|
|
26
|
+
password: Cypress.env('SUPER_USER_PASSWORD')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const executeGroovy = function (scriptFile: string, replacements?: { [key: string]: string }, jahiaServer: JahiaServer = serverDefaults): void {
|
|
18
30
|
cy.runProvisioningScript({
|
|
19
31
|
fileContent: '- executeScript: "' + scriptFile + '"',
|
|
20
32
|
type: 'application/yaml'
|
|
@@ -22,5 +34,5 @@ export const executeGroovy = function (scriptFile: string, replacements?: { [key
|
|
|
22
34
|
fileName: scriptFile,
|
|
23
35
|
replacements,
|
|
24
36
|
type: 'text/plain'
|
|
25
|
-
}]).then(r => r[0])
|
|
37
|
+
}], jahiaServer).then(r => r[0])
|
|
26
38
|
}
|
|
@@ -12,6 +12,7 @@ This commands execute a provisioning script
|
|
|
12
12
|
cy.runProvisioningScript({fileName:'prov.yaml', type:'application/yaml'})
|
|
13
13
|
cy.runProvisioningScript({fileName:'prov.yaml', type:'application/yaml'}, [{fileName: 'file1.zip'}])
|
|
14
14
|
cy.runProvisioningScript({fileContent:'- startBundle: "module"', type:'application/yaml'})
|
|
15
|
+
cy.runProvisioningScript({fileContent:'- startBundle: "module"', type:'application/yaml'}, null, {url: 'http://jahia-processing.jahia.net:8080', username: 'root', password: 'root1234'})
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
### Arguments
|
|
@@ -24,6 +25,14 @@ The script can be specified either from an external file (using fileName) or inl
|
|
|
24
25
|
- fileContent: (`string`) : The content of the script. If specified, fileName is ignored.
|
|
25
26
|
- type: (`string`) : Content type, either `application/yaml` or `application/json`
|
|
26
27
|
|
|
28
|
+
#### > jahiaServer (`JahiaServer`)
|
|
29
|
+
|
|
30
|
+
A Jahia server can be specified if there is a need to use something other than default. This is useful when using Jahia in cluster, if there is a need to redirect a provisioning script to a specific Jahia server (for example a processig node).
|
|
31
|
+
|
|
32
|
+
- url: (`string`) : The url of the server (for example: http://processing.jahia.net:8080)
|
|
33
|
+
- username: (`string`) : Root user
|
|
34
|
+
- password: (`string`) : Password for the root user
|
|
35
|
+
|
|
27
36
|
#### > files (`FormFile[]`)
|
|
28
37
|
|
|
29
38
|
Additional files that can be referenced in the script. When an operation requires a URL, directly specify the file name (without protocol) to use one these files
|
|
@@ -9,7 +9,7 @@ declare global {
|
|
|
9
9
|
namespace Cypress {
|
|
10
10
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
11
|
interface Chainable<Subject> {
|
|
12
|
-
runProvisioningScript(script: FormFile, files?: FormFile[]): Chainable<any>
|
|
12
|
+
runProvisioningScript(script: FormFile, files?: FormFile[], jahiaServer?: JahiaServer): Chainable<any>
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -22,6 +22,12 @@ type FormFile = {
|
|
|
22
22
|
replacements?: { [key: string]: string }
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
type JahiaServer = {
|
|
26
|
+
url: string;
|
|
27
|
+
username: string;
|
|
28
|
+
password: string
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
function processContent(formFile: FormFile) {
|
|
26
32
|
let content = formFile.fileContent;
|
|
27
33
|
if (formFile.replacements) {
|
|
@@ -46,7 +52,13 @@ function append(formFile: FormFile, formData: FormData, key: string) {
|
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
const serverDefaults: JahiaServer = {
|
|
56
|
+
url: Cypress.config().baseUrl,
|
|
57
|
+
username: 'root',
|
|
58
|
+
password: Cypress.env('SUPER_USER_PASSWORD')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const runProvisioningScript = (script: FormFile, files?: FormFile[], jahiaServer: JahiaServer = serverDefaults, options: Cypress.Loggable = {log:true}): void => {
|
|
50
62
|
const formData = new FormData()
|
|
51
63
|
|
|
52
64
|
append(script, formData, "script")
|
|
@@ -78,11 +90,11 @@ export const runProvisioningScript = (script: FormFile, files?: FormFile[], opti
|
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
cy.request({
|
|
81
|
-
url: `${
|
|
93
|
+
url: `${jahiaServer.url}/modules/api/provisioning`,
|
|
82
94
|
method: 'POST',
|
|
83
95
|
auth: {
|
|
84
|
-
user:
|
|
85
|
-
pass:
|
|
96
|
+
user: jahiaServer.username,
|
|
97
|
+
pass: jahiaServer.password,
|
|
86
98
|
sendImmediately: true,
|
|
87
99
|
},
|
|
88
100
|
body: formData,
|
|
@@ -4,6 +4,7 @@ import {login} from "./login"
|
|
|
4
4
|
import {logout} from "./logout"
|
|
5
5
|
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector'
|
|
6
6
|
import {fixture} from "./fixture";
|
|
7
|
+
import {repeatUntil} from "./repeatUntil";
|
|
7
8
|
|
|
8
9
|
export const registerSupport = (): void => {
|
|
9
10
|
Cypress.Commands.add('apolloClient', apolloClient)
|
|
@@ -14,6 +15,7 @@ export const registerSupport = (): void => {
|
|
|
14
15
|
|
|
15
16
|
Cypress.Commands.add('login', login)
|
|
16
17
|
Cypress.Commands.add('logout', logout)
|
|
18
|
+
Cypress.Commands.add('repeatUntil', repeatUntil)
|
|
17
19
|
|
|
18
20
|
Cypress.Commands.overwrite('fixture', fixture)
|
|
19
21
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# repeatUntil
|
|
2
|
+
|
|
3
|
+
This commands reload or repeat a function until an item is visible in the page
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
### Usage
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
cy.repeatUntil('div:contains("some text")')
|
|
11
|
+
cy.repeatUntil('div:contains("some text")', {attempts: 10, reloadCallback: () => { cy.reload() }, delay: 1000})
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Arguments
|
|
15
|
+
|
|
16
|
+
#### > selector (`string`)
|
|
17
|
+
|
|
18
|
+
The selector that is being searched in the page
|
|
19
|
+
|
|
20
|
+
#### > options (`RepeatUntilOptions`)
|
|
21
|
+
|
|
22
|
+
- `attempts`: max number of attempts
|
|
23
|
+
- `callback`: the callback to execute if the item is not found. By default, do a `cy.reload()`
|
|
24
|
+
- `delay`: time to wait between each attemps (ms)
|
|
25
|
+
|
|
26
|
+
### Yields
|
|
27
|
+
|
|
28
|
+
The found element
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
|
|
32
|
+
### Requirements
|
|
33
|
+
|
|
34
|
+
- `cy.repeatUntil()` requires being chained off of `cy`.
|
|
35
|
+
|
|
36
|
+
### Assertions
|
|
37
|
+
|
|
38
|
+
### Timeouts
|
|
39
|
+
|
|
40
|
+
## Command Log
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
|
|
2
|
+
|
|
3
|
+
// Load type definitions that come with Cypress module
|
|
4
|
+
/// <reference types="cypress" />
|
|
5
|
+
|
|
6
|
+
type RepeatUntilOptions = {
|
|
7
|
+
attempts: number,
|
|
8
|
+
callback: () => void,
|
|
9
|
+
delay: number,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const defaultOptions: RepeatUntilOptions = {
|
|
13
|
+
attempts: 10,
|
|
14
|
+
callback: () => cy.reload({log:false}),
|
|
15
|
+
delay: 1000
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare global {
|
|
19
|
+
namespace Cypress {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
+
interface Chainable<Subject> {
|
|
22
|
+
repeatUntil(selector: string, options?: Partial<RepeatUntilOptions>): Chainable<JQuery>
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const repeatUntil = (selector: string, options: Partial<RepeatUntilOptions> = {}): void => {
|
|
28
|
+
options = { ...defaultOptions, ...options }
|
|
29
|
+
|
|
30
|
+
const log = Cypress.log({
|
|
31
|
+
name: 'repeatUntil',
|
|
32
|
+
message: `Reload until ${selector}, remaining attempts : ${options.attempts}`,
|
|
33
|
+
consoleProps: () => {
|
|
34
|
+
return {
|
|
35
|
+
attempts: options.attempts,
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const items = Cypress.$(selector)
|
|
41
|
+
if (items.length) {
|
|
42
|
+
log.set({ $el: items })
|
|
43
|
+
cy.wrap(items, {log: false})
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (options.attempts > 1) {
|
|
48
|
+
log.end()
|
|
49
|
+
options.callback()
|
|
50
|
+
|
|
51
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
52
|
+
cy.wait(options.delay)
|
|
53
|
+
cy.repeatUntil(selector, {...options, attempts: options.attempts - 1})
|
|
54
|
+
} else {
|
|
55
|
+
const err = Error('Items not found.')
|
|
56
|
+
log.error(err)
|
|
57
|
+
throw err
|
|
58
|
+
}
|
|
59
|
+
}
|
package/.idea/jahia-cypress.iml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/jahia-cypress.iml" filepath="$PROJECT_DIR$/.idea/jahia-cypress.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/vcs.xml
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
import { BaseComponent } from "./baseComponent";
|
|
3
|
-
import Chainable = Cypress.Chainable;
|
|
4
|
-
export declare class IFrame extends BaseComponent {
|
|
5
|
-
static defaultSelector: string;
|
|
6
|
-
private body;
|
|
7
|
-
constructor(element: Chainable<JQuery>, assertion?: (s: JQuery) => void);
|
|
8
|
-
getBody(): Chainable<JQuery>;
|
|
9
|
-
enter(): void;
|
|
10
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
exports.__esModule = true;
|
|
18
|
-
exports.IFrame = void 0;
|
|
19
|
-
var baseComponent_1 = require("./baseComponent");
|
|
20
|
-
var IFrame = /** @class */ (function (_super) {
|
|
21
|
-
__extends(IFrame, _super);
|
|
22
|
-
function IFrame(element, assertion) {
|
|
23
|
-
var _this = _super.call(this, element, assertion) || this;
|
|
24
|
-
_this.get()
|
|
25
|
-
.should(function (f) {
|
|
26
|
-
var fr = f[0];
|
|
27
|
-
expect(fr.contentWindow.location.href).not.equals('about:blank');
|
|
28
|
-
expect(fr.contentWindow.document.readyState).equals('complete');
|
|
29
|
-
expect(fr.contentDocument.body).not.be.empty;
|
|
30
|
-
})
|
|
31
|
-
.its('0.contentDocument.body').as('framebody' + _this.id);
|
|
32
|
-
return _this;
|
|
33
|
-
}
|
|
34
|
-
IFrame.prototype.getBody = function () {
|
|
35
|
-
return cy.get('@framebody' + this.id);
|
|
36
|
-
};
|
|
37
|
-
IFrame.prototype.enter = function () {
|
|
38
|
-
this.get().then(function (f) {
|
|
39
|
-
var fr = f[0];
|
|
40
|
-
cy.visit(fr.contentWindow.location.href);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
IFrame.defaultSelector = 'iframe';
|
|
44
|
-
return IFrame;
|
|
45
|
-
}(baseComponent_1.BaseComponent));
|
|
46
|
-
exports.IFrame = IFrame;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
import { BaseComponent } from "../baseComponent";
|
|
3
|
-
import TypeOptions = Cypress.TypeOptions;
|
|
4
|
-
export declare class MUIInput extends BaseComponent {
|
|
5
|
-
static defaultSelector: string;
|
|
6
|
-
clear(): MUIInput;
|
|
7
|
-
type(text: string, options?: Partial<TypeOptions>): MUIInput;
|
|
8
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
exports.__esModule = true;
|
|
18
|
-
exports.MUIInput = void 0;
|
|
19
|
-
var baseComponent_1 = require("../baseComponent");
|
|
20
|
-
var MUIInput = /** @class */ (function (_super) {
|
|
21
|
-
__extends(MUIInput, _super);
|
|
22
|
-
function MUIInput() {
|
|
23
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
}
|
|
25
|
-
MUIInput.prototype.clear = function () {
|
|
26
|
-
this.get().clear();
|
|
27
|
-
return this;
|
|
28
|
-
};
|
|
29
|
-
MUIInput.prototype.type = function (text, options) {
|
|
30
|
-
this.get().type(text, options);
|
|
31
|
-
return this;
|
|
32
|
-
};
|
|
33
|
-
MUIInput.defaultSelector = 'div';
|
|
34
|
-
return MUIInput;
|
|
35
|
-
}(baseComponent_1.BaseComponent));
|
|
36
|
-
exports.MUIInput = MUIInput;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
exports.__esModule = true;
|
|
18
|
-
exports.MUIRadio = void 0;
|
|
19
|
-
var baseComponent_1 = require("../baseComponent");
|
|
20
|
-
var MUIRadio = /** @class */ (function (_super) {
|
|
21
|
-
__extends(MUIRadio, _super);
|
|
22
|
-
function MUIRadio() {
|
|
23
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
}
|
|
25
|
-
MUIRadio.prototype.click = function () {
|
|
26
|
-
this.get().click();
|
|
27
|
-
return this;
|
|
28
|
-
};
|
|
29
|
-
MUIRadio.defaultSelector = 'label';
|
|
30
|
-
return MUIRadio;
|
|
31
|
-
}(baseComponent_1.BaseComponent));
|
|
32
|
-
exports.MUIRadio = MUIRadio;
|
package/fixtures/test.json
DELETED
|
File without changes
|