Socket
Socket
Sign inDemoInstall

@atomic-testing/component-driver-html

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atomic-testing/component-driver-html - npm Package Compare versions

Comparing version 0.35.0 to 0.36.0

4

dist/components/HTMLButtonDriver.d.ts

@@ -1,7 +0,5 @@

import { ClickOption, ComponentDriver, IClickableDriver, IMouseInteractableDriver } from '@atomic-testing/core';
import { ComponentDriver, IClickableDriver, IMouseInteractableDriver } from '@atomic-testing/core';
export declare class HTMLButtonDriver extends ComponentDriver<{}> implements IClickableDriver, IMouseInteractableDriver {
hover(): Promise<void>;
click(option?: ClickOption): Promise<void>;
isDisabled(): Promise<boolean>;
get driverName(): string;
}
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -15,12 +6,2 @@ exports.HTMLButtonDriver = void 0;

class HTMLButtonDriver extends core_1.ComponentDriver {
hover() {
return __awaiter(this, void 0, void 0, function* () {
this.interactor.hover(this.locator);
});
}
click(option) {
return __awaiter(this, void 0, void 0, function* () {
yield this.interactor.click(this.locator, option);
});
}
isDisabled() {

@@ -27,0 +8,0 @@ return this.interactor.isDisabled(this.locator);

@@ -6,4 +6,3 @@ import { ComponentDriver } from '@atomic-testing/core';

export declare class HTMLElementDriver extends ComponentDriver<{}> {
hover(): Promise<void>;
get driverName(): string;
}
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -18,7 +9,2 @@ exports.HTMLElementDriver = void 0;

class HTMLElementDriver extends core_1.ComponentDriver {
hover() {
return __awaiter(this, void 0, void 0, function* () {
this.interactor.hover(this.locator);
});
}
get driverName() {

@@ -25,0 +11,0 @@ return 'HTMLElementDriver';

@@ -5,4 +5,4 @@ import { ComponentDriver, IComponentDriverOption, IInputDriver, Interactor, PartLocator } from '@atomic-testing/core';

getValue(): Promise<string | null>;
setValue(value: string | null): Promise<boolean>;
setValue(_value: string | null): Promise<boolean>;
get driverName(): string;
}

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

}
setValue(value) {
setValue(_value) {
// Setting value of a hidden input should not be part of user interaction

@@ -27,0 +27,0 @@ throw new Error('Not implemented');

@@ -55,16 +55,11 @@ "use strict";

try {
for (var _d = true, _e = __asyncValues(core_1.listHelper.getListItemIterator(this, itemLocatorBase, HTMLOptionDriver_1.HTMLOptionDriver)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
for (var _d = true, _e = __asyncValues(core_1.listHelper.getListItemIterator(this, itemLocatorBase, HTMLOptionDriver_1.HTMLOptionDriver)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
try {
const item = _c;
const label = yield item.label();
const value = yield item.value();
if (label != null && labelSet.has(label) && value != null) {
values.push(value);
}
const item = _c;
const label = yield item.label();
const value = yield item.value();
if (label != null && labelSet.has(label) && value != null) {
values.push(value);
}
finally {
_d = true;
}
}

@@ -71,0 +66,0 @@ }

@@ -6,3 +6,2 @@ import { ComponentDriver, IComponentDriverOption, IInputDriver, Interactor, PartLocator } from '@atomic-testing/core';

setValue(value: string | null): Promise<boolean>;
click(): Promise<void>;
isDisabled(): Promise<boolean>;

@@ -9,0 +8,0 @@ isReadonly(): Promise<boolean>;

@@ -30,7 +30,2 @@ "use strict";

}
click() {
return __awaiter(this, void 0, void 0, function* () {
const value = yield this.interactor.click(this.locator);
});
}
isDisabled() {

@@ -37,0 +32,0 @@ return this.interactor.isDisabled(this.locator);

{
"name": "@atomic-testing/component-driver-html",
"version": "0.35.0",
"version": "0.36.0",
"description": "HTML component driver for atomic-testing",

@@ -25,7 +25,7 @@ "main": "dist/index.js",

"dependencies": {
"@atomic-testing/core": "0.35.0"
"@atomic-testing/core": "0.36.0"
},
"devDependencies": {
"@testing-library/dom": "^9.2.0",
"@testing-library/user-event": "^14.0.0",
"@testing-library/user-event": "^14.5.0",
"@types/jest": "^29.5.5",

@@ -39,3 +39,3 @@ "@types/node": "^16.0.0",

"ts-node": "^10.9.0",
"typescript": "^5.0.2"
"typescript": "^5.2.2"
},

@@ -42,0 +42,0 @@ "peerDependencies": {},

@@ -1,12 +0,4 @@

import { ClickOption, ComponentDriver, IClickableDriver, IMouseInteractableDriver } from '@atomic-testing/core';
import { ComponentDriver, IClickableDriver, IMouseInteractableDriver } from '@atomic-testing/core';
export class HTMLButtonDriver extends ComponentDriver<{}> implements IClickableDriver, IMouseInteractableDriver {
async hover(): Promise<void> {
this.interactor.hover(this.locator);
}
async click(option?: ClickOption): Promise<void> {
await this.interactor.click(this.locator, option);
}
isDisabled(): Promise<boolean> {

@@ -13,0 +5,0 @@ return this.interactor.isDisabled(this.locator);

@@ -7,6 +7,2 @@ import { ComponentDriver } from '@atomic-testing/core';

export class HTMLElementDriver extends ComponentDriver<{}> {
async hover() {
this.interactor.hover(this.locator);
}
get driverName(): string {

@@ -13,0 +9,0 @@ return 'HTMLElementDriver';

@@ -16,3 +16,3 @@ import { ComponentDriver, IComponentDriverOption, IInputDriver, Interactor, PartLocator } from '@atomic-testing/core';

setValue(value: string | null): Promise<boolean> {
setValue(_value: string | null): Promise<boolean> {
// Setting value of a hidden input should not be part of user interaction

@@ -19,0 +19,0 @@ throw new Error('Not implemented');

@@ -21,6 +21,2 @@ import { ComponentDriver, IComponentDriverOption, IInputDriver, Interactor, PartLocator } from '@atomic-testing/core';

async click(): Promise<void> {
const value = await this.interactor.click(this.locator);
}
isDisabled(): Promise<boolean> {

@@ -27,0 +23,0 @@ return this.interactor.isDisabled(this.locator);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc