dceky 1.0.22 → 1.0.24
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/cypress/e2e/profile-test.cy.ts +1 -1
- package/lib/src/commands/handleHarvardKey.d.ts +1 -1
- package/lib/src/commands/handleHarvardKey.js +37 -35
- package/lib/src/commands/handleHarvardKey.js.map +1 -1
- package/lib/src/commands/index.js +6 -4
- package/lib/src/commands/index.js.map +1 -1
- package/lib/src/commands/launchAs.js +70 -68
- package/lib/src/commands/launchAs.js.map +1 -1
- package/lib/src/commands/logIntoPorta.d.ts +22 -0
- package/lib/src/commands/logIntoPorta.js +127 -0
- package/lib/src/commands/logIntoPorta.js.map +1 -0
- package/package.json +2 -2
- package/src/commands/handleHarvardKey.ts +41 -38
- package/src/commands/launchAs.ts +90 -88
- package/src/commands/logIntoPorta.ts +65 -61
- package/lib/commands/assertDoesNotHaveClass.d.ts +0 -18
- package/lib/commands/assertDoesNotHaveClass.js +0 -17
- package/lib/commands/assertDoesNotHaveClass.js.map +0 -1
- package/lib/commands/assertHasClass.d.ts +0 -18
- package/lib/commands/assertHasClass.js +0 -17
- package/lib/commands/assertHasClass.js.map +0 -1
- package/lib/commands/assertNumElements.d.ts +0 -18
- package/lib/commands/assertNumElements.js +0 -17
- package/lib/commands/assertNumElements.js.map +0 -1
- package/lib/commands/clickWithRetry.d.ts +0 -19
- package/lib/commands/clickWithRetry.js +0 -29
- package/lib/commands/clickWithRetry.js.map +0 -1
- package/lib/commands/genTextOfLength.d.ts +0 -20
- package/lib/commands/genTextOfLength.js +0 -20
- package/lib/commands/genTextOfLength.js.map +0 -1
- package/lib/commands/getAttribute.d.ts +0 -20
- package/lib/commands/getAttribute.js +0 -22
- package/lib/commands/getAttribute.js.map +0 -1
- package/lib/commands/getClassName.d.ts +0 -15
- package/lib/commands/getClassName.js +0 -21
- package/lib/commands/getClassName.js.map +0 -1
- package/lib/commands/getCurrentDateInfo.d.ts +0 -21
- package/lib/commands/getCurrentDateInfo.js +0 -25
- package/lib/commands/getCurrentDateInfo.js.map +0 -1
- package/lib/commands/getId.d.ts +0 -15
- package/lib/commands/getId.js +0 -21
- package/lib/commands/getId.js.map +0 -1
- package/lib/commands/getNumElements.d.ts +0 -14
- package/lib/commands/getNumElements.js +0 -19
- package/lib/commands/getNumElements.js.map +0 -1
- package/lib/commands/getSpecialChars.d.ts +0 -14
- package/lib/commands/getSpecialChars.js +0 -16
- package/lib/commands/getSpecialChars.js.map +0 -1
- package/lib/commands/getTitle.d.ts +0 -13
- package/lib/commands/getTitle.js +0 -20
- package/lib/commands/getTitle.js.map +0 -1
- package/lib/commands/handleHarvardKey.d.ts +0 -18
- package/lib/commands/handleHarvardKey.js +0 -56
- package/lib/commands/handleHarvardKey.js.map +0 -1
- package/lib/commands/handleHarvardKey2.d.ts +0 -14
- package/lib/commands/handleHarvardKey2.js +0 -88
- package/lib/commands/handleHarvardKey2.js.map +0 -1
- package/lib/commands/launchAs.d.ts +0 -20
- package/lib/commands/launchAs.js +0 -60
- package/lib/commands/launchAs.js.map +0 -1
- package/lib/commands/launchLTIUsingToken.d.ts +0 -19
- package/lib/commands/launchLTIUsingToken.js +0 -74
- package/lib/commands/launchLTIUsingToken.js.map +0 -1
- package/lib/commands/listSelectLabels.d.ts +0 -15
- package/lib/commands/listSelectLabels.js +0 -24
- package/lib/commands/listSelectLabels.js.map +0 -1
- package/lib/commands/listSelectValues.d.ts +0 -15
- package/lib/commands/listSelectValues.js +0 -26
- package/lib/commands/listSelectValues.js.map +0 -1
- package/lib/commands/navigateToHref.d.ts +0 -19
- package/lib/commands/navigateToHref.js +0 -23
- package/lib/commands/navigateToHref.js.map +0 -1
- package/lib/commands/padWithZeros.d.ts +0 -20
- package/lib/commands/padWithZeros.js +0 -24
- package/lib/commands/padWithZeros.js.map +0 -1
- package/lib/commands/runScript.d.ts +0 -16
- package/lib/commands/runScript.js +0 -25
- package/lib/commands/runScript.js.map +0 -1
- package/lib/commands/typeInto.d.ts +0 -20
- package/lib/commands/typeInto.js +0 -28
- package/lib/commands/typeInto.js.map +0 -1
- package/lib/commands/uniquify.d.ts +0 -15
- package/lib/commands/uniquify.js +0 -25
- package/lib/commands/uniquify.js.map +0 -1
- package/lib/commands/visitCanvasEndpoint.d.ts +0 -27
- package/lib/commands/visitCanvasEndpoint.js +0 -35
- package/lib/commands/visitCanvasEndpoint.js.map +0 -1
- package/lib/commands/visitCanvasGETEndpoint.d.ts +0 -20
- package/lib/commands/visitCanvasGETEndpoint.js +0 -26
- package/lib/commands/visitCanvasGETEndpoint.js.map +0 -1
- package/lib/commands/waitForAtLeastOneElementPresent.d.ts +0 -23
- package/lib/commands/waitForAtLeastOneElementPresent.js +0 -27
- package/lib/commands/waitForAtLeastOneElementPresent.js.map +0 -1
- package/lib/commands/waitForElementVisible.d.ts +0 -14
- package/lib/commands/waitForElementVisible.js +0 -20
- package/lib/commands/waitForElementVisible.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/init.d.ts +0 -6
- package/lib/init.js +0 -69
- package/lib/init.js.map +0 -1
- package/lib/postinstall/helpers/exec.d.ts +0 -8
- package/lib/postinstall/helpers/exec.js +0 -18
- package/lib/postinstall/helpers/exec.js.map +0 -1
- package/lib/setup/checkRequiredFiles.d.ts +0 -6
- package/lib/setup/checkRequiredFiles.js +0 -60
- package/lib/setup/checkRequiredFiles.js.map +0 -1
- package/lib/setup/genEmptyGlobalFile.d.ts +0 -7
- package/lib/setup/genEmptyGlobalFile.js +0 -41
- package/lib/setup/genEmptyGlobalFile.js.map +0 -1
- package/lib/src/commands/launchLTIUsingToken.d.ts +0 -21
- package/lib/src/commands/launchLTIUsingToken.js +0 -76
- package/lib/src/commands/launchLTIUsingToken.js.map +0 -1
- package/lib/src/commands/visitCanvasGETEndpoint.d.ts +0 -20
- package/lib/src/commands/visitCanvasGETEndpoint.js +0 -26
- package/lib/src/commands/visitCanvasGETEndpoint.js.map +0 -1
- package/lib/src/init.d.ts +0 -6
- package/lib/src/init.js +0 -71
- package/lib/src/init.js.map +0 -1
- package/lib/src/node.d.ts +0 -2
- package/lib/src/node.js +0 -10
- package/lib/src/node.js.map +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Get the labels of all the options within a select element
|
|
6
|
-
* @author Allison Zhang
|
|
7
|
-
* @param selector the CSS selector of the select element
|
|
8
|
-
* @returns an array of strings representing the labels of the options
|
|
9
|
-
*/
|
|
10
|
-
listSelectLabels(selector: string): Chainable<String[]>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
declare const listSelectLabels: () => void;
|
|
15
|
-
export default listSelectLabels;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var listSelectLabels = function () {
|
|
8
|
-
Cypress.Commands.add('listSelectLabels', function (selector) {
|
|
9
|
-
var labels = [];
|
|
10
|
-
return (cy
|
|
11
|
-
.get(selector + ' option')
|
|
12
|
-
.each(function (option) {
|
|
13
|
-
labels.push(option.attr('label') || option.text());
|
|
14
|
-
})
|
|
15
|
-
.then(function () {
|
|
16
|
-
return labels;
|
|
17
|
-
}));
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
/*----------------------------------------*/
|
|
21
|
-
/* --------------- Export --------------- */
|
|
22
|
-
/*----------------------------------------*/
|
|
23
|
-
exports.default = listSelectLabels;
|
|
24
|
-
//# sourceMappingURL=listSelectLabels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listSelectLabels.js","sourceRoot":"","sources":["../../src/commands/listSelectLabels.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,gBAAgB,GAAG;IACvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB,EAAE,UAAC,QAAgB;QACxD,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,OAAO,CACL,EAAE;aACC,GAAG,CAAC,QAAQ,GAAG,SAAS,CAAC;aACzB,IAAI,CAAC,UAAC,MAAM;YACX,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACrD,CAAC,CAAC;aACD,IAAI,CAAC;YACJ,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Get the values of all the options within a select element
|
|
6
|
-
* @author Allison Zhang
|
|
7
|
-
* @param selector the CSS selector of the select element
|
|
8
|
-
* @returns an array of strings representing the values of the options
|
|
9
|
-
*/
|
|
10
|
-
listSelectValues(selector: string): Chainable<String[]>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
declare const listSelectValues: () => void;
|
|
15
|
-
export default listSelectValues;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var listSelectValues = function () {
|
|
8
|
-
Cypress.Commands.add('listSelectValues', function (selector) {
|
|
9
|
-
var vals = [];
|
|
10
|
-
return (cy
|
|
11
|
-
.get(selector + ' option')
|
|
12
|
-
.each(function (option) {
|
|
13
|
-
cy.wrap(option).invoke('attr', 'value').then(function (value) {
|
|
14
|
-
vals.push(value || option.text());
|
|
15
|
-
});
|
|
16
|
-
})
|
|
17
|
-
.then(function () {
|
|
18
|
-
return vals;
|
|
19
|
-
}));
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
/*----------------------------------------*/
|
|
23
|
-
/* --------------- Export --------------- */
|
|
24
|
-
/*----------------------------------------*/
|
|
25
|
-
exports.default = listSelectValues;
|
|
26
|
-
//# sourceMappingURL=listSelectValues.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listSelectValues.js","sourceRoot":"","sources":["../../src/commands/listSelectValues.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,gBAAgB,GAAG;IACvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,kBAAkB,EAAE,UAAC,QAAgB;QACxD,IAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,OAAO,CACL,EAAE;aACC,GAAG,CAAC,QAAQ,GAAG,SAAS,CAAC;aACzB,IAAI,CAAC,UAAC,MAAM;YACX,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,KAAK;gBACjD,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,IAAI,CAAC;YACJ,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Navigate to href attribute of Harvard identity provider button
|
|
6
|
-
* @param opts object containing all arguments
|
|
7
|
-
* @param opts.item the CSS selector of interest
|
|
8
|
-
* @param opts.domain the domain of the page
|
|
9
|
-
* @returns The full URL constructed from the href
|
|
10
|
-
*/
|
|
11
|
-
navigateToHref(opts: {
|
|
12
|
-
item: string;
|
|
13
|
-
domain: string;
|
|
14
|
-
}): Chainable<string>;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
declare const navigateToHref: () => void;
|
|
19
|
-
export default navigateToHref;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var navigateToHref = function () {
|
|
8
|
-
Cypress.Commands.add('navigateToHref', function (opts) {
|
|
9
|
-
var item = opts.item, domain = opts.domain;
|
|
10
|
-
cy.waitForElementVisible(item);
|
|
11
|
-
return cy
|
|
12
|
-
.get(item)
|
|
13
|
-
.invoke('attr', 'href')
|
|
14
|
-
.then(function (href) {
|
|
15
|
-
return domain + href;
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
/*----------------------------------------*/
|
|
20
|
-
/* --------------- Export --------------- */
|
|
21
|
-
/*----------------------------------------*/
|
|
22
|
-
exports.default = navigateToHref;
|
|
23
|
-
//# sourceMappingURL=navigateToHref.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigateToHref.js","sourceRoot":"","sources":["../../src/commands/navigateToHref.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA0BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,cAAc,GAAG;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,gBAAgB,EAChB,UACE,IAGC;QAEK,IAAA,IAAI,GAAa,IAAI,KAAjB,EAAE,MAAM,GAAK,IAAI,OAAT,CAAU;QAE9B,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,EAAE;aACN,GAAG,CAAC,IAAI,CAAC;aACT,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;aACtB,IAAI,CAAC,UAAC,IAAS;YACd,OAAO,MAAM,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,cAAc,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Pads a number with leading zeros to a user-defined length.
|
|
6
|
-
* @author Allison Zhang
|
|
7
|
-
* @param opts options object
|
|
8
|
-
* @param opts.length the desired total length of the output string, must be larger than the length of the number
|
|
9
|
-
* @param opts.number the number to be padded with leading zeros
|
|
10
|
-
* @returns padded string with leading zeros
|
|
11
|
-
*/
|
|
12
|
-
padWithZeros(opts: {
|
|
13
|
-
length: number;
|
|
14
|
-
number: number;
|
|
15
|
-
}): Chainable<string>;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
declare const padWithZeros: () => void;
|
|
20
|
-
export default padWithZeros;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var padWithZeros = function () {
|
|
8
|
-
Cypress.Commands.add('padWithZeros', function (opts) {
|
|
9
|
-
var length = opts.length, number = opts.number;
|
|
10
|
-
return (cy
|
|
11
|
-
.then(function () {
|
|
12
|
-
var numberString = number.toString();
|
|
13
|
-
while (numberString.length < length) {
|
|
14
|
-
numberString = '0' + numberString;
|
|
15
|
-
}
|
|
16
|
-
return numberString;
|
|
17
|
-
}));
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
/*----------------------------------------*/
|
|
21
|
-
/* --------------- Export --------------- */
|
|
22
|
-
/*----------------------------------------*/
|
|
23
|
-
exports.default = padWithZeros;
|
|
24
|
-
//# sourceMappingURL=padWithZeros.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"padWithZeros.js","sourceRoot":"","sources":["../../src/commands/padWithZeros.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAyBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,YAAY,GAAG;IACnB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,EAAE,UAAC,IAAwC;QAE1E,IAAA,MAAM,GAEJ,IAAI,OAFA,EACN,MAAM,GACJ,IAAI,OADA,CACC;QACT,OAAO,CACL,EAAE;aACC,IAAI,CAAC;YACJ,IAAI,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrC,OAAO,YAAY,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;gBACpC,YAAY,GAAG,GAAG,GAAG,YAAY,CAAC;YACpC,CAAC;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,YAAY,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Run a script on the page
|
|
6
|
-
* @param scriptLines the script to run in an anonymous function on the page.
|
|
7
|
-
* If multiple script arguments are included, each argument will be considered a
|
|
8
|
-
* new line of the script.
|
|
9
|
-
* @returns return value of the script
|
|
10
|
-
*/
|
|
11
|
-
runScript(...scriptLines: string[]): Chainable<any>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
declare const runScript: () => void;
|
|
16
|
-
export default runScript;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var runScript = function () {
|
|
8
|
-
Cypress.Commands.add('runScript', function () {
|
|
9
|
-
var scriptLines = [];
|
|
10
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
11
|
-
scriptLines[_i] = arguments[_i];
|
|
12
|
-
}
|
|
13
|
-
cy.log('Running script');
|
|
14
|
-
var fullScript = scriptLines.join('\n');
|
|
15
|
-
return cy.window().then(function (win) {
|
|
16
|
-
var result = win.eval(fullScript);
|
|
17
|
-
return cy.wrap(result);
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
/*----------------------------------------*/
|
|
22
|
-
/* --------------- Export --------------- */
|
|
23
|
-
/*----------------------------------------*/
|
|
24
|
-
exports.default = runScript;
|
|
25
|
-
//# sourceMappingURL=runScript.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runScript.js","sourceRoot":"","sources":["../../src/commands/runScript.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAqBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,SAAS,GAAG;IAChB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,WAAW,EACX;QACE,qBAAwB;aAAxB,UAAwB,EAAxB,qBAAwB,EAAxB,IAAwB;YAAxB,gCAAwB;;QAE1B,EAAE,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACzB,IAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1C,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAC,GAAQ;YAC/B,IAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACpC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,SAAS,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Type text into an element. This function first removes the previous text in the element
|
|
6
|
-
* @param opts object containing all arguments
|
|
7
|
-
* @param opts.item the CSS selector of interest
|
|
8
|
-
* @param opts.text the text to type
|
|
9
|
-
* @param opts.pressEnter if true, after typing into the text field, simulate pressing enter
|
|
10
|
-
*/
|
|
11
|
-
typeInto(opts: {
|
|
12
|
-
item: string;
|
|
13
|
-
text: string;
|
|
14
|
-
pressEnter?: boolean;
|
|
15
|
-
}): Chainable<Element>;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
declare const typeInto: () => void;
|
|
20
|
-
export default typeInto;
|
package/lib/commands/typeInto.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var typeInto = function () {
|
|
8
|
-
Cypress.Commands.add('typeInto', function (opts) {
|
|
9
|
-
var item = opts.item, text = opts.text, pressEnter = opts.pressEnter;
|
|
10
|
-
cy.log("Type \"".concat(text, "\" into ").concat(item));
|
|
11
|
-
// Check if the text contains an enter key press
|
|
12
|
-
var enterAtEndOfText = text.charAt(text.length - 1) === '\n';
|
|
13
|
-
// Type the text without a trailing enter if there was one
|
|
14
|
-
var textWithoutTrailingEnter = enterAtEndOfText
|
|
15
|
-
? text.substring(0, text.length - 1)
|
|
16
|
-
: text;
|
|
17
|
-
cy.get(item).clear().type(textWithoutTrailingEnter);
|
|
18
|
-
// Press enter if explicitly requested or if text ended with newline
|
|
19
|
-
if (pressEnter || enterAtEndOfText) {
|
|
20
|
-
cy.get(item).type('{enter}');
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
/*----------------------------------------*/
|
|
25
|
-
/* --------------- Export --------------- */
|
|
26
|
-
/*----------------------------------------*/
|
|
27
|
-
exports.default = typeInto;
|
|
28
|
-
//# sourceMappingURL=typeInto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typeInto.js","sourceRoot":"","sources":["../../src/commands/typeInto.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAyBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,QAAQ,GAAG;IACf,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,UAAU,EACV,UACE,IAIC;QAEK,IAAA,IAAI,GAAuB,IAAI,KAA3B,EAAE,IAAI,GAAiB,IAAI,KAArB,EAAE,UAAU,GAAK,IAAI,WAAT,CAAU;QACxC,EAAE,CAAC,GAAG,CAAC,iBAAS,IAAI,qBAAU,IAAI,CAAE,CAAC,CAAC;QAEtC,gDAAgD;QAChD,IAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC;QAE/D,0DAA0D;QAC1D,IAAM,wBAAwB,GAAG,gBAAgB;YAC/C,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;YACpC,CAAC,CAAC,IAAI,CAAC;QAET,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAEpD,oEAAoE;QACpE,IAAI,UAAU,IAAI,gBAAgB,EAAE,CAAC;YACnC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,QAAQ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Makes a string unique by appending a timestamp and a counter.
|
|
6
|
-
* @author Allison Zhang
|
|
7
|
-
* @param text the original string
|
|
8
|
-
* @returns the uniquified string
|
|
9
|
-
*/
|
|
10
|
-
uniquify(text: string): string;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
declare const uniquify: () => void;
|
|
15
|
-
export default uniquify;
|
package/lib/commands/uniquify.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Helpers -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var uniqueCounter = 1;
|
|
8
|
-
var shorten = function (num) {
|
|
9
|
-
return Number(num).toString(36);
|
|
10
|
-
};
|
|
11
|
-
var id = shorten(Math.floor(Math.random() * 10000));
|
|
12
|
-
/*----------------------------------------*/
|
|
13
|
-
/* --------------- Command -------------- */
|
|
14
|
-
/*----------------------------------------*/
|
|
15
|
-
var uniquify = function () {
|
|
16
|
-
Cypress.Commands.add('uniquify', function (text) {
|
|
17
|
-
var thisCounter = uniqueCounter++;
|
|
18
|
-
return "".concat(text, " [").concat(shorten(Number.parseInt("".concat(Date.now()).concat(thisCounter).concat(id), 10)), "]");
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
/*----------------------------------------*/
|
|
22
|
-
/* --------------- Export --------------- */
|
|
23
|
-
/*----------------------------------------*/
|
|
24
|
-
exports.default = uniquify;
|
|
25
|
-
//# sourceMappingURL=uniquify.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uniquify.js","sourceRoot":"","sources":["../../src/commands/uniquify.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAoBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAI,aAAa,GAAG,CAAC,CAAC;AAEtB,IAAM,OAAO,GAAG,UAAC,GAAW;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,IAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;AAEtD,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,QAAQ,GAAG;IACf,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,UAAC,IAAY;QAC5C,IAAM,WAAW,GAAG,aAAa,EAAE,CAAC;QACpC,OAAO,UAAG,IAAI,eAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAG,IAAI,CAAC,GAAG,EAAE,SAAG,WAAW,SAAG,EAAE,CAAE,EAAE,EAAE,CAAC,CAAC,MAAG,CAAC;IACzF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,QAAQ,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Send a request to a Canvas API endpoint.
|
|
6
|
-
* @author Allison Zhang
|
|
7
|
-
* @param opts options object
|
|
8
|
-
* @param opts.method the HTTP method (e.g., 'GET', 'POST', 'DELETE')
|
|
9
|
-
* @param opts.path the API endpoint path excluding 'https://canvas.harvard.edu', (e.g., '/api/v1/courses/123')
|
|
10
|
-
* @param opts.accessToken the access token for authentication
|
|
11
|
-
* @param opts.params the request params (if any)
|
|
12
|
-
* @returns response body
|
|
13
|
-
* @example cy.visitCanvasEndpoint({ method: 'POST', path, accessToken, params }).then((res) => { ... })
|
|
14
|
-
*/
|
|
15
|
-
visitCanvasEndpoint(opts: {
|
|
16
|
-
method: string;
|
|
17
|
-
path: string;
|
|
18
|
-
accessToken: string;
|
|
19
|
-
params?: {
|
|
20
|
-
[k: string]: any;
|
|
21
|
-
};
|
|
22
|
-
}): Chainable<any>;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
declare const visitCanvasEndpoint: () => void;
|
|
27
|
-
export default visitCanvasEndpoint;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
/*----------------------------------------*/
|
|
16
|
-
/* --------------- Command -------------- */
|
|
17
|
-
/*----------------------------------------*/
|
|
18
|
-
var visitCanvasEndpoint = function () {
|
|
19
|
-
Cypress.Commands.add('visitCanvasEndpoint', function (opts) {
|
|
20
|
-
return (cy
|
|
21
|
-
.request({
|
|
22
|
-
method: opts.method,
|
|
23
|
-
url: 'https://canvas.harvard.edu' + opts.path,
|
|
24
|
-
body: __assign(__assign({}, (opts.params || {})), { access_token: opts.accessToken }),
|
|
25
|
-
})
|
|
26
|
-
.then(function (response) {
|
|
27
|
-
return response.body;
|
|
28
|
-
}));
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
/*----------------------------------------*/
|
|
32
|
-
/* --------------- Export --------------- */
|
|
33
|
-
/*----------------------------------------*/
|
|
34
|
-
exports.default = visitCanvasEndpoint;
|
|
35
|
-
//# sourceMappingURL=visitCanvasEndpoint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitCanvasEndpoint.js","sourceRoot":"","sources":["../../src/commands/visitCanvasEndpoint.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;;;;;;;;;;;AAgCjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,mBAAmB,GAAG;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,EAAE,UAC1C,IAOC;QACD,OAAO,CACL,EAAE;aACC,OAAO,CAAC;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE,4BAA4B,GAAG,IAAI,CAAC,IAAI;YAC7C,IAAI,wBACC,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,KACtB,YAAY,EAAE,IAAI,CAAC,WAAW,GAC/B;SACF,CAAC;aACH,IAAI,CAAC,UAAC,QAAQ;YACb,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Makes a GET request to Canvas API endpoint
|
|
6
|
-
* @param opts object containing all arguments
|
|
7
|
-
* @param opts.path The API path (e.g., '/courses', '/users/self')
|
|
8
|
-
* @param opts.accessToken The Canvas access token
|
|
9
|
-
* @returns The API response body
|
|
10
|
-
* @example cy.visitCanvasGETEndpoint({ path: '/courses', accessToken: 'your_token' })
|
|
11
|
-
*/
|
|
12
|
-
visitCanvasGETEndpoint(opts: {
|
|
13
|
-
path: string;
|
|
14
|
-
accessToken: string;
|
|
15
|
-
}): Chainable<any>;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
declare const visitCanvasGETEndpoint: () => void;
|
|
20
|
-
export default visitCanvasGETEndpoint;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var visitCanvasGETEndpoint = function () {
|
|
8
|
-
Cypress.Commands.add('visitCanvasGETEndpoint', function (opts) {
|
|
9
|
-
cy.log('Visiting Canvas GET endpoint');
|
|
10
|
-
var path = opts.path, accessToken = opts.accessToken;
|
|
11
|
-
cy.log('Canvas API: ' + path);
|
|
12
|
-
return cy.request({
|
|
13
|
-
method: 'GET',
|
|
14
|
-
url: 'https://canvas.harvard.edu/api/v1' + path,
|
|
15
|
-
qs: {
|
|
16
|
-
per_page: 200,
|
|
17
|
-
access_token: accessToken
|
|
18
|
-
}
|
|
19
|
-
}).its('body');
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
/*----------------------------------------*/
|
|
23
|
-
/* --------------- Export --------------- */
|
|
24
|
-
/*----------------------------------------*/
|
|
25
|
-
exports.default = visitCanvasGETEndpoint;
|
|
26
|
-
//# sourceMappingURL=visitCanvasGETEndpoint.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visitCanvasGETEndpoint.js","sourceRoot":"","sources":["../../src/commands/visitCanvasGETEndpoint.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA2BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,sBAAsB,GAAG;IAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,wBAAwB,EACxB,UACE,IAGC;QAEH,EAAE,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;QAC/B,IAAA,IAAI,GAAkB,IAAI,KAAtB,EAAE,WAAW,GAAK,IAAI,YAAT,CAAU;QAEnC,EAAE,CAAC,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;QAC9B,OAAO,EAAE,CAAC,OAAO,CAAC;YAChB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,mCAAmC,GAAG,IAAI;YAC/C,EAAE,EAAE;gBACF,QAAQ,EAAE,GAAG;gBACb,YAAY,EAAE,WAAW;aAC1B;SACF,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,sBAAsB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Wait for any element in a list to be present (check every tenth
|
|
6
|
-
* of a second for status)
|
|
7
|
-
* @author Gardenia Liu
|
|
8
|
-
* @param opts object containing all arguments
|
|
9
|
-
* @param opts.items list of CSS selectors of interest
|
|
10
|
-
* @param [opts.timeoutSec] the number of seconds to wait before
|
|
11
|
-
* timing out
|
|
12
|
-
* @returns the selector of the item that was found first, ties
|
|
13
|
-
* broken by which item shows up in the list first
|
|
14
|
-
*/
|
|
15
|
-
waitForAtLeastOneElementPresent(opts: {
|
|
16
|
-
items: string[];
|
|
17
|
-
timeoutSec?: number;
|
|
18
|
-
}): Chainable<string>;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
declare const waitForAtLeastOneElementPresent: () => void;
|
|
23
|
-
export default waitForAtLeastOneElementPresent;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var waitForAtLeastOneElementPresent = function () {
|
|
8
|
-
Cypress.Commands.add('waitForAtLeastOneElementPresent', function (opts) {
|
|
9
|
-
// Set timeout seconds to 10 if not specified
|
|
10
|
-
var timeoutMs = (opts.timeoutSec || 10) * 1000;
|
|
11
|
-
// Combined selector for all items
|
|
12
|
-
var combinedSelector = opts.items.join(', ');
|
|
13
|
-
// Wait for any of the elements to be visible
|
|
14
|
-
return (cy
|
|
15
|
-
.get(combinedSelector, { timeout: timeoutMs })
|
|
16
|
-
.should(function ($els) { return expect($els.is(':visible'), "at least one of [".concat(combinedSelector, "] visible")).to.be.true; })
|
|
17
|
-
.then(function ($els) {
|
|
18
|
-
var $firstVisible = $els.filter(':visible').first();
|
|
19
|
-
return opts.items.find(function (sel) { return $firstVisible.is(sel); });
|
|
20
|
-
}));
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
/*----------------------------------------*/
|
|
24
|
-
/* --------------- Export --------------- */
|
|
25
|
-
/*----------------------------------------*/
|
|
26
|
-
exports.default = waitForAtLeastOneElementPresent;
|
|
27
|
-
//# sourceMappingURL=waitForAtLeastOneElementPresent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waitForAtLeastOneElementPresent.js","sourceRoot":"","sources":["../../src/commands/waitForAtLeastOneElementPresent.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA8BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,+BAA+B,GAAG;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,iCAAiC,EACjC,UAAC,IAA8C;QAC7C,6CAA6C;QAC7C,IAAM,SAAS,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;QAEjD,kCAAkC;QAClC,IAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE/C,6CAA6C;QAC7C,OAAO,CACL,EAAE;aACC,GAAG,CAAC,gBAAgB,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;aAC7C,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,2BAAoB,gBAAgB,cAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAvF,CAAuF,CAAC;aACvG,IAAI,CAAC,UAAA,IAAI;YACR,IAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAA,GAAG,IAAI,OAAA,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,EAArB,CAAqB,CAAC,CAAC;QACvD,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,+BAA+B,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
namespace Cypress {
|
|
3
|
-
interface Chainable {
|
|
4
|
-
/**
|
|
5
|
-
* Wait for an element to be visible
|
|
6
|
-
* @param item the CSS selector of interest
|
|
7
|
-
* @param timeoutSec the number of seconds to wait before timing out (default: 10)
|
|
8
|
-
*/
|
|
9
|
-
waitForElementVisible(item: string, timeoutSec?: number): Chainable<JQuery<HTMLElement>>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
declare const waitForElementVisible: () => void;
|
|
14
|
-
export default waitForElementVisible;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/// <reference types="cypress" />
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/*----------------------------------------*/
|
|
5
|
-
/* --------------- Command -------------- */
|
|
6
|
-
/*----------------------------------------*/
|
|
7
|
-
var waitForElementVisible = function () {
|
|
8
|
-
Cypress.Commands.add('waitForElementVisible', function (item, timeoutSec) {
|
|
9
|
-
cy.log('Waiting for element to be visible');
|
|
10
|
-
timeoutSec = timeoutSec || 10;
|
|
11
|
-
var timeoutMs = timeoutSec * 1000;
|
|
12
|
-
cy.log("Wait for ".concat(item, " to be visible"));
|
|
13
|
-
return cy.get(item, { timeout: timeoutMs }).should('be.visible');
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
/*----------------------------------------*/
|
|
17
|
-
/* --------------- Export --------------- */
|
|
18
|
-
/*----------------------------------------*/
|
|
19
|
-
exports.default = waitForElementVisible;
|
|
20
|
-
//# sourceMappingURL=waitForElementVisible.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"waitForElementVisible.js","sourceRoot":"","sources":["../../src/commands/waitForElementVisible.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,qBAAqB,GAAG;IAC5B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,uBAAuB,EACvB,UACE,IAAY,EACZ,UAAmB;QAErB,EAAE,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QAC5C,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;QAE9B,IAAM,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QACpC,EAAE,CAAC,GAAG,CAAC,mBAAY,IAAI,mBAAgB,CAAC,CAAC;QACzC,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,qBAAqB,CAAC"}
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iBAAiB;AACjB,gDAA0B;AASxB,eATK,cAAI,CASL;AARN,wEAAkD;AAOhD,2BAPK,0BAAgB,CAOL;AALlB,sDAAsD;AACtD,IAAA,cAAI,GAAE,CAAC"}
|