dceky 1.0.5-beta.ky-declarations.13 → 1.0.6
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/README.md +45 -29
- package/lib/commands/assertDoesNotHaveClass.d.ts +18 -0
- package/lib/commands/assertDoesNotHaveClass.js +17 -0
- package/lib/commands/assertDoesNotHaveClass.js.map +1 -0
- package/lib/commands/assertHasClass.d.ts +18 -0
- package/lib/commands/assertHasClass.js +17 -0
- package/lib/commands/assertHasClass.js.map +1 -0
- package/lib/commands/assertNumElements.d.ts +18 -0
- package/lib/commands/assertNumElements.js +17 -0
- package/lib/commands/assertNumElements.js.map +1 -0
- package/lib/commands/clickWithRetry.d.ts +19 -0
- package/lib/commands/clickWithRetry.js +29 -0
- package/lib/commands/clickWithRetry.js.map +1 -0
- package/lib/commands/genTextOfLength.d.ts +20 -0
- package/lib/commands/genTextOfLength.js +20 -0
- package/lib/commands/genTextOfLength.js.map +1 -0
- package/lib/commands/getAttribute.d.ts +20 -0
- package/lib/commands/getAttribute.js +22 -0
- package/lib/commands/getAttribute.js.map +1 -0
- package/lib/commands/getClassName.d.ts +15 -0
- package/lib/commands/getClassName.js +21 -0
- package/lib/commands/getClassName.js.map +1 -0
- package/lib/commands/getCurrentDateInfo.d.ts +21 -0
- package/lib/commands/getCurrentDateInfo.js +25 -0
- package/lib/commands/getCurrentDateInfo.js.map +1 -0
- package/lib/commands/getId.d.ts +15 -0
- package/lib/commands/getId.js +21 -0
- package/lib/commands/getId.js.map +1 -0
- package/lib/commands/getNumElements.d.ts +14 -0
- package/lib/commands/getNumElements.js +19 -0
- package/lib/commands/getNumElements.js.map +1 -0
- package/lib/commands/getSpecialChars.d.ts +14 -0
- package/lib/commands/getSpecialChars.js +16 -0
- package/lib/commands/getSpecialChars.js.map +1 -0
- package/lib/commands/getTitle.d.ts +13 -0
- package/lib/commands/getTitle.js +20 -0
- package/lib/commands/getTitle.js.map +1 -0
- package/lib/commands/handleHarvardKey.d.ts +18 -0
- package/lib/commands/handleHarvardKey.js +56 -0
- package/lib/commands/handleHarvardKey.js.map +1 -0
- package/lib/commands/handleHarvardKey2.d.ts +14 -0
- package/lib/commands/handleHarvardKey2.js +88 -0
- package/lib/commands/handleHarvardKey2.js.map +1 -0
- package/lib/commands/launchAs.d.ts +20 -0
- package/lib/commands/launchAs.js +60 -0
- package/lib/commands/launchAs.js.map +1 -0
- package/lib/commands/launchLTIUsingToken.d.ts +19 -0
- package/lib/commands/launchLTIUsingToken.js +74 -0
- package/lib/commands/launchLTIUsingToken.js.map +1 -0
- package/lib/commands/listSelectLabels.d.ts +15 -0
- package/lib/commands/listSelectLabels.js +24 -0
- package/lib/commands/listSelectLabels.js.map +1 -0
- package/lib/commands/listSelectValues.d.ts +15 -0
- package/lib/commands/listSelectValues.js +26 -0
- package/lib/commands/listSelectValues.js.map +1 -0
- package/lib/commands/navigateToHref.d.ts +19 -0
- package/lib/commands/navigateToHref.js +23 -0
- package/lib/commands/navigateToHref.js.map +1 -0
- package/lib/commands/padWithZeros.d.ts +20 -0
- package/lib/commands/padWithZeros.js +24 -0
- package/lib/commands/padWithZeros.js.map +1 -0
- package/lib/commands/runScript.d.ts +16 -0
- package/lib/commands/runScript.js +25 -0
- package/lib/commands/runScript.js.map +1 -0
- package/lib/commands/typeInto.d.ts +20 -0
- package/lib/commands/typeInto.js +28 -0
- package/lib/commands/typeInto.js.map +1 -0
- package/lib/commands/uniquify.d.ts +15 -0
- package/lib/commands/uniquify.js +25 -0
- package/lib/commands/uniquify.js.map +1 -0
- package/lib/commands/visitCanvasEndpoint.d.ts +27 -0
- package/lib/commands/visitCanvasEndpoint.js +35 -0
- package/lib/commands/visitCanvasEndpoint.js.map +1 -0
- package/lib/commands/visitCanvasGETEndpoint.d.ts +20 -0
- package/lib/commands/visitCanvasGETEndpoint.js +26 -0
- package/lib/commands/visitCanvasGETEndpoint.js.map +1 -0
- package/lib/commands/waitForAtLeastOneElementPresent.d.ts +23 -0
- package/lib/commands/waitForAtLeastOneElementPresent.js +27 -0
- package/lib/commands/waitForAtLeastOneElementPresent.js.map +1 -0
- package/lib/commands/waitForElementVisible.d.ts +14 -0
- package/lib/commands/waitForElementVisible.js +20 -0
- package/lib/commands/waitForElementVisible.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/init.d.ts +6 -0
- package/lib/init.js +69 -0
- package/lib/init.js.map +1 -0
- package/lib/setup/checkRequiredFiles/index.js +7 -0
- package/lib/setup/checkRequiredFiles/index.js.map +1 -1
- package/lib/src/commands/extractDataFromClass.d.ts +7 -4
- package/lib/src/commands/extractDataFromClass.js +2 -1
- package/lib/src/commands/extractDataFromClass.js.map +1 -1
- package/lib/src/commands/extractDataFromClassByContents.d.ts +9 -5
- package/lib/src/commands/extractDataFromClassByContents.js +2 -1
- package/lib/src/commands/extractDataFromClassByContents.js.map +1 -1
- package/lib/src/commands/genTextOfLength.d.ts +20 -0
- package/lib/src/commands/genTextOfLength.js +20 -0
- package/lib/src/commands/genTextOfLength.js.map +1 -0
- package/lib/src/commands/getAttribute.d.ts +20 -0
- package/lib/src/commands/getAttribute.js +22 -0
- package/lib/src/commands/getAttribute.js.map +1 -0
- package/lib/src/commands/getClassName.d.ts +15 -0
- package/lib/src/commands/getClassName.js +21 -0
- package/lib/src/commands/getClassName.js.map +1 -0
- package/lib/src/commands/getCurrentDateInfo.d.ts +21 -0
- package/lib/src/commands/getCurrentDateInfo.js +25 -0
- package/lib/src/commands/getCurrentDateInfo.js.map +1 -0
- package/lib/src/commands/getId.d.ts +15 -0
- package/lib/src/commands/getId.js +21 -0
- package/lib/src/commands/getId.js.map +1 -0
- package/lib/src/commands/getJSON.d.ts +0 -1
- package/lib/src/commands/getJSON.js +1 -4
- package/lib/src/commands/getJSON.js.map +1 -1
- package/lib/src/commands/getSpecialChars.d.ts +14 -0
- package/lib/src/commands/getSpecialChars.js +16 -0
- package/lib/src/commands/getSpecialChars.js.map +1 -0
- package/lib/src/commands/getTitle.d.ts +13 -0
- package/lib/src/commands/getTitle.js +20 -0
- package/lib/src/commands/getTitle.js.map +1 -0
- package/lib/src/commands/index.js +29 -5
- package/lib/src/commands/index.js.map +1 -1
- package/lib/src/commands/launchLTIUsingToken.js +12 -4
- package/lib/src/commands/launchLTIUsingToken.js.map +1 -1
- package/lib/src/commands/listSelectLabels.d.ts +15 -0
- package/lib/src/commands/listSelectLabels.js +24 -0
- package/lib/src/commands/listSelectLabels.js.map +1 -0
- package/lib/src/commands/listSelectValues.d.ts +15 -0
- package/lib/src/commands/listSelectValues.js +27 -0
- package/lib/src/commands/listSelectValues.js.map +1 -0
- package/lib/src/commands/padWithZeros.d.ts +20 -0
- package/lib/src/commands/padWithZeros.js +24 -0
- package/lib/src/commands/padWithZeros.js.map +1 -0
- package/lib/src/commands/uniquify.d.ts +15 -0
- package/lib/src/commands/uniquify.js +26 -0
- package/lib/src/commands/uniquify.js.map +1 -0
- package/lib/src/commands/visitCanvasEndpoint.d.ts +26 -0
- package/lib/src/commands/visitCanvasEndpoint.js +36 -0
- package/lib/src/commands/visitCanvasEndpoint.js.map +1 -0
- package/lib/src/commands/waitForAtLeastOneElementPresent.d.ts +23 -0
- package/lib/src/commands/waitForAtLeastOneElementPresent.js +28 -0
- package/lib/src/commands/waitForAtLeastOneElementPresent.js.map +1 -0
- package/lib/src/genConfiguration/index.js +21 -3
- package/lib/src/genConfiguration/index.js.map +1 -1
- package/lib/src/init.js +28 -2
- package/lib/src/init.js.map +1 -1
- package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.d.ts +6 -0
- package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.js +9 -0
- package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.js.map +1 -0
- package/lib/start/helpers/collectPngFiles.d.ts +9 -0
- package/lib/start/helpers/collectPngFiles.js +31 -0
- package/lib/start/helpers/collectPngFiles.js.map +1 -0
- package/lib/start/helpers/executeAllHeadlessCombinations.d.ts +15 -0
- package/lib/start/helpers/executeAllHeadlessCombinations.js +116 -0
- package/lib/start/helpers/executeAllHeadlessCombinations.js.map +1 -0
- package/lib/start/helpers/executeCypress.d.ts +17 -0
- package/lib/start/helpers/executeCypress.js +103 -0
- package/lib/start/helpers/executeCypress.js.map +1 -0
- package/lib/start/helpers/generateHtmlReport.d.ts +14 -0
- package/lib/start/helpers/generateHtmlReport.js +54 -0
- package/lib/start/helpers/generateHtmlReport.js.map +1 -0
- package/lib/start/helpers/generateReportHomepage.d.ts +9 -0
- package/lib/start/helpers/generateReportHomepage.js +142 -0
- package/lib/start/helpers/generateReportHomepage.js.map +1 -0
- package/lib/start/helpers/generateReporterConfig.d.ts +17 -0
- package/lib/start/helpers/generateReporterConfig.js +32 -0
- package/lib/start/helpers/generateReporterConfig.js.map +1 -0
- package/lib/start/helpers/getDateLabeledDir.d.ts +7 -0
- package/lib/start/helpers/getDateLabeledDir.js +38 -0
- package/lib/start/helpers/getDateLabeledDir.js.map +1 -0
- package/lib/start/helpers/mergeAllReportsAndGenerateHtml.d.ts +11 -0
- package/lib/start/helpers/mergeAllReportsAndGenerateHtml.js +121 -0
- package/lib/start/helpers/mergeAllReportsAndGenerateHtml.js.map +1 -0
- package/lib/start/helpers/mergeReports.d.ts +14 -0
- package/lib/start/helpers/mergeReports.js +63 -0
- package/lib/start/helpers/mergeReports.js.map +1 -0
- package/lib/start/helpers/reportHomepage.ejs +272 -0
- package/lib/start/helpers/runCypressHeadless.d.ts +18 -0
- package/lib/start/helpers/runCypressHeadless.js +138 -0
- package/lib/start/helpers/runCypressHeadless.js.map +1 -0
- package/lib/start/helpers/runCypressVisible.d.ts +8 -0
- package/lib/start/helpers/runCypressVisible.js +53 -0
- package/lib/start/helpers/runCypressVisible.js.map +1 -0
- package/lib/start/index.js +23 -5
- package/lib/start/index.js.map +1 -1
- package/lib/start/types/MochawesomeReporterConfig.d.ts +15 -0
- package/lib/start/types/MochawesomeReporterConfig.js +3 -0
- package/lib/start/types/MochawesomeReporterConfig.js.map +1 -0
- package/lib/start/types/Profile.d.ts +9 -0
- package/lib/start/types/Profile.js +3 -0
- package/lib/start/types/Profile.js.map +1 -0
- package/lib/start/types/ReportInfo.d.ts +14 -0
- package/lib/start/types/ReportInfo.js +3 -0
- package/lib/start/types/ReportInfo.js.map +1 -0
- package/lib/start/types/RunResult.d.ts +12 -0
- package/lib/start/types/RunResult.js +3 -0
- package/lib/start/types/RunResult.js.map +1 -0
- package/lib/start/types/ScreenshotInfo.d.ts +10 -0
- package/lib/start/types/ScreenshotInfo.js +3 -0
- package/lib/start/types/ScreenshotInfo.js.map +1 -0
- package/lib/start/types/TemplateReportInfo.d.ts +12 -0
- package/lib/start/types/TemplateReportInfo.js +3 -0
- package/lib/start/types/TemplateReportInfo.js.map +1 -0
- package/package.json +10 -8
- package/setup/checkRequiredFiles/index.ts +7 -0
- package/src/commands/extractDataFromClass.ts +17 -6
- package/src/commands/extractDataFromClassByContents.ts +21 -8
- package/src/commands/genTextOfLength.ts +54 -0
- package/src/commands/getAttribute.ts +58 -0
- package/src/commands/getClassName.ts +44 -0
- package/src/commands/getCurrentDateInfo.ts +57 -0
- package/src/commands/getId.ts +44 -0
- package/src/commands/getJSON.ts +0 -4
- package/src/commands/getSpecialChars.ts +34 -0
- package/src/commands/getTitle.ts +39 -0
- package/src/commands/index.ts +29 -5
- package/src/commands/launchLTIUsingToken.ts +12 -4
- package/src/commands/listSelectLabels.ts +47 -0
- package/src/commands/listSelectValues.ts +50 -0
- package/src/commands/padWithZeros.ts +53 -0
- package/src/commands/uniquify.ts +49 -0
- package/src/commands/visitCanvasEndpoint.ts +75 -0
- package/src/commands/waitForAtLeastOneElementPresent.ts +64 -0
- package/src/genConfiguration/index.ts +20 -2
- package/start/constants/DEFAULT_THREADS_PER_COMBO.ts +7 -0
- package/start/helpers/collectPngFiles.ts +25 -0
- package/start/helpers/executeAllHeadlessCombinations.ts +92 -0
- package/start/helpers/executeCypress.ts +66 -0
- package/start/helpers/generateHtmlReport.ts +71 -0
- package/start/helpers/generateReportHomepage.ts +148 -0
- package/start/helpers/generateReporterConfig.ts +39 -0
- package/start/helpers/getDateLabeledDir.ts +43 -0
- package/start/helpers/mergeAllReportsAndGenerateHtml.ts +150 -0
- package/start/helpers/mergeReports.ts +82 -0
- package/start/helpers/reportHomepage.ejs +272 -0
- package/start/helpers/runCypressHeadless.ts +164 -0
- package/start/helpers/runCypressVisible.ts +45 -0
- package/start/index.ts +23 -5
- package/start/types/MochawesomeReporterConfig.ts +23 -0
- package/start/types/Profile.ts +12 -0
- package/start/types/ReportInfo.ts +22 -0
- package/start/types/RunResult.ts +18 -0
- package/start/types/ScreenshotInfo.ts +13 -0
- package/start/types/TemplateReportInfo.ts +16 -0
- package/src/commands/visitCanvasGETEndpoint.ts +0 -61
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Get the class attribute of an element
|
|
6
|
+
* @author Allison Zhang
|
|
7
|
+
* @param selector the CSS selector of the element
|
|
8
|
+
* @returns the class of the element, if multiple classes exist, they are space-separated
|
|
9
|
+
*/
|
|
10
|
+
getClassName(selector: string): Chainable<string>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare const getClassName: () => void;
|
|
15
|
+
export default getClassName;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/*----------------------------------------*/
|
|
5
|
+
/* --------------- Command -------------- */
|
|
6
|
+
/*----------------------------------------*/
|
|
7
|
+
var getClassName = function () {
|
|
8
|
+
Cypress.Commands.add('getClassName', function (selector) {
|
|
9
|
+
return (cy
|
|
10
|
+
.get(selector)
|
|
11
|
+
.invoke('attr', 'class')
|
|
12
|
+
.then(function (attr) {
|
|
13
|
+
return attr;
|
|
14
|
+
}));
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
/*----------------------------------------*/
|
|
18
|
+
/* --------------- Export --------------- */
|
|
19
|
+
/*----------------------------------------*/
|
|
20
|
+
exports.default = getClassName;
|
|
21
|
+
//# sourceMappingURL=getClassName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getClassName.js","sourceRoot":"","sources":["../../../src/commands/getClassName.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,YAAY,GAAG;IACnB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,EAAE,UAAC,QAAgB;QACpD,OAAO,CACL,EAAE;aACC,GAAG,CAAC,QAAQ,CAAC;aACb,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;aACvB,IAAI,CAAC,UAAC,IAAI;YACT,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Get the current day
|
|
6
|
+
* @author Allison Zhang
|
|
7
|
+
* @returns the current month as a number (1-31)
|
|
8
|
+
*/
|
|
9
|
+
getCurrentDateInfo(): Chainable<{
|
|
10
|
+
minute: number;
|
|
11
|
+
hour: number;
|
|
12
|
+
day: number;
|
|
13
|
+
month: number;
|
|
14
|
+
year: number;
|
|
15
|
+
dateString: string;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare const getCurrentDateInfo: () => void;
|
|
21
|
+
export default getCurrentDateInfo;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/*----------------------------------------*/
|
|
5
|
+
/* --------------- Command -------------- */
|
|
6
|
+
/*----------------------------------------*/
|
|
7
|
+
var getCurrentDateInfo = function () {
|
|
8
|
+
Cypress.Commands.add('getCurrentDateInfo', function () {
|
|
9
|
+
var current = new Date();
|
|
10
|
+
var dateInfo = {
|
|
11
|
+
minute: current.getMinutes(),
|
|
12
|
+
hour: current.getHours(),
|
|
13
|
+
day: current.getDate(),
|
|
14
|
+
month: current.getMonth() + 1,
|
|
15
|
+
year: current.getFullYear(),
|
|
16
|
+
dateString: current.toDateString(),
|
|
17
|
+
};
|
|
18
|
+
return cy.wrap(dateInfo);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
/*----------------------------------------*/
|
|
22
|
+
/* --------------- Export --------------- */
|
|
23
|
+
/*----------------------------------------*/
|
|
24
|
+
exports.default = getCurrentDateInfo;
|
|
25
|
+
//# sourceMappingURL=getCurrentDateInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCurrentDateInfo.js","sourceRoot":"","sources":["../../../src/commands/getCurrentDateInfo.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA0BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,kBAAkB,GAAG;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,EAAE;QACzC,IAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;QAC3B,IAAM,QAAQ,GAOV;YACF,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE;YAC5B,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE;YACxB,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE;YACtB,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;YAC7B,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE;YAC3B,UAAU,EAAE,OAAO,CAAC,YAAY,EAAE;SACnC,CAAC;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Get the id of an element
|
|
6
|
+
* @author Allison Zhang
|
|
7
|
+
* @param selector the CSS selector of the element
|
|
8
|
+
* @returns the id of the element
|
|
9
|
+
*/
|
|
10
|
+
getId(selector: string): Chainable<string>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
declare const getId: () => void;
|
|
15
|
+
export default getId;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/*----------------------------------------*/
|
|
5
|
+
/* --------------- Command -------------- */
|
|
6
|
+
/*----------------------------------------*/
|
|
7
|
+
var getId = function () {
|
|
8
|
+
Cypress.Commands.add('getId', function (selector) {
|
|
9
|
+
return (cy
|
|
10
|
+
.get(selector)
|
|
11
|
+
.invoke('attr', 'id')
|
|
12
|
+
.then(function (attr) {
|
|
13
|
+
return attr;
|
|
14
|
+
}));
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
/*----------------------------------------*/
|
|
18
|
+
/* --------------- Export --------------- */
|
|
19
|
+
/*----------------------------------------*/
|
|
20
|
+
exports.default = getId;
|
|
21
|
+
//# sourceMappingURL=getId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getId.js","sourceRoot":"","sources":["../../../src/commands/getId.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,KAAK,GAAG;IACZ,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,UAAC,QAAgB;QAC7C,OAAO,CACL,EAAE;aACC,GAAG,CAAC,QAAQ,CAAC;aACb,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC;aACpB,IAAI,CAAC,UAAC,IAAI;YACT,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getJSON.js","sourceRoot":"","sources":["../../../src/commands/getJSON.ts"],"names":[],"mappings":";AAAA,iCAAiC;;
|
|
1
|
+
{"version":3,"file":"getJSON.js","sourceRoot":"","sources":["../../../src/commands/getJSON.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAsBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,OAAO,GAAG;IACd,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,UAAC,GAAW;QAC1C,OAAO,CACL,EAAE;aACC,OAAO,CAAC,GAAG,CAAC;aACZ,GAAG,CAAC,MAAM,CAAC,CACf,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace Cypress {
|
|
3
|
+
interface Chainable {
|
|
4
|
+
/**
|
|
5
|
+
* Generate all printable special characters for Cypress tests
|
|
6
|
+
* @author Allison Zhang
|
|
7
|
+
* @returns a string containing all special characters
|
|
8
|
+
*/
|
|
9
|
+
getSpecialChars(): Chainable<string>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
declare const getSpecialChars: () => void;
|
|
14
|
+
export default getSpecialChars;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/*----------------------------------------*/
|
|
5
|
+
/* --------------- Command -------------- */
|
|
6
|
+
/*----------------------------------------*/
|
|
7
|
+
var getSpecialChars = function () {
|
|
8
|
+
Cypress.Commands.add('getSpecialChars', function () {
|
|
9
|
+
return cy.wrap('!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ≤≥≠÷…£¢∞§¶•º');
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
/*----------------------------------------*/
|
|
13
|
+
/* --------------- Export --------------- */
|
|
14
|
+
/*----------------------------------------*/
|
|
15
|
+
exports.default = getSpecialChars;
|
|
16
|
+
//# sourceMappingURL=getSpecialChars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSpecialChars.js","sourceRoot":"","sources":["../../../src/commands/getSpecialChars.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAmBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,eAAe,GAAG;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE;QACtC,OAAO,EAAE,CAAC,IAAI,CAAC,uOAAuO,CAAC,CAAC;IAC1P,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="cypress" />
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
/*----------------------------------------*/
|
|
5
|
+
/* --------------- Command -------------- */
|
|
6
|
+
/*----------------------------------------*/
|
|
7
|
+
var getTitle = function () {
|
|
8
|
+
Cypress.Commands.add('getTitle', function () {
|
|
9
|
+
return (cy
|
|
10
|
+
.title()
|
|
11
|
+
.then(function (title) {
|
|
12
|
+
return title;
|
|
13
|
+
}));
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
/*----------------------------------------*/
|
|
17
|
+
/* --------------- Export --------------- */
|
|
18
|
+
/*----------------------------------------*/
|
|
19
|
+
exports.default = getTitle;
|
|
20
|
+
//# sourceMappingURL=getTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTitle.js","sourceRoot":"","sources":["../../../src/commands/getTitle.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAkBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,QAAQ,GAAG;IACf,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE;QAC/B,OAAO,CACL,EAAE;aACC,KAAK,EAAE;aACP,IAAI,CAAC,UAAC,KAAK;YACV,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,QAAQ,CAAC"}
|
|
@@ -9,15 +9,27 @@ var assertHasClass_1 = __importDefault(require("./assertHasClass"));
|
|
|
9
9
|
var assertNumElements_1 = __importDefault(require("./assertNumElements"));
|
|
10
10
|
var extractDataFromClass_1 = __importDefault(require("./extractDataFromClass"));
|
|
11
11
|
var extractDataFromClassByContents_1 = __importDefault(require("./extractDataFromClassByContents"));
|
|
12
|
+
var genTextOfLength_1 = __importDefault(require("./genTextOfLength"));
|
|
13
|
+
var getAttribute_1 = __importDefault(require("./getAttribute"));
|
|
14
|
+
var getClassName_1 = __importDefault(require("./getClassName"));
|
|
15
|
+
var getCurrentDateInfo_1 = __importDefault(require("./getCurrentDateInfo"));
|
|
16
|
+
var getId_1 = __importDefault(require("./getId"));
|
|
12
17
|
var getJSON_1 = __importDefault(require("./getJSON"));
|
|
13
18
|
var getNumElements_1 = __importDefault(require("./getNumElements"));
|
|
19
|
+
var getSpecialChars_1 = __importDefault(require("./getSpecialChars"));
|
|
20
|
+
var getTitle_1 = __importDefault(require("./getTitle"));
|
|
14
21
|
var handleHarvardKey_1 = __importDefault(require("./handleHarvardKey"));
|
|
15
22
|
var launchAs_1 = __importDefault(require("./launchAs"));
|
|
16
23
|
var launchLTIUsingToken_1 = __importDefault(require("./launchLTIUsingToken"));
|
|
24
|
+
var listSelectLabels_1 = __importDefault(require("./listSelectLabels"));
|
|
25
|
+
var listSelectValues_1 = __importDefault(require("./listSelectValues"));
|
|
17
26
|
var navigateToHref_1 = __importDefault(require("./navigateToHref"));
|
|
27
|
+
var padWithZeros_1 = __importDefault(require("./padWithZeros"));
|
|
18
28
|
var runScript_1 = __importDefault(require("./runScript"));
|
|
19
29
|
var typeInto_1 = __importDefault(require("./typeInto"));
|
|
20
|
-
var
|
|
30
|
+
var uniquify_1 = __importDefault(require("./uniquify"));
|
|
31
|
+
var visitCanvasEndpoint_1 = __importDefault(require("./visitCanvasEndpoint"));
|
|
32
|
+
var waitForAtLeastOneElementPresent_1 = __importDefault(require("./waitForAtLeastOneElementPresent"));
|
|
21
33
|
var waitForElementVisible_1 = __importDefault(require("./waitForElementVisible"));
|
|
22
34
|
/**
|
|
23
35
|
* Initialize custom commands
|
|
@@ -28,18 +40,30 @@ var commands = function () {
|
|
|
28
40
|
(0, assertDoesNotHaveClass_1.default)();
|
|
29
41
|
(0, assertHasClass_1.default)();
|
|
30
42
|
(0, assertNumElements_1.default)();
|
|
43
|
+
(0, extractDataFromClass_1.default)();
|
|
44
|
+
(0, extractDataFromClassByContents_1.default)();
|
|
45
|
+
(0, genTextOfLength_1.default)();
|
|
46
|
+
(0, getAttribute_1.default)();
|
|
47
|
+
(0, getClassName_1.default)();
|
|
48
|
+
(0, getCurrentDateInfo_1.default)();
|
|
49
|
+
(0, getId_1.default)();
|
|
50
|
+
(0, getJSON_1.default)();
|
|
31
51
|
(0, getNumElements_1.default)();
|
|
52
|
+
(0, getSpecialChars_1.default)();
|
|
53
|
+
(0, getTitle_1.default)();
|
|
32
54
|
(0, handleHarvardKey_1.default)();
|
|
33
55
|
(0, launchAs_1.default)();
|
|
34
56
|
(0, launchLTIUsingToken_1.default)();
|
|
57
|
+
(0, listSelectLabels_1.default)();
|
|
58
|
+
(0, listSelectValues_1.default)();
|
|
35
59
|
(0, navigateToHref_1.default)();
|
|
60
|
+
(0, padWithZeros_1.default)();
|
|
36
61
|
(0, runScript_1.default)();
|
|
37
62
|
(0, typeInto_1.default)();
|
|
38
|
-
(0,
|
|
63
|
+
(0, uniquify_1.default)();
|
|
64
|
+
(0, visitCanvasEndpoint_1.default)();
|
|
65
|
+
(0, waitForAtLeastOneElementPresent_1.default)();
|
|
39
66
|
(0, waitForElementVisible_1.default)();
|
|
40
|
-
(0, extractDataFromClass_1.default)();
|
|
41
|
-
(0, extractDataFromClassByContents_1.default)();
|
|
42
|
-
(0, getJSON_1.default)();
|
|
43
67
|
};
|
|
44
68
|
exports.default = commands;
|
|
45
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";;;;;AAAA,sBAAsB;AACtB,oFAA8D;AAC9D,oEAA8C;AAC9C,0EAAoD;AACpD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AC;IACtB,IAAA,0BAAgB,GAAE,CAAC;IACnB,IAAA,0BAAgB,GAAE,CAAC;IACnB,IAAA,wBAAc,GAAE,CAAC;IACjB,IAAA,sBAAY,GAAE,CAAC;IACf,IAAA,mBAAS,GAAE,CAAC;IACZ,IAAA,kBAAQ,GAAE,CAAC;IACX,IAAA,kBAAQ,GAAE,CAAC;IACX,IAAA,6BAAmB,GAAE,CAAC;IACtB,IAAA,yCAA+B,GAAE,CAAC;IAClC,IAAA,+BAAqB,GAAE,CAAC;AAC1B,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -21,9 +21,13 @@ var launchLTIUsingToken = function () {
|
|
|
21
21
|
}
|
|
22
22
|
cy.log("Launch LTI app \"".concat(appName, "\" in course ").concat(courseId, " using access token"));
|
|
23
23
|
// Get the external tools for the course
|
|
24
|
-
cy.
|
|
25
|
-
|
|
24
|
+
cy.visitCanvasEndpoint({
|
|
25
|
+
method: 'GET',
|
|
26
|
+
path: "/api/v1/courses/".concat(courseId, "/external_tools"),
|
|
26
27
|
accessToken: accessToken,
|
|
28
|
+
params: {
|
|
29
|
+
per_page: 200,
|
|
30
|
+
},
|
|
27
31
|
}).then(function (externalTools) {
|
|
28
32
|
cy.log("Found ".concat(externalTools.length, " external tools"));
|
|
29
33
|
// Find the external tool of interest
|
|
@@ -49,9 +53,13 @@ var launchLTIUsingToken = function () {
|
|
|
49
53
|
throw new Error("Could not find any apps named \"".concat(appName, "\" in course ").concat(courseId));
|
|
50
54
|
}
|
|
51
55
|
// Get a sessionless launch URL
|
|
52
|
-
cy.
|
|
53
|
-
|
|
56
|
+
cy.visitCanvasEndpoint({
|
|
57
|
+
method: 'GET',
|
|
58
|
+
path: "/api/v1/courses/".concat(courseId, "/external_tools/sessionless_launch?id=").concat(toolId),
|
|
54
59
|
accessToken: accessToken,
|
|
60
|
+
params: {
|
|
61
|
+
per_page: 200,
|
|
62
|
+
},
|
|
55
63
|
}).then(function (sessionlessLaunchInfo) {
|
|
56
64
|
var launchURL = sessionlessLaunchInfo.url;
|
|
57
65
|
cy.log("Launching LTI app at: ".concat(launchURL));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launchLTIUsingToken.js","sourceRoot":"","sources":["../../../src/commands/launchLTIUsingToken.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA6BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,mBAAmB,GAAG;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,qBAAqB,EACrB,UACE,WAAmB,EACnB,IAGM;QAHN,qBAAA,EAAA,SAGM;QAEA,IAAA,QAAQ,GAAc,IAAI,SAAlB,EAAE,OAAO,GAAK,IAAI,QAAT,CAAU;QAEjC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,IAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;YACtE,CAAC;YACD,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QAED,EAAE,CAAC,GAAG,CAAC,2BAAmB,OAAO,0BAAe,QAAQ,wBAAqB,CAAC,CAAC;QAE/E,wCAAwC;QACxC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"launchLTIUsingToken.js","sourceRoot":"","sources":["../../../src/commands/launchLTIUsingToken.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA6BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,mBAAmB,GAAG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C,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,24 @@
|
|
|
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("".concat(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
|
|
@@ -0,0 +1 @@
|
|
|
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,UAAG,QAAQ,YAAS,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,27 @@
|
|
|
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("".concat(selector, " option"))
|
|
12
|
+
.each(function (option) {
|
|
13
|
+
cy.wrap(option).invoke('attr', 'value')
|
|
14
|
+
.then(function (value) {
|
|
15
|
+
vals.push(value || option.text());
|
|
16
|
+
});
|
|
17
|
+
})
|
|
18
|
+
.then(function () {
|
|
19
|
+
return vals;
|
|
20
|
+
}));
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
/*----------------------------------------*/
|
|
24
|
+
/* --------------- Export --------------- */
|
|
25
|
+
/*----------------------------------------*/
|
|
26
|
+
exports.default = listSelectValues;
|
|
27
|
+
//# sourceMappingURL=listSelectValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,UAAG,QAAQ,YAAS,CAAC;aACzB,IAAI,CAAC,UAAC,MAAM;YACX,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBACpC,IAAI,CAAC,UAAC,KAAK;gBACV,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACP,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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,24 @@
|
|
|
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".concat(numberString);
|
|
15
|
+
}
|
|
16
|
+
return numberString;
|
|
17
|
+
}));
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
/*----------------------------------------*/
|
|
21
|
+
/* --------------- Export --------------- */
|
|
22
|
+
/*----------------------------------------*/
|
|
23
|
+
exports.default = padWithZeros;
|
|
24
|
+
//# sourceMappingURL=padWithZeros.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,WAAI,YAAY,CAAE,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
uniqueCounter += 1;
|
|
19
|
+
return "".concat(text, " [").concat(shorten(Number.parseInt("".concat(Date.now()).concat(thisCounter).concat(id), 10)), "]");
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
/*----------------------------------------*/
|
|
23
|
+
/* --------------- Export --------------- */
|
|
24
|
+
/*----------------------------------------*/
|
|
25
|
+
exports.default = uniquify;
|
|
26
|
+
//# sourceMappingURL=uniquify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAC;QAClC,aAAa,IAAI,CAAC,CAAC;QACnB,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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 Cypress chainable containing the Canvas API response body
|
|
13
|
+
*/
|
|
14
|
+
visitCanvasEndpoint(opts: {
|
|
15
|
+
method: string;
|
|
16
|
+
path: string;
|
|
17
|
+
accessToken: string;
|
|
18
|
+
params?: {
|
|
19
|
+
[k: string]: any;
|
|
20
|
+
};
|
|
21
|
+
}): Chainable<any>;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
declare const visitCanvasEndpoint: () => void;
|
|
26
|
+
export default visitCanvasEndpoint;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
var method = opts.method, path = opts.path, accessToken = opts.accessToken, params = opts.params;
|
|
21
|
+
cy.log("Visiting Canvas ".concat(method, " endpoint"));
|
|
22
|
+
cy.log("Canvas API: ".concat(path));
|
|
23
|
+
return (cy
|
|
24
|
+
.request({
|
|
25
|
+
method: method,
|
|
26
|
+
url: "https://canvas.harvard.edu".concat(path),
|
|
27
|
+
body: __assign(__assign({}, (params || {})), { access_token: accessToken }),
|
|
28
|
+
})
|
|
29
|
+
.its('body'));
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
/*----------------------------------------*/
|
|
33
|
+
/* --------------- Export --------------- */
|
|
34
|
+
/*----------------------------------------*/
|
|
35
|
+
exports.default = visitCanvasEndpoint;
|
|
36
|
+
//# sourceMappingURL=visitCanvasEndpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visitCanvasEndpoint.js","sourceRoot":"","sources":["../../../src/commands/visitCanvasEndpoint.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;;;;;;;;;;;AA+BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,mBAAmB,GAAG;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,EAAE,UAC1C,IAOC;QAGC,IAAA,MAAM,GAIJ,IAAI,OAJA,EACN,IAAI,GAGF,IAAI,KAHF,EACJ,WAAW,GAET,IAAI,YAFK,EACX,MAAM,GACJ,IAAI,OADA,CACC;QACT,EAAE,CAAC,GAAG,CAAC,0BAAmB,MAAM,cAAW,CAAC,CAAC;QAC7C,EAAE,CAAC,GAAG,CAAC,sBAAe,IAAI,CAAE,CAAC,CAAC;QAE9B,OAAO,CACL,EAAE;aACC,OAAO,CAAC;YACP,MAAM,QAAA;YACN,GAAG,EAAE,oCAA6B,IAAI,CAAE;YACxC,IAAI,wBACC,CAAC,MAAM,IAAI,EAAE,CAAC,KACjB,YAAY,EAAE,WAAW,GAC1B;SACF,CAAC;aACD,GAAG,CAAC,MAAM,CAAC,CACf,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,mBAAmB,CAAC"}
|