dceky 1.0.23 → 1.0.25

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 (135) hide show
  1. package/lib/src/commands/getCredentialValue.d.ts +18 -0
  2. package/lib/{commands/assertHasClass.js → src/commands/getCredentialValue.js} +8 -6
  3. package/lib/src/commands/getCredentialValue.js.map +1 -0
  4. package/lib/src/commands/getCredentialValues.d.ts +18 -0
  5. package/lib/{commands/getTitle.js → src/commands/getCredentialValues.js} +5 -9
  6. package/lib/src/commands/getCredentialValues.js.map +1 -0
  7. package/lib/src/commands/getProfileValue.d.ts +15 -0
  8. package/lib/{commands/getId.js → src/commands/getProfileValue.js} +5 -10
  9. package/lib/src/commands/getProfileValue.js.map +1 -0
  10. package/lib/src/commands/handleHarvardKey.js +36 -33
  11. package/lib/src/commands/handleHarvardKey.js.map +1 -1
  12. package/lib/src/commands/index.js +6 -0
  13. package/lib/src/commands/index.js.map +1 -1
  14. package/lib/src/commands/launchAs.js +70 -68
  15. package/lib/src/commands/launchAs.js.map +1 -1
  16. package/lib/src/commands/logIntoPorta.js +46 -43
  17. package/lib/src/commands/logIntoPorta.js.map +1 -1
  18. package/lib/src/genConfiguration/index.js +7 -4
  19. package/lib/src/genConfiguration/index.js.map +1 -1
  20. package/package.json +2 -2
  21. package/src/commands/getCredentialValue.ts +45 -0
  22. package/src/commands/getCredentialValues.ts +43 -0
  23. package/src/commands/getProfileValue.ts +40 -0
  24. package/src/commands/handleHarvardKey.ts +41 -38
  25. package/src/commands/index.ts +6 -0
  26. package/src/commands/launchAs.ts +90 -88
  27. package/src/commands/logIntoPorta.ts +61 -57
  28. package/src/genConfiguration/index.ts +11 -4
  29. package/cypress/e2e/profile-test.cy.ts +0 -10
  30. package/cypress/fixtures/example.json +0 -5
  31. package/cypress/support/commands.ts +0 -37
  32. package/cypress/support/e2e.ts +0 -17
  33. package/lib/commands/assertDoesNotHaveClass.d.ts +0 -18
  34. package/lib/commands/assertDoesNotHaveClass.js +0 -17
  35. package/lib/commands/assertDoesNotHaveClass.js.map +0 -1
  36. package/lib/commands/assertHasClass.d.ts +0 -18
  37. package/lib/commands/assertHasClass.js.map +0 -1
  38. package/lib/commands/assertNumElements.d.ts +0 -18
  39. package/lib/commands/assertNumElements.js +0 -17
  40. package/lib/commands/assertNumElements.js.map +0 -1
  41. package/lib/commands/clickWithRetry.d.ts +0 -19
  42. package/lib/commands/clickWithRetry.js +0 -29
  43. package/lib/commands/clickWithRetry.js.map +0 -1
  44. package/lib/commands/genTextOfLength.d.ts +0 -20
  45. package/lib/commands/genTextOfLength.js +0 -20
  46. package/lib/commands/genTextOfLength.js.map +0 -1
  47. package/lib/commands/getAttribute.d.ts +0 -20
  48. package/lib/commands/getAttribute.js +0 -22
  49. package/lib/commands/getAttribute.js.map +0 -1
  50. package/lib/commands/getClassName.d.ts +0 -15
  51. package/lib/commands/getClassName.js +0 -21
  52. package/lib/commands/getClassName.js.map +0 -1
  53. package/lib/commands/getCurrentDateInfo.d.ts +0 -21
  54. package/lib/commands/getCurrentDateInfo.js +0 -25
  55. package/lib/commands/getCurrentDateInfo.js.map +0 -1
  56. package/lib/commands/getId.d.ts +0 -15
  57. package/lib/commands/getId.js.map +0 -1
  58. package/lib/commands/getNumElements.d.ts +0 -14
  59. package/lib/commands/getNumElements.js +0 -19
  60. package/lib/commands/getNumElements.js.map +0 -1
  61. package/lib/commands/getSpecialChars.d.ts +0 -14
  62. package/lib/commands/getSpecialChars.js +0 -16
  63. package/lib/commands/getSpecialChars.js.map +0 -1
  64. package/lib/commands/getTitle.d.ts +0 -13
  65. package/lib/commands/getTitle.js.map +0 -1
  66. package/lib/commands/handleHarvardKey.d.ts +0 -18
  67. package/lib/commands/handleHarvardKey.js +0 -56
  68. package/lib/commands/handleHarvardKey.js.map +0 -1
  69. package/lib/commands/handleHarvardKey2.d.ts +0 -14
  70. package/lib/commands/handleHarvardKey2.js +0 -88
  71. package/lib/commands/handleHarvardKey2.js.map +0 -1
  72. package/lib/commands/launchAs.d.ts +0 -20
  73. package/lib/commands/launchAs.js +0 -60
  74. package/lib/commands/launchAs.js.map +0 -1
  75. package/lib/commands/launchLTIUsingToken.d.ts +0 -19
  76. package/lib/commands/launchLTIUsingToken.js +0 -74
  77. package/lib/commands/launchLTIUsingToken.js.map +0 -1
  78. package/lib/commands/listSelectLabels.d.ts +0 -15
  79. package/lib/commands/listSelectLabels.js +0 -24
  80. package/lib/commands/listSelectLabels.js.map +0 -1
  81. package/lib/commands/listSelectValues.d.ts +0 -15
  82. package/lib/commands/listSelectValues.js +0 -26
  83. package/lib/commands/listSelectValues.js.map +0 -1
  84. package/lib/commands/navigateToHref.d.ts +0 -19
  85. package/lib/commands/navigateToHref.js +0 -23
  86. package/lib/commands/navigateToHref.js.map +0 -1
  87. package/lib/commands/padWithZeros.d.ts +0 -20
  88. package/lib/commands/padWithZeros.js +0 -24
  89. package/lib/commands/padWithZeros.js.map +0 -1
  90. package/lib/commands/runScript.d.ts +0 -16
  91. package/lib/commands/runScript.js +0 -25
  92. package/lib/commands/runScript.js.map +0 -1
  93. package/lib/commands/typeInto.d.ts +0 -20
  94. package/lib/commands/typeInto.js +0 -28
  95. package/lib/commands/typeInto.js.map +0 -1
  96. package/lib/commands/uniquify.d.ts +0 -15
  97. package/lib/commands/uniquify.js +0 -25
  98. package/lib/commands/uniquify.js.map +0 -1
  99. package/lib/commands/visitCanvasEndpoint.d.ts +0 -27
  100. package/lib/commands/visitCanvasEndpoint.js +0 -35
  101. package/lib/commands/visitCanvasEndpoint.js.map +0 -1
  102. package/lib/commands/visitCanvasGETEndpoint.d.ts +0 -20
  103. package/lib/commands/visitCanvasGETEndpoint.js +0 -26
  104. package/lib/commands/visitCanvasGETEndpoint.js.map +0 -1
  105. package/lib/commands/waitForAtLeastOneElementPresent.d.ts +0 -23
  106. package/lib/commands/waitForAtLeastOneElementPresent.js +0 -27
  107. package/lib/commands/waitForAtLeastOneElementPresent.js.map +0 -1
  108. package/lib/commands/waitForElementVisible.d.ts +0 -14
  109. package/lib/commands/waitForElementVisible.js +0 -20
  110. package/lib/commands/waitForElementVisible.js.map +0 -1
  111. package/lib/index.js.map +0 -1
  112. package/lib/init.d.ts +0 -6
  113. package/lib/init.js +0 -69
  114. package/lib/init.js.map +0 -1
  115. package/lib/postinstall/helpers/exec.d.ts +0 -8
  116. package/lib/postinstall/helpers/exec.js +0 -18
  117. package/lib/postinstall/helpers/exec.js.map +0 -1
  118. package/lib/setup/checkRequiredFiles.d.ts +0 -6
  119. package/lib/setup/checkRequiredFiles.js +0 -60
  120. package/lib/setup/checkRequiredFiles.js.map +0 -1
  121. package/lib/setup/genEmptyGlobalFile.d.ts +0 -7
  122. package/lib/setup/genEmptyGlobalFile.js +0 -41
  123. package/lib/setup/genEmptyGlobalFile.js.map +0 -1
  124. package/lib/src/commands/launchLTIUsingToken.d.ts +0 -21
  125. package/lib/src/commands/launchLTIUsingToken.js +0 -76
  126. package/lib/src/commands/launchLTIUsingToken.js.map +0 -1
  127. package/lib/src/commands/visitCanvasGETEndpoint.d.ts +0 -20
  128. package/lib/src/commands/visitCanvasGETEndpoint.js +0 -26
  129. package/lib/src/commands/visitCanvasGETEndpoint.js.map +0 -1
  130. package/lib/src/init.d.ts +0 -6
  131. package/lib/src/init.js +0 -71
  132. package/lib/src/init.js.map +0 -1
  133. package/lib/src/node.d.ts +0 -2
  134. package/lib/src/node.js +0 -10
  135. package/lib/src/node.js.map +0 -1
@@ -1,10 +0,0 @@
1
- /**
2
- * Test to display the profile
3
- * @author Gardenia Liu
4
- */
5
-
6
- describe('Current Profile', () => {
7
- it('Show current profile', () => {
8
- cy.log(`Current profile: ${Cypress.env('PROFILE')}`);
9
- });
10
- });
@@ -1,5 +0,0 @@
1
- {
2
- "name": "Using fixtures to represent data",
3
- "email": "hello@cypress.io",
4
- "body": "Fixtures are a great way to mock data for responses to routes"
5
- }
@@ -1,37 +0,0 @@
1
- /// <reference types="cypress" />
2
- // ***********************************************
3
- // This example commands.ts shows you how to
4
- // create various custom commands and overwrite
5
- // existing commands.
6
- //
7
- // For more comprehensive examples of custom
8
- // commands please read more here:
9
- // https://on.cypress.io/custom-commands
10
- // ***********************************************
11
- //
12
- //
13
- // -- This is a parent command --
14
- // Cypress.Commands.add('login', (email, password) => { ... })
15
- //
16
- //
17
- // -- This is a child command --
18
- // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
19
- //
20
- //
21
- // -- This is a dual command --
22
- // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
23
- //
24
- //
25
- // -- This will overwrite an existing command --
26
- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
27
- //
28
- // declare global {
29
- // namespace Cypress {
30
- // interface Chainable {
31
- // login(email: string, password: string): Chainable<void>
32
- // drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
33
- // dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
34
- // visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
35
- // }
36
- // }
37
- // }
@@ -1,17 +0,0 @@
1
- // ***********************************************************
2
- // This example support/e2e.ts is processed and
3
- // loaded automatically before your test files.
4
- //
5
- // This is a great place to put global configuration and
6
- // behavior that modifies Cypress.
7
- //
8
- // You can change the location of this file or turn off
9
- // automatically serving support files with the
10
- // 'supportFile' configuration option.
11
- //
12
- // You can read more here:
13
- // https://on.cypress.io/configuration
14
- // ***********************************************************
15
-
16
- // Import commands.js using ES2015 syntax:
17
- import './commands'
@@ -1,18 +0,0 @@
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;
@@ -1,17 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,18 +0,0 @@
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;
@@ -1 +0,0 @@
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"}
@@ -1,18 +0,0 @@
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;
@@ -1,17 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,19 +0,0 @@
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;
@@ -1,29 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,20 +0,0 @@
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;
@@ -1,20 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,20 +0,0 @@
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;
@@ -1,22 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
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;
@@ -1,21 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,21 +0,0 @@
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;
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
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;
@@ -1 +0,0 @@
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,14 +0,0 @@
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;
@@ -1,19 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
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;
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,13 +0,0 @@
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;
@@ -1 +0,0 @@
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"}
@@ -1,18 +0,0 @@
1
- declare global {
2
- namespace Cypress {
3
- interface Chainable {
4
- /**
5
- * Handle a HarvardKey login page for a user
6
- * @param opts object containing all arguments
7
- * @param opts.url the URL to visit for HarvardKey authentication
8
- * @param opts.name the name of the user environment variable
9
- */
10
- handleHarvardKey(opts: {
11
- url: string;
12
- name: string;
13
- }): Chainable<void>;
14
- }
15
- }
16
- }
17
- declare const handleHarvardKey: () => void;
18
- export default handleHarvardKey;
@@ -1,56 +0,0 @@
1
- "use strict";
2
- /// <reference types="cypress" />
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- /*----------------------------------------*/
5
- /* --------------- Command -------------- */
6
- /*----------------------------------------*/
7
- var handleHarvardKey = function () {
8
- Cypress.Commands.add('handleHarvardKey', function (opts) {
9
- var url = opts.url, name = opts.name;
10
- cy.log('Handling HarvardKey authentication');
11
- var userInfo = Cypress.env(name);
12
- if (userInfo == null) {
13
- throw new Error("Could not find ".concat(name, " in environment variables"));
14
- }
15
- var username = userInfo.username;
16
- var password = userInfo.password;
17
- cy.visit(url);
18
- // Get the Harvard login URL using originWithKaixa with auto-initialized functions
19
- cy.origin('https://apps.cirrusidentity.com', function () {
20
- Cypress.require('dceky');
21
- return cy.navigateToHref({
22
- item: '#idp_1001962798_button',
23
- domain: 'https://apps.cirrusidentity.com'
24
- });
25
- }).then(function (fullUrl) {
26
- // Navigate to the Harvard login page using originWithKaixa
27
- cy.origin('https://harvard.idp.cirrusidentity.com', {
28
- args: { username: username, password: password, fullUrl: fullUrl }
29
- }, function (args) {
30
- Cypress.require('dceky');
31
- var username = args.username, password = args.password, fullUrl = args.fullUrl;
32
- cy.on('uncaught:exception', function (e) {
33
- // Ignore known HarvardKey errors
34
- if (!e.message.includes('ready is not defined')) {
35
- throw e;
36
- }
37
- return false;
38
- });
39
- cy.visit(fullUrl.toString());
40
- // Wait for and fill in the login form using enhanced functions
41
- cy.waitForElementVisible('#username');
42
- cy.waitForElementVisible('#password');
43
- // Add credentials using enhanced functions
44
- cy.typeInto({ item: '#username', text: username });
45
- cy.typeInto({ item: '#password', text: password });
46
- // Submit the form using clickWithRetry
47
- cy.clickWithRetry('input[type="submit"], button[type="submit"], .btn-primary');
48
- });
49
- });
50
- });
51
- };
52
- /*----------------------------------------*/
53
- /* --------------- Export --------------- */
54
- /*----------------------------------------*/
55
- exports.default = handleHarvardKey;
56
- //# sourceMappingURL=handleHarvardKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handleHarvardKey.js","sourceRoot":"","sources":["../../src/commands/handleHarvardKey.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAyBjC,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAM,gBAAgB,GAAG;IACvB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAClB,kBAAkB,EAClB,UACE,IAGC;QAEK,IAAA,GAAG,GAAW,IAAI,IAAf,EAAE,IAAI,GAAK,IAAI,KAAT,CAAU;QAC3B,EAAE,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAE7C,IAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,yBAAkB,IAAI,8BAA2B,CAAC,CAAC;QACrE,CAAC;QAED,IAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACnC,IAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QAEnC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEd,kFAAkF;QAClF,EAAE,CAAC,MAAM,CAAC,iCAAiC,EAAE;YAC3C,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAEzB,OAAO,EAAE,CAAC,cAAc,CAAC;gBACtB,IAAI,EAAE,wBAAwB;gBAC9B,MAAM,EAAE,iCAAiC;aACzC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,OAAY;YACnB,2DAA2D;YAC3D,EAAE,CAAC,MAAM,CAAC,wCAAwC,EAAE;gBAClD,IAAI,EAAE,EAAE,QAAQ,UAAA,EAAE,QAAQ,UAAA,EAAE,OAAO,SAAA,EAAE;aACtC,EAAE,UAAC,IAAI;gBACN,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACjB,IAAA,QAAQ,GAAwB,IAAI,SAA5B,EAAE,QAAQ,GAAc,IAAI,SAAlB,EAAE,OAAO,GAAK,IAAI,QAAT,CAAU;gBAE7C,EAAE,CAAC,EAAE,CAAC,oBAAoB,EAAE,UAAC,CAAM;oBACjC,iCAAiC;oBACjC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;wBAChD,MAAM,CAAC,CAAC;oBACV,CAAC;oBACD,OAAO,KAAK,CAAC;gBACf,CAAC,CAAC,CAAC;gBAEH,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;gBAE7B,+DAA+D;gBAC/D,EAAE,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;gBACtC,EAAE,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;gBAEtC,2CAA2C;gBAC3C,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;gBACnD,EAAE,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;gBAEnD,uCAAuC;gBACvC,EAAE,CAAC,cAAc,CAAC,2DAA2D,CAAC,CAAC;YACjF,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,kBAAe,gBAAgB,CAAC"}