dceky 1.0.0-beta.2 → 1.0.0-beta.4

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/lib/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ import init from './init';
1
2
  import genConfiguration from './genConfiguration';
2
- export { genConfiguration, };
3
+ export { genConfiguration, init, };
package/lib/index.js CHANGED
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.genConfiguration = void 0;
6
+ exports.init = exports.genConfiguration = void 0;
7
7
  var init_1 = __importDefault(require("./init"));
8
+ exports.init = init_1.default;
8
9
  var genConfiguration_1 = __importDefault(require("./genConfiguration"));
9
10
  exports.genConfiguration = genConfiguration_1.default;
10
11
  // Automatically initialize upon importing the library
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,gDAA0B;AAC1B,wEAAkD;AAOhD,2BAPK,0BAAgB,CAOL;AALlB,sDAAsD;AACtD,IAAA,cAAI,GAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,gDAA0B;AASxB,eATK,cAAI,CASL;AARN,wEAAkD;AAOhD,2BAPK,0BAAgB,CAOL;AALlB,sDAAsD;AACtD,IAAA,cAAI,GAAE,CAAC"}
package/lib/init.js CHANGED
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  /// <reference types="cypress" />
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ // Find the top level directory
5
+ var pwd = (process.env.PWD || process.env.CWD);
4
6
  var init = function () {
5
7
  Cypress.Commands.add('clickSomething', function (selector) {
6
8
  cy.get(selector).click();
7
9
  });
10
+ // Add project commands
11
+ Cypress.require("".concat(pwd, "/cypress/support/ProjectCommands.ts"));
8
12
  };
9
13
  exports.default = init;
10
14
  //# sourceMappingURL=init.js.map
package/lib/init.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAejC,IAAM,IAAI,GAAG;IACX,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,EAAE,UAAC,QAAgB;QACtD,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":";AAAA,iCAAiC;;AAejC,+BAA+B;AAC/B,IAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD,IAAM,IAAI,GAAG;IACX,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,gBAAgB,EAAE,UAAC,QAAgB;QACtD,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,uBAAuB;IACvB,OAAO,CAAC,OAAO,CAAC,UAAG,GAAG,wCAAqC,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dceky",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "description": "Cypress toolkit for Harvard DCE",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -7,4 +7,5 @@ init();
7
7
  // Exports
8
8
  export {
9
9
  genConfiguration,
10
+ init,
10
11
  };
package/src/init.ts CHANGED
@@ -13,10 +13,16 @@ declare global {
13
13
  }
14
14
  }
15
15
 
16
+ // Find the top level directory
17
+ const pwd = (process.env.PWD || process.env.CWD);
18
+
16
19
  const init = () => {
17
20
  Cypress.Commands.add('clickSomething', (selector: string) => {
18
21
  cy.get(selector).click();
19
22
  });
23
+
24
+ // Add project commands
25
+ Cypress.require(`${pwd}/cypress/support/ProjectCommands.ts`);
20
26
  };
21
27
 
22
28
  export default init;