dceky 1.0.5-beta.ky-declarations.12 → 1.0.5

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.
Files changed (243) hide show
  1. package/README.md +45 -29
  2. package/lib/commands/assertDoesNotHaveClass.d.ts +18 -0
  3. package/lib/commands/assertDoesNotHaveClass.js +17 -0
  4. package/lib/commands/assertDoesNotHaveClass.js.map +1 -0
  5. package/lib/commands/assertHasClass.d.ts +18 -0
  6. package/lib/commands/assertHasClass.js +17 -0
  7. package/lib/commands/assertHasClass.js.map +1 -0
  8. package/lib/commands/assertNumElements.d.ts +18 -0
  9. package/lib/commands/assertNumElements.js +17 -0
  10. package/lib/commands/assertNumElements.js.map +1 -0
  11. package/lib/commands/clickWithRetry.d.ts +19 -0
  12. package/lib/commands/clickWithRetry.js +29 -0
  13. package/lib/commands/clickWithRetry.js.map +1 -0
  14. package/lib/commands/genTextOfLength.d.ts +20 -0
  15. package/lib/commands/genTextOfLength.js +20 -0
  16. package/lib/commands/genTextOfLength.js.map +1 -0
  17. package/lib/commands/getAttribute.d.ts +20 -0
  18. package/lib/commands/getAttribute.js +22 -0
  19. package/lib/commands/getAttribute.js.map +1 -0
  20. package/lib/commands/getClassName.d.ts +15 -0
  21. package/lib/commands/getClassName.js +21 -0
  22. package/lib/commands/getClassName.js.map +1 -0
  23. package/lib/commands/getCurrentDateInfo.d.ts +21 -0
  24. package/lib/commands/getCurrentDateInfo.js +25 -0
  25. package/lib/commands/getCurrentDateInfo.js.map +1 -0
  26. package/lib/commands/getId.d.ts +15 -0
  27. package/lib/commands/getId.js +21 -0
  28. package/lib/commands/getId.js.map +1 -0
  29. package/lib/commands/getNumElements.d.ts +14 -0
  30. package/lib/commands/getNumElements.js +19 -0
  31. package/lib/commands/getNumElements.js.map +1 -0
  32. package/lib/commands/getSpecialChars.d.ts +14 -0
  33. package/lib/commands/getSpecialChars.js +16 -0
  34. package/lib/commands/getSpecialChars.js.map +1 -0
  35. package/lib/commands/getTitle.d.ts +13 -0
  36. package/lib/commands/getTitle.js +20 -0
  37. package/lib/commands/getTitle.js.map +1 -0
  38. package/lib/commands/handleHarvardKey.d.ts +18 -0
  39. package/lib/commands/handleHarvardKey.js +56 -0
  40. package/lib/commands/handleHarvardKey.js.map +1 -0
  41. package/lib/commands/handleHarvardKey2.d.ts +14 -0
  42. package/lib/commands/handleHarvardKey2.js +88 -0
  43. package/lib/commands/handleHarvardKey2.js.map +1 -0
  44. package/lib/commands/launchAs.d.ts +20 -0
  45. package/lib/commands/launchAs.js +60 -0
  46. package/lib/commands/launchAs.js.map +1 -0
  47. package/lib/commands/launchLTIUsingToken.d.ts +19 -0
  48. package/lib/commands/launchLTIUsingToken.js +74 -0
  49. package/lib/commands/launchLTIUsingToken.js.map +1 -0
  50. package/lib/commands/listSelectLabels.d.ts +15 -0
  51. package/lib/commands/listSelectLabels.js +24 -0
  52. package/lib/commands/listSelectLabels.js.map +1 -0
  53. package/lib/commands/listSelectValues.d.ts +15 -0
  54. package/lib/commands/listSelectValues.js +26 -0
  55. package/lib/commands/listSelectValues.js.map +1 -0
  56. package/lib/commands/navigateToHref.d.ts +19 -0
  57. package/lib/commands/navigateToHref.js +23 -0
  58. package/lib/commands/navigateToHref.js.map +1 -0
  59. package/lib/commands/padWithZeros.d.ts +20 -0
  60. package/lib/commands/padWithZeros.js +24 -0
  61. package/lib/commands/padWithZeros.js.map +1 -0
  62. package/lib/commands/runScript.d.ts +16 -0
  63. package/lib/commands/runScript.js +25 -0
  64. package/lib/commands/runScript.js.map +1 -0
  65. package/lib/commands/typeInto.d.ts +20 -0
  66. package/lib/commands/typeInto.js +28 -0
  67. package/lib/commands/typeInto.js.map +1 -0
  68. package/lib/commands/uniquify.d.ts +15 -0
  69. package/lib/commands/uniquify.js +25 -0
  70. package/lib/commands/uniquify.js.map +1 -0
  71. package/lib/commands/visitCanvasEndpoint.d.ts +27 -0
  72. package/lib/commands/visitCanvasEndpoint.js +35 -0
  73. package/lib/commands/visitCanvasEndpoint.js.map +1 -0
  74. package/lib/commands/visitCanvasGETEndpoint.d.ts +20 -0
  75. package/lib/commands/visitCanvasGETEndpoint.js +26 -0
  76. package/lib/commands/visitCanvasGETEndpoint.js.map +1 -0
  77. package/lib/commands/waitForAtLeastOneElementPresent.d.ts +23 -0
  78. package/lib/commands/waitForAtLeastOneElementPresent.js +27 -0
  79. package/lib/commands/waitForAtLeastOneElementPresent.js.map +1 -0
  80. package/lib/commands/waitForElementVisible.d.ts +14 -0
  81. package/lib/commands/waitForElementVisible.js +20 -0
  82. package/lib/commands/waitForElementVisible.js.map +1 -0
  83. package/lib/index.js.map +1 -0
  84. package/lib/init.d.ts +6 -0
  85. package/lib/init.js +69 -0
  86. package/lib/init.js.map +1 -0
  87. package/lib/setup/genCommandImportFile.js +5 -0
  88. package/lib/setup/genCommandImportFile.js.map +1 -1
  89. package/lib/setup/genE2ELaunchFile.js +5 -0
  90. package/lib/setup/genE2ELaunchFile.js.map +1 -1
  91. package/lib/src/commands/extractDataFromClass.d.ts +7 -4
  92. package/lib/src/commands/extractDataFromClass.js +2 -1
  93. package/lib/src/commands/extractDataFromClass.js.map +1 -1
  94. package/lib/src/commands/extractDataFromClassByContents.d.ts +9 -5
  95. package/lib/src/commands/extractDataFromClassByContents.js +2 -1
  96. package/lib/src/commands/extractDataFromClassByContents.js.map +1 -1
  97. package/lib/src/commands/genTextOfLength.d.ts +20 -0
  98. package/lib/src/commands/genTextOfLength.js +20 -0
  99. package/lib/src/commands/genTextOfLength.js.map +1 -0
  100. package/lib/src/commands/getAttribute.d.ts +20 -0
  101. package/lib/src/commands/getAttribute.js +22 -0
  102. package/lib/src/commands/getAttribute.js.map +1 -0
  103. package/lib/src/commands/getClassName.d.ts +15 -0
  104. package/lib/src/commands/getClassName.js +21 -0
  105. package/lib/src/commands/getClassName.js.map +1 -0
  106. package/lib/src/commands/getCurrentDateInfo.d.ts +21 -0
  107. package/lib/src/commands/getCurrentDateInfo.js +25 -0
  108. package/lib/src/commands/getCurrentDateInfo.js.map +1 -0
  109. package/lib/src/commands/getId.d.ts +15 -0
  110. package/lib/src/commands/getId.js +21 -0
  111. package/lib/src/commands/getId.js.map +1 -0
  112. package/lib/src/commands/getJSON.d.ts +0 -1
  113. package/lib/src/commands/getJSON.js +1 -4
  114. package/lib/src/commands/getJSON.js.map +1 -1
  115. package/lib/src/commands/getSpecialChars.d.ts +14 -0
  116. package/lib/src/commands/getSpecialChars.js +16 -0
  117. package/lib/src/commands/getSpecialChars.js.map +1 -0
  118. package/lib/src/commands/getTitle.d.ts +13 -0
  119. package/lib/src/commands/getTitle.js +20 -0
  120. package/lib/src/commands/getTitle.js.map +1 -0
  121. package/lib/src/commands/index.js +29 -5
  122. package/lib/src/commands/index.js.map +1 -1
  123. package/lib/src/commands/launchLTIUsingToken.js +12 -4
  124. package/lib/src/commands/launchLTIUsingToken.js.map +1 -1
  125. package/lib/src/commands/listSelectLabels.d.ts +15 -0
  126. package/lib/src/commands/listSelectLabels.js +24 -0
  127. package/lib/src/commands/listSelectLabels.js.map +1 -0
  128. package/lib/src/commands/listSelectValues.d.ts +15 -0
  129. package/lib/src/commands/listSelectValues.js +27 -0
  130. package/lib/src/commands/listSelectValues.js.map +1 -0
  131. package/lib/src/commands/padWithZeros.d.ts +20 -0
  132. package/lib/src/commands/padWithZeros.js +24 -0
  133. package/lib/src/commands/padWithZeros.js.map +1 -0
  134. package/lib/src/commands/uniquify.d.ts +15 -0
  135. package/lib/src/commands/uniquify.js +26 -0
  136. package/lib/src/commands/uniquify.js.map +1 -0
  137. package/lib/src/commands/visitCanvasEndpoint.d.ts +26 -0
  138. package/lib/src/commands/visitCanvasEndpoint.js +36 -0
  139. package/lib/src/commands/visitCanvasEndpoint.js.map +1 -0
  140. package/lib/src/commands/waitForAtLeastOneElementPresent.d.ts +23 -0
  141. package/lib/src/commands/waitForAtLeastOneElementPresent.js +28 -0
  142. package/lib/src/commands/waitForAtLeastOneElementPresent.js.map +1 -0
  143. package/lib/src/init.js +28 -2
  144. package/lib/src/init.js.map +1 -1
  145. package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.d.ts +6 -0
  146. package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.js +9 -0
  147. package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.js.map +1 -0
  148. package/lib/start/helpers/collectPngFiles.d.ts +9 -0
  149. package/lib/start/helpers/collectPngFiles.js +31 -0
  150. package/lib/start/helpers/collectPngFiles.js.map +1 -0
  151. package/lib/start/helpers/executeAllHeadlessCombinations.d.ts +15 -0
  152. package/lib/start/helpers/executeAllHeadlessCombinations.js +116 -0
  153. package/lib/start/helpers/executeAllHeadlessCombinations.js.map +1 -0
  154. package/lib/start/helpers/executeCypress.d.ts +17 -0
  155. package/lib/start/helpers/executeCypress.js +103 -0
  156. package/lib/start/helpers/executeCypress.js.map +1 -0
  157. package/lib/start/helpers/generateHtmlReport.d.ts +14 -0
  158. package/lib/start/helpers/generateHtmlReport.js +54 -0
  159. package/lib/start/helpers/generateHtmlReport.js.map +1 -0
  160. package/lib/start/helpers/generateReportHomepage.d.ts +9 -0
  161. package/lib/start/helpers/generateReportHomepage.js +142 -0
  162. package/lib/start/helpers/generateReportHomepage.js.map +1 -0
  163. package/lib/start/helpers/generateReporterConfig.d.ts +17 -0
  164. package/lib/start/helpers/generateReporterConfig.js +32 -0
  165. package/lib/start/helpers/generateReporterConfig.js.map +1 -0
  166. package/lib/start/helpers/getDateLabeledDir.d.ts +7 -0
  167. package/lib/start/helpers/getDateLabeledDir.js +38 -0
  168. package/lib/start/helpers/getDateLabeledDir.js.map +1 -0
  169. package/lib/start/helpers/mergeAllReportsAndGenerateHtml.d.ts +11 -0
  170. package/lib/start/helpers/mergeAllReportsAndGenerateHtml.js +121 -0
  171. package/lib/start/helpers/mergeAllReportsAndGenerateHtml.js.map +1 -0
  172. package/lib/start/helpers/mergeReports.d.ts +14 -0
  173. package/lib/start/helpers/mergeReports.js +63 -0
  174. package/lib/start/helpers/mergeReports.js.map +1 -0
  175. package/lib/start/helpers/reportHomepage.ejs +272 -0
  176. package/lib/start/helpers/runCypressHeadless.d.ts +18 -0
  177. package/lib/start/helpers/runCypressHeadless.js +138 -0
  178. package/lib/start/helpers/runCypressHeadless.js.map +1 -0
  179. package/lib/start/helpers/runCypressVisible.d.ts +8 -0
  180. package/lib/start/helpers/runCypressVisible.js +53 -0
  181. package/lib/start/helpers/runCypressVisible.js.map +1 -0
  182. package/lib/start/index.js +23 -5
  183. package/lib/start/index.js.map +1 -1
  184. package/lib/start/types/MochawesomeReporterConfig.d.ts +15 -0
  185. package/lib/start/types/MochawesomeReporterConfig.js +3 -0
  186. package/lib/start/types/MochawesomeReporterConfig.js.map +1 -0
  187. package/lib/start/types/Profile.d.ts +9 -0
  188. package/lib/start/types/Profile.js +3 -0
  189. package/lib/start/types/Profile.js.map +1 -0
  190. package/lib/start/types/ReportInfo.d.ts +14 -0
  191. package/lib/start/types/ReportInfo.js +3 -0
  192. package/lib/start/types/ReportInfo.js.map +1 -0
  193. package/lib/start/types/RunResult.d.ts +12 -0
  194. package/lib/start/types/RunResult.js +3 -0
  195. package/lib/start/types/RunResult.js.map +1 -0
  196. package/lib/start/types/ScreenshotInfo.d.ts +10 -0
  197. package/lib/start/types/ScreenshotInfo.js +3 -0
  198. package/lib/start/types/ScreenshotInfo.js.map +1 -0
  199. package/lib/start/types/TemplateReportInfo.d.ts +12 -0
  200. package/lib/start/types/TemplateReportInfo.js +3 -0
  201. package/lib/start/types/TemplateReportInfo.js.map +1 -0
  202. package/package.json +10 -8
  203. package/setup/genCommandImportFile.ts +6 -0
  204. package/setup/genE2ELaunchFile.ts +6 -0
  205. package/src/commands/extractDataFromClass.ts +17 -6
  206. package/src/commands/extractDataFromClassByContents.ts +21 -8
  207. package/src/commands/genTextOfLength.ts +54 -0
  208. package/src/commands/getAttribute.ts +58 -0
  209. package/src/commands/getClassName.ts +44 -0
  210. package/src/commands/getCurrentDateInfo.ts +57 -0
  211. package/src/commands/getId.ts +44 -0
  212. package/src/commands/getJSON.ts +0 -4
  213. package/src/commands/getSpecialChars.ts +34 -0
  214. package/src/commands/getTitle.ts +39 -0
  215. package/src/commands/index.ts +29 -5
  216. package/src/commands/launchLTIUsingToken.ts +12 -4
  217. package/src/commands/listSelectLabels.ts +47 -0
  218. package/src/commands/listSelectValues.ts +50 -0
  219. package/src/commands/padWithZeros.ts +53 -0
  220. package/src/commands/uniquify.ts +49 -0
  221. package/src/commands/visitCanvasEndpoint.ts +75 -0
  222. package/src/commands/waitForAtLeastOneElementPresent.ts +64 -0
  223. package/start/constants/DEFAULT_THREADS_PER_COMBO.ts +7 -0
  224. package/start/helpers/collectPngFiles.ts +25 -0
  225. package/start/helpers/executeAllHeadlessCombinations.ts +92 -0
  226. package/start/helpers/executeCypress.ts +66 -0
  227. package/start/helpers/generateHtmlReport.ts +71 -0
  228. package/start/helpers/generateReportHomepage.ts +148 -0
  229. package/start/helpers/generateReporterConfig.ts +39 -0
  230. package/start/helpers/getDateLabeledDir.ts +43 -0
  231. package/start/helpers/mergeAllReportsAndGenerateHtml.ts +150 -0
  232. package/start/helpers/mergeReports.ts +82 -0
  233. package/start/helpers/reportHomepage.ejs +272 -0
  234. package/start/helpers/runCypressHeadless.ts +164 -0
  235. package/start/helpers/runCypressVisible.ts +45 -0
  236. package/start/index.ts +23 -5
  237. package/start/types/MochawesomeReporterConfig.ts +23 -0
  238. package/start/types/Profile.ts +12 -0
  239. package/start/types/ReportInfo.ts +22 -0
  240. package/start/types/RunResult.ts +18 -0
  241. package/start/types/ScreenshotInfo.ts +13 -0
  242. package/start/types/TemplateReportInfo.ts +16 -0
  243. package/src/commands/visitCanvasGETEndpoint.ts +0 -61
package/README.md CHANGED
@@ -1,44 +1,60 @@
1
1
  # dceky
2
2
 
3
- Cypress toolkit for Harvard DCE
3
+ A Cypress-based testing framework by Harvard DCE
4
4
 
5
- ## Installation
5
+ ## Getting Started
6
6
 
7
- To use this library in your project, add the following scripts to your `package.json`:
7
+ It's easy to use `ky` as your testing framework. To get started, follow these steps:
8
8
 
9
- ```json
10
- {
11
- "scripts": {
12
- "ky:setup": "npm explore dceky -- npm run ky:setup",
13
- "ky:start": "npm explore dceky -- npm run ky:start",
14
- "ky:dev": "npm explore dceky -- npm run ky:dev"
15
- }
16
- }
17
- ```
9
+ ### 1. Install and Configure Cypress
10
+
11
+ Install Cypress: `npm i --save-dev cypress`
12
+
13
+ Configure Cypress:
14
+
15
+ 1. Use `npx cypress open`
16
+ 2. Choose "E2E"
17
+ 3. On the configuration page, simply click "Continue"
18
+ 4. When you get to the browser chooser, close Cypress
19
+
20
+ From this point onward, you won't run cypress directly
21
+
22
+ ### 2. Install and Set Up Ky
23
+
24
+ Install ky: `npm i --save-dev dceky`
18
25
 
19
- ## Commands
26
+ Set up ky: `npm run ky:setup`
20
27
 
21
- ### `ky:setup`
28
+ You'll have a bunch of changes to commit and push. Do that now.
22
29
 
23
- **What it does:** Generates the necessary configuration files for your Cypress project:
24
- - Creates `cypress.config.ts` that automatically merges your global credentials, resources, values, and profiles
25
- - Generates `cypress/commands/index.ts` that auto-imports all custom commands from your `cypress/commands` directory
30
+ ## Using Ky
26
31
 
27
- **When to use:**
28
- - When you first set up the project
29
- - After adding new custom commands to `cypress/commands`
30
- - After modifying global configuration files in `cypress/globals` or profile files in `cypress/profiles`
32
+ ### Start Ky Tests: `npm run ky:start`
33
+
34
+ To start running ky tests, use `npm run ky:start` and follow instructions.
35
+
36
+ You'll be automatically guided through a launch process where you'll choose whether tests will run visibly or headless, which profile(s) you'll use, and which browser(s) you'll use. You can also set these through environment variables or arguments. See the examples below:
37
+
38
+ ```ts
39
+ // Arguments:
40
+ npm run ky:start --headless --browser=Chrome,Safari --profile=Stage
41
+ ```
42
+
43
+ ```ts
44
+ // Example environment:
45
+ HEADLESS=true
46
+ BROWSER=Chrome,Safari
47
+ PROFILE=Stage
48
+ ```
31
49
 
32
- ### `ky:start`
50
+ ### Setup Ky: `npm run ky:setup`
33
51
 
34
- **What it does:** Interactive wizard for running Cypress tests.
52
+ Whenever you update the version of ky or make changes to supporting project-specific commands or other non-test files, you should run `ky:setup`.
35
53
 
36
- **When to use:**
37
- - If you want to run cypress tests without regenerating setup files.
54
+ This will regenerate configuration files, typescript declarations, and other ky resources that keep your project working smoothly.
38
55
 
39
- ### `ky:dev`
56
+ ### Setup and Start Ky Tests: `npm run ky:dev`
40
57
 
41
- **What it does:** Runs both `setup` and `start`.
58
+ QA people and CI systems should start tests using `npm run ky:start` because that ensures that no files, dependencies, or files will be changed on run.
42
59
 
43
- **When to use:**
44
- - If you want to generate setup files and run cypress tests.
60
+ But, developers should run tests using `npm run ky:dev` because each time the tests are run, ky is automatically set up again, ensuring that ky files are up-to-date and running smoothly.
@@ -0,0 +1,18 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Assert that an element does not have a specific className
6
+ * @param opts object containing all arguments
7
+ * @param opts.item the css selector for finding the element
8
+ * @param opts.className the className to check for
9
+ */
10
+ assertDoesNotHaveClass(opts: {
11
+ item: string;
12
+ className: string;
13
+ }): Chainable<JQuery<HTMLElement>>;
14
+ }
15
+ }
16
+ }
17
+ declare const assertDoesNotHaveClass: () => void;
18
+ export default assertDoesNotHaveClass;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var assertDoesNotHaveClass = function () {
8
+ Cypress.Commands.add('assertDoesNotHaveClass', function (opts) {
9
+ cy.log("Assert ".concat(opts.item, " does not have class ").concat(opts.className));
10
+ return cy.get(opts.item).should('not.have.class', opts.className);
11
+ });
12
+ };
13
+ /*----------------------------------------*/
14
+ /* --------------- Export --------------- */
15
+ /*----------------------------------------*/
16
+ exports.default = assertDoesNotHaveClass;
17
+ //# sourceMappingURL=assertDoesNotHaveClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertDoesNotHaveClass.js","sourceRoot":"","sources":["../../src/commands/assertDoesNotHaveClass.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAuBjC,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,iBAAU,IAAI,CAAC,IAAI,kCAAwB,IAAI,CAAC,SAAS,CAAE,CAAC,CAAC;QACpE,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Assert that an element has a specific className
6
+ * @param opts object containing all arguments
7
+ * @param opts.item the css selector for finding the element
8
+ * @param opts.className the className to check for
9
+ */
10
+ assertHasClass(opts: {
11
+ item: string;
12
+ className: string;
13
+ }): Chainable<JQuery<HTMLElement>>;
14
+ }
15
+ }
16
+ }
17
+ declare const assertHasClass: () => void;
18
+ export default assertHasClass;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var assertHasClass = function () {
8
+ Cypress.Commands.add('assertHasClass', function (opts) {
9
+ cy.log("Assert ".concat(opts.item, " has class ").concat(opts.className));
10
+ return cy.get(opts.item).should('have.class', opts.className);
11
+ });
12
+ };
13
+ /*----------------------------------------*/
14
+ /* --------------- Export --------------- */
15
+ /*----------------------------------------*/
16
+ exports.default = assertHasClass;
17
+ //# sourceMappingURL=assertHasClass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertHasClass.js","sourceRoot":"","sources":["../../src/commands/assertHasClass.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAuBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,cAAc,GAAG;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,gBAAgB,EAChB,UACE,IAGC;QAEH,EAAE,CAAC,GAAG,CAAC,iBAAU,IAAI,CAAC,IAAI,wBAAc,IAAI,CAAC,SAAS,CAAE,CAAC,CAAC;QAC1D,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,18 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Assert a certain number of elements
6
+ * @param opts object containing all arguments
7
+ * @param opts.item a CSS selector corresponding to the item
8
+ * @param opts.num the precise number of elements expected
9
+ */
10
+ assertNumElements(opts: {
11
+ item: string;
12
+ num: number;
13
+ }): Chainable<Element>;
14
+ }
15
+ }
16
+ }
17
+ declare const assertNumElements: () => void;
18
+ export default assertNumElements;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var assertNumElements = function () {
8
+ Cypress.Commands.add('assertNumElements', function (opts) {
9
+ cy.log("Assert ".concat(opts.num, " elements match ").concat(opts.item));
10
+ cy.get(opts.item).should('have.length', opts.num);
11
+ });
12
+ };
13
+ /*----------------------------------------*/
14
+ /* --------------- Export --------------- */
15
+ /*----------------------------------------*/
16
+ exports.default = assertNumElements;
17
+ //# sourceMappingURL=assertNumElements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertNumElements.js","sourceRoot":"","sources":["../../src/commands/assertNumElements.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAyBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,iBAAiB,GAAG;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,mBAAmB,EACnB,UACE,IAGC;QAEH,EAAE,CAAC,GAAG,CAAC,iBAAU,IAAI,CAAC,GAAG,6BAAmB,IAAI,CAAC,IAAI,CAAE,CAAC,CAAC;QACzD,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,19 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Click an element with visibility checking, scrolling, and timeout handling
6
+ * @param item the CSS selector of interest
7
+ * @param opts object containing all arguments
8
+ * @param opts.timeoutSec the number of seconds to wait before timing out (default: 10)
9
+ * @param opts.dontScrollTo if true, do not scroll to the element (default: false)
10
+ */
11
+ clickWithRetry(item: string, opts?: {
12
+ timeoutSec?: number;
13
+ dontScrollTo?: boolean;
14
+ }): Chainable<JQuery<HTMLElement>>;
15
+ }
16
+ }
17
+ }
18
+ declare const clickWithRetry: () => void;
19
+ export default clickWithRetry;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var clickWithRetry = function () {
8
+ Cypress.Commands.add('clickWithRetry', function (item, opts) {
9
+ if (opts === void 0) { opts = {}; }
10
+ var timeoutSec = opts.timeoutSec, dontScrollTo = opts.dontScrollTo;
11
+ cy.log("Click ".concat(item));
12
+ // Wait for element to be visible first using our own function
13
+ cy.waitForElementVisible(item, timeoutSec);
14
+ // If scrolling is disabled, try to click directly
15
+ if (dontScrollTo) {
16
+ return cy.get(item).click();
17
+ }
18
+ else {
19
+ // Scroll to element and then click using our own function
20
+ cy.get(item).scrollIntoView();
21
+ return cy.get(item).click();
22
+ }
23
+ });
24
+ };
25
+ /*----------------------------------------*/
26
+ /* --------------- Export --------------- */
27
+ /*----------------------------------------*/
28
+ exports.default = clickWithRetry;
29
+ //# sourceMappingURL=clickWithRetry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickWithRetry.js","sourceRoot":"","sources":["../../src/commands/clickWithRetry.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AA2BjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,cAAc,GAAG;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,gBAAgB,EAChB,UACE,IAAY,EACZ,IAGM;QAHN,qBAAA,EAAA,SAGM;QAEA,IAAA,UAAU,GAAmB,IAAI,WAAvB,EAAE,YAAY,GAAK,IAAI,aAAT,CAAU;QAE1C,EAAE,CAAC,GAAG,CAAC,gBAAS,IAAI,CAAE,CAAC,CAAC;QAExB,8DAA8D;QAC9D,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAE3C,kDAAkD;QAClD,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,0DAA0D;YAC1D,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;YAC9B,OAAO,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,20 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Generate a string of specified length for Cypress tests
6
+ * @author Gardenia Liu, Allison Zhang
7
+ * @param opts options object
8
+ * @param opts.length the desired length of the string
9
+ * @param opts.text optional text to repeat to form the string; defaults to '123456789x' if not provided
10
+ * @returns a string of the specified length, if the length is not a multiple of the text length, it is truncated
11
+ */
12
+ genTextOfLength(opts: {
13
+ length: number;
14
+ text?: string;
15
+ }): Chainable<string>;
16
+ }
17
+ }
18
+ }
19
+ declare const genTextOfLength: () => void;
20
+ export default genTextOfLength;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var genTextOfLength = function () {
8
+ Cypress.Commands.add('genTextOfLength', function (opts) {
9
+ var length = opts.length, text = opts.text;
10
+ var textToUse = text || '123456789x';
11
+ var lengthOfTextToUse = Math.ceil(length / textToUse.length);
12
+ var result = textToUse.repeat(lengthOfTextToUse).substring(0, length);
13
+ return cy.wrap(result);
14
+ });
15
+ };
16
+ /*----------------------------------------*/
17
+ /* --------------- Export --------------- */
18
+ /*----------------------------------------*/
19
+ exports.default = genTextOfLength;
20
+ //# sourceMappingURL=genTextOfLength.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genTextOfLength.js","sourceRoot":"","sources":["../../src/commands/genTextOfLength.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAyBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,eAAe,GAAG;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,iBAAiB,EAAE,UAAC,IAAuC;QAE5E,IAAA,MAAM,GAEJ,IAAI,OAFA,EACN,IAAI,GACF,IAAI,KADF,CACG;QACT,IAAM,SAAS,GAAG,IAAI,IAAI,YAAY,CAAC;QACvC,IAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;QAC/D,IAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACxE,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC,CAAA;AAED,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,eAAe,CAAC"}
@@ -0,0 +1,20 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Get the attribute of an element
6
+ * @author Allison Zhang
7
+ * @param opts options object
8
+ * @param opts.selector the CSS selector of the element
9
+ * @param opts.attribute the attribute to retrieve
10
+ * @returns the attribute of the element
11
+ */
12
+ getAttribute(opts: {
13
+ selector: string;
14
+ attribute: string;
15
+ }): Chainable<string>;
16
+ }
17
+ }
18
+ }
19
+ declare const getAttribute: () => void;
20
+ export default getAttribute;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var getAttribute = function () {
8
+ Cypress.Commands.add('getAttribute', function (opts) {
9
+ var selector = opts.selector, attribute = opts.attribute;
10
+ return (cy
11
+ .get(selector)
12
+ .invoke('attr', attribute)
13
+ .then(function (attr) {
14
+ return attr;
15
+ }));
16
+ });
17
+ };
18
+ /*----------------------------------------*/
19
+ /* --------------- Export --------------- */
20
+ /*----------------------------------------*/
21
+ exports.default = getAttribute;
22
+ //# sourceMappingURL=getAttribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAttribute.js","sourceRoot":"","sources":["../../src/commands/getAttribute.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,IAA6C;QAE/E,IAAA,QAAQ,GAEN,IAAI,SAFE,EACR,SAAS,GACP,IAAI,UADG,CACF;QACT,OAAO,CACL,EAAE;aACC,GAAG,CAAC,QAAQ,CAAC;aACb,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;aACzB,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,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"}
@@ -0,0 +1,14 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Get number of elements
6
+ * @param selector a CSS selector corresponding to the item
7
+ * @returns the number of elements on the page
8
+ */
9
+ getNumElements(selector: string): Chainable<JQuery<any>>;
10
+ }
11
+ }
12
+ }
13
+ declare const getNumElements: () => void;
14
+ export default getNumElements;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /// <reference types="cypress" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*----------------------------------------*/
5
+ /* --------------- Command -------------- */
6
+ /*----------------------------------------*/
7
+ var getNumElements = function () {
8
+ Cypress.Commands.add('getNumElements', function (selector) {
9
+ cy.log("Count elements matching ".concat(selector));
10
+ return cy.get(selector).then(function ($elements) {
11
+ return cy.wrap($elements.length);
12
+ });
13
+ });
14
+ };
15
+ /*----------------------------------------*/
16
+ /* --------------- Export --------------- */
17
+ /*----------------------------------------*/
18
+ exports.default = getNumElements;
19
+ //# sourceMappingURL=getNumElements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNumElements.js","sourceRoot":"","sources":["../../src/commands/getNumElements.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAqBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,cAAc,GAAG;IACrB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,gBAAgB,EAChB,UACE,QAAgB;QAElB,EAAE,CAAC,GAAG,CAAC,kCAA2B,QAAQ,CAAE,CAAC,CAAC;QAC9C,OAAO,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAC,SAAc;YAC1C,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,cAAc,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,13 @@
1
+ declare global {
2
+ namespace Cypress {
3
+ interface Chainable {
4
+ /**
5
+ * Get the current title of the page
6
+ * @author Gardenia Liu
7
+ */
8
+ getTitle(): Chainable<string>;
9
+ }
10
+ }
11
+ }
12
+ declare const getTitle: () => void;
13
+ export default getTitle;
@@ -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;QAC7B,OAAO,CACL,EAAE;aACC,KAAK,EAAE;aACP,IAAI,CAAC,UAAC,KAAK;YACV,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CACL,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,QAAQ,CAAC"}