Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@atomic-testing/core

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atomic-testing/core - npm Package Compare versions

Comparing version
0.8.0
to
0.9.0
+2
dist/locators/byAttribute.d.ts
import { LocatorRelativePosition, PartLocatorType } from './PartLocatorType';
export declare function byAttribute(name: string, value: string, relativeTo?: LocatorRelativePosition): PartLocatorType;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.byAttribute = void 0;
const PartLocatorType_1 = require("./PartLocatorType");
function byAttribute(name, value, relativeTo = PartLocatorType_1.LocatorRelativePosition.Descendent) {
const selector = `[${name}="${encodeURIComponent(value)}"]`;
return {
type: PartLocatorType_1.LocatorType.Css,
selector,
relative: relativeTo,
};
}
exports.byAttribute = byAttribute;
//# sourceMappingURL=byAttribute.js.map
{"version":3,"file":"byAttribute.js","sourceRoot":"","sources":["../../src/locators/byAttribute.ts"],"names":[],"mappings":";;;AAAA,uDAA0F;AAE1F,SAAgB,WAAW,CACzB,IAAY,EACZ,KAAa,EACb,aAAsC,yCAAuB,CAAC,UAAU;IAExE,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC;IAE5D,OAAO;QACL,IAAI,EAAE,6BAAW,CAAC,GAAG;QACrB,QAAQ;QACR,QAAQ,EAAE,UAAU;KACrB,CAAC;AACJ,CAAC;AAZD,kCAYC"}
import { LocatorRelativePosition, PartLocatorType } from './PartLocatorType';
export declare function byInputType(type: string, relative?: LocatorRelativePosition): PartLocatorType;
"use strict";
// TODO: Use descriptive selector instead of css selector so the selector can be reintepreted
Object.defineProperty(exports, "__esModule", { value: true });
exports.byInputType = void 0;
const PartLocatorType_1 = require("./PartLocatorType");
// to implementation other than CSS selector
function byInputType(type, relative = PartLocatorType_1.LocatorRelativePosition.Descendent) {
const selector = `input[type=${type}]`;
return {
type: PartLocatorType_1.LocatorType.Css,
selector,
relative,
};
}
exports.byInputType = byInputType;
//# sourceMappingURL=byInputType.js.map
{"version":3,"file":"byInputType.js","sourceRoot":"","sources":["../../src/locators/byInputType.ts"],"names":[],"mappings":";AAAA,6FAA6F;;;AAE7F,uDAA0F;AAE1F,4CAA4C;AAC5C,SAAgB,WAAW,CACzB,IAAY,EACZ,WAAoC,yCAAuB,CAAC,UAAU;IAEtE,MAAM,QAAQ,GAAG,cAAc,IAAI,GAAG,CAAC;IACvC,OAAO;QACL,IAAI,EAAE,6BAAW,CAAC,GAAG;QACrB,QAAQ;QACR,QAAQ;KACT,CAAC;AACJ,CAAC;AAVD,kCAUC"}
import { LocatorRelativePosition, LocatorType, PartLocatorType } from './PartLocatorType';
export function byAttribute(
name: string,
value: string,
relativeTo: LocatorRelativePosition = LocatorRelativePosition.Descendent,
): PartLocatorType {
const selector = `[${name}="${encodeURIComponent(value)}"]`;
return {
type: LocatorType.Css,
selector,
relative: relativeTo,
};
}
// TODO: Use descriptive selector instead of css selector so the selector can be reintepreted
import { LocatorRelativePosition, LocatorType, PartLocatorType } from './PartLocatorType';
// to implementation other than CSS selector
export function byInputType(
type: string,
relative: LocatorRelativePosition = LocatorRelativePosition.Descendent,
): PartLocatorType {
const selector = `input[type=${type}]`;
return {
type: LocatorType.Css,
selector,
relative,
};
}
+1
-1

@@ -6,3 +6,3 @@ "use strict";

const PartLocatorType_1 = require("./PartLocatorType");
// to implementaiton other than CSS selector
// to implementation other than CSS selector
function byChecked(checked = true, relative = PartLocatorType_1.LocatorRelativePosition.Same) {

@@ -9,0 +9,0 @@ let selector = ':checked';

@@ -0,4 +1,6 @@

export { byAttribute } from './byAttribute';
export { byChecked } from './byChecked';
export { byCssClass } from './byCssClass';
export { byDataTestId } from './byDataTestId';
export { byInputType } from './byInputType';
export { byName } from './byName';

@@ -5,0 +7,0 @@ export { byRole } from './byRole';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocatorType = exports.LocatorRelativePosition = exports.byValue = exports.byTagName = exports.byRole = exports.byName = exports.byDataTestId = exports.byCssClass = exports.byChecked = void 0;
exports.LocatorType = exports.LocatorRelativePosition = exports.byValue = exports.byTagName = exports.byRole = exports.byName = exports.byInputType = exports.byDataTestId = exports.byCssClass = exports.byChecked = exports.byAttribute = void 0;
var byAttribute_1 = require("./byAttribute");
Object.defineProperty(exports, "byAttribute", { enumerable: true, get: function () { return byAttribute_1.byAttribute; } });
var byChecked_1 = require("./byChecked");

@@ -10,2 +12,4 @@ Object.defineProperty(exports, "byChecked", { enumerable: true, get: function () { return byChecked_1.byChecked; } });

Object.defineProperty(exports, "byDataTestId", { enumerable: true, get: function () { return byDataTestId_1.byDataTestId; } });
var byInputType_1 = require("./byInputType");
Object.defineProperty(exports, "byInputType", { enumerable: true, get: function () { return byInputType_1.byInputType; } });
var byName_1 = require("./byName");

@@ -12,0 +16,0 @@ Object.defineProperty(exports, "byName", { enumerable: true, get: function () { return byName_1.byName; } });

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locators/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAyE;AAAhE,0HAAA,uBAAuB,OAAA;AAAE,8GAAA,WAAW,OAAA"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locators/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAyE;AAAhE,0HAAA,uBAAuB,OAAA;AAAE,8GAAA,WAAW,OAAA"}
{
"name": "@atomic-testing/core",
"version": "0.8.0",
"version": "0.9.0",
"description": "Core library for atomic-testing",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,3 +5,3 @@ // TODO: Use descriptive selector instead of css selector so the selector can be reintepreted

// to implementaiton other than CSS selector
// to implementation other than CSS selector
export function byChecked(

@@ -8,0 +8,0 @@ checked = true,

@@ -0,4 +1,6 @@

export { byAttribute } from './byAttribute';
export { byChecked } from './byChecked';
export { byCssClass } from './byCssClass';
export { byDataTestId } from './byDataTestId';
export { byInputType } from './byInputType';
export { byName } from './byName';

@@ -5,0 +7,0 @@ export { byRole } from './byRole';