@skbkontur/playwright-react-ui-components 1.14.0-beta.1 → 1.14.0-beta.3
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/build/src/assertions/CheckboxAssertions.js +1 -1
- package/build/src/assertions/ComboBoxAssertions.js +4 -4
- package/build/src/assertions/DropdownAssertions.js +4 -4
- package/build/src/assertions/DropdownMenuAssertions.js +4 -4
- package/build/src/assertions/FileUploaderAssertions.js +1 -1
- package/build/src/assertions/FxInputAssertions.js +2 -2
- package/build/src/assertions/KebabAssertions.js +4 -4
- package/build/src/assertions/LinkAssertions.js +2 -2
- package/build/src/assertions/PagingAssertions.js +2 -2
- package/build/src/assertions/RadioGroupAssertions.js +6 -6
- package/build/src/assertions/SelectAssertions.js +2 -2
- package/build/src/assertions/TabAssertions.js +2 -2
- package/build/src/assertions/TabsAssertions.js +3 -3
- package/build/src/assertions/TokenInputAssertions.js +1 -1
- package/build/src/components/ComboBox.d.ts +1 -2
- package/build/src/components/ComboBox.js +53 -54
- package/build/src/components/Dropdown.d.ts +1 -2
- package/build/src/components/Dropdown.js +61 -62
- package/build/src/components/DropdownMenu.d.ts +1 -2
- package/build/src/components/DropdownMenu.js +61 -62
- package/build/src/components/Kebab.d.ts +1 -2
- package/build/src/components/Kebab.js +43 -44
- package/build/src/components/MenuComponent.d.ts +2 -1
- package/build/src/components/MenuComponent.js +6 -5
- package/build/src/matchers/component/toBeActiveTab.d.ts +3 -0
- package/build/src/matchers/component/{toBeActiveEx.js → toBeActiveTab.js} +2 -2
- package/build/src/matchers/component/toBeAutoMode.d.ts +3 -0
- package/build/src/matchers/component/{toBeAutoEx.js → toBeAutoMode.js} +2 -2
- package/build/src/matchers/component/toBeCheckedByIndex.d.ts +3 -0
- package/build/src/matchers/component/{toBeUncheckedByIndexEx.js → toBeCheckedByIndex.js} +4 -4
- package/build/src/matchers/component/toBeCheckedByText.d.ts +3 -0
- package/build/src/matchers/component/{toBeCheckedByTextEx.js → toBeCheckedByText.js} +2 -2
- package/build/src/matchers/component/toBeCheckedByValue.d.ts +3 -0
- package/build/src/matchers/component/{toBeCheckedByValueEx.js → toBeCheckedByValue.js} +2 -2
- package/build/src/matchers/component/toBeDisabledEx.d.ts +1 -1
- package/build/src/matchers/component/toBeDisabledEx.js +7 -8
- package/build/src/matchers/component/toBeEmptyEx.d.ts +1 -1
- package/build/src/matchers/component/toBeEmptyEx.js +4 -5
- package/build/src/matchers/component/toBeEnabledEx.js +15 -25
- package/build/src/matchers/component/toBeHiddenEx.js +1 -2
- package/build/src/matchers/component/toBeInactiveTab.d.ts +3 -0
- package/build/src/matchers/component/{toBeInactiveEx.js → toBeInactiveTab.js} +2 -2
- package/build/src/matchers/component/toBeUnchecked.d.ts +3 -0
- package/build/src/matchers/component/{toBeUncheckedEx.js → toBeUnchecked.js} +2 -2
- package/build/src/matchers/component/{toBeCheckedByIndexEx.d.ts → toBeUncheckedByIndex.d.ts} +2 -2
- package/build/src/matchers/component/{toBeCheckedByIndexEx.js → toBeUncheckedByIndex.js} +4 -4
- package/build/src/matchers/component/{toBeCheckedByTextEx.d.ts → toBeUncheckedByText.d.ts} +2 -2
- package/build/src/matchers/component/{toBeUncheckedByTextEx.js → toBeUncheckedByText.js} +3 -3
- package/build/src/matchers/component/{toBeCheckedByValueEx.d.ts → toBeUncheckedByValue.d.ts} +2 -2
- package/build/src/matchers/component/{toBeUncheckedByValueEx.js → toBeUncheckedByValue.js} +3 -3
- package/build/src/matchers/component/toBeVisibleEx.js +1 -2
- package/build/src/matchers/component/toContainItem.d.ts +4 -0
- package/build/src/matchers/component/{toContainItemEx.js → toContainItem.js} +2 -3
- package/build/src/matchers/component/toContainItems.d.ts +3 -0
- package/build/src/matchers/component/{toContainItemsEx.js → toContainItems.js} +4 -4
- package/build/src/matchers/component/toContainSelectValue.d.ts +3 -0
- package/build/src/matchers/component/{toContainValueEx.js → toContainSelectValue.js} +2 -2
- package/build/src/matchers/component/toContainTabs.d.ts +3 -0
- package/build/src/matchers/component/{toContainTabsEx.js → toContainTabs.js} +2 -2
- package/build/src/matchers/component/{toContainTokensEx.d.ts → toContainTokens.d.ts} +1 -1
- package/build/src/matchers/component/{toContainTokensEx.js → toContainTokens.js} +2 -2
- package/build/src/matchers/component/toContainUploadedFiles.d.ts +4 -0
- package/build/src/matchers/component/{toContainUploadedFilesEx.js → toContainUploadedFiles.js} +2 -2
- package/build/src/matchers/component/{toHavePageCountEx.d.ts → toHaveActivePage.d.ts} +1 -1
- package/build/src/matchers/component/{toHaveActivePageEx.js → toHaveActivePage.js} +2 -2
- package/build/src/matchers/component/toHaveActiveTab.d.ts +2 -0
- package/build/src/matchers/component/{toHaveActiveTabEx.js → toHaveActiveTab.js} +4 -4
- package/build/src/matchers/component/toHaveError.d.ts +3 -0
- package/build/src/matchers/component/{toHaveWarningEx.js → toHaveError.js} +3 -3
- package/build/src/matchers/component/toHaveHref.d.ts +3 -0
- package/build/src/matchers/component/{toHaveHrefEx.js → toHaveHref.js} +2 -2
- package/build/src/matchers/component/toHaveItems.d.ts +3 -0
- package/build/src/matchers/component/{toHaveItemsEx.js → toHaveItems.js} +4 -4
- package/build/src/matchers/component/{toHaveActivePageEx.d.ts → toHavePageCount.d.ts} +1 -1
- package/build/src/matchers/component/{toHavePageCountEx.js → toHavePageCount.js} +2 -2
- package/build/src/matchers/component/toHaveValueEx.d.ts +1 -1
- package/build/src/matchers/component/toHaveValueEx.js +4 -5
- package/build/src/matchers/component/{toHaveErrorEx.d.ts → toHaveWarning.d.ts} +2 -2
- package/build/src/matchers/component/{toHaveErrorEx.js → toHaveWarning.js} +3 -3
- package/build/src/matchers/componentMatchers.d.ts +76 -76
- package/build/src/matchers/componentMatchers.js +56 -50
- package/build/src/matchers/createAsyncMatcher.d.ts +35 -10
- package/build/src/matchers/createAsyncMatcher.js +38 -13
- package/build/src/utils/toMatchMessage.d.ts +11 -0
- package/build/src/utils/toMatchMessage.js +11 -0
- package/package.json +1 -1
- package/build/src/matchers/component/toBeActiveEx.d.ts +0 -3
- package/build/src/matchers/component/toBeAutoEx.d.ts +0 -3
- package/build/src/matchers/component/toBeInactiveEx.d.ts +0 -3
- package/build/src/matchers/component/toBeUncheckedByIndexEx.d.ts +0 -3
- package/build/src/matchers/component/toBeUncheckedByTextEx.d.ts +0 -3
- package/build/src/matchers/component/toBeUncheckedByValueEx.d.ts +0 -3
- package/build/src/matchers/component/toBeUncheckedEx.d.ts +0 -3
- package/build/src/matchers/component/toContainItemEx.d.ts +0 -4
- package/build/src/matchers/component/toContainItemsEx.d.ts +0 -3
- package/build/src/matchers/component/toContainTabsEx.d.ts +0 -3
- package/build/src/matchers/component/toContainUploadedFilesEx.d.ts +0 -4
- package/build/src/matchers/component/toContainValueEx.d.ts +0 -3
- package/build/src/matchers/component/toHaveActiveTabEx.d.ts +0 -2
- package/build/src/matchers/component/toHaveHrefEx.d.ts +0 -3
- package/build/src/matchers/component/toHaveItemsEx.d.ts +0 -3
- package/build/src/matchers/component/toHaveWarningEx.d.ts +0 -3
- package/build/src/utils/is.d.ts +0 -3
- package/build/src/utils/is.js +0 -5
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toBeUncheckedByText = void 0;
|
|
40
40
|
var extensions_1 = require("../../extensions");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toBeUncheckedByText = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toBeUncheckedByText', function (component) { return component.rootLocator; }, function (_a, text_1, options_1) { return __awaiter(void 0, [_a, text_1, options_1], void 0, function (_b, text, options) {
|
|
43
43
|
var radio, expectation;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -48,7 +48,7 @@ exports.toBeUncheckedByTextEx = (0, createAsyncMatcher_1.createComponentAsyncMat
|
|
|
48
48
|
case 1:
|
|
49
49
|
radio = _c.sent();
|
|
50
50
|
expectation = isNot ? (0, extensions_1.expect)(radio).not : (0, extensions_1.expect)(radio);
|
|
51
|
-
return [4 /*yield*/, expectation.
|
|
51
|
+
return [4 /*yield*/, expectation.toBeUnchecked(options)];
|
|
52
52
|
case 2:
|
|
53
53
|
_c.sent();
|
|
54
54
|
return [2 /*return*/];
|
package/build/src/matchers/component/{toBeCheckedByValueEx.d.ts → toBeUncheckedByValue.d.ts}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RadioGroup } from '../../components';
|
|
2
|
-
import type { CheckedOptions } from '../../options
|
|
3
|
-
export declare const
|
|
2
|
+
import type { CheckedOptions } from '../../options';
|
|
3
|
+
export declare const toBeUncheckedByValue: (this: import("playwright/test").ExpectMatcherState, component: RadioGroup, args_0: string | RegExp, args_1?: CheckedOptions | undefined) => Promise<import("playwright/test").MatcherReturnType>;
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toBeUncheckedByValue = void 0;
|
|
40
40
|
var extensions_1 = require("../../extensions");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toBeUncheckedByValue = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toBeUncheckedByValue', function (component) { return component.rootLocator; }, function (_a, value_1, options_1) { return __awaiter(void 0, [_a, value_1, options_1], void 0, function (_b, value, options) {
|
|
43
43
|
var radio, expectation;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -48,7 +48,7 @@ exports.toBeUncheckedByValueEx = (0, createAsyncMatcher_1.createComponentAsyncMa
|
|
|
48
48
|
case 1:
|
|
49
49
|
radio = _c.sent();
|
|
50
50
|
expectation = isNot ? (0, extensions_1.expect)(radio).not : (0, extensions_1.expect)(radio);
|
|
51
|
-
return [4 /*yield*/, expectation.
|
|
51
|
+
return [4 /*yield*/, expectation.toBeUnchecked(options)];
|
|
52
52
|
case 2:
|
|
53
53
|
_c.sent();
|
|
54
54
|
return [2 /*return*/];
|
|
@@ -38,7 +38,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.toBeVisibleEx = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
|
-
var is_1 = require("../../utils/is");
|
|
42
41
|
var components_1 = require("../../components");
|
|
43
42
|
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
44
43
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
@@ -51,7 +50,7 @@ exports.toBeVisibleEx = (0, createAsyncMatcher_1.createAsyncMatcher)('toBeVisibl
|
|
|
51
50
|
expectation = isNot ? (0, test_1.expect)(locator).not : (0, test_1.expect)(locator);
|
|
52
51
|
_c = true;
|
|
53
52
|
switch (_c) {
|
|
54
|
-
case
|
|
53
|
+
case component instanceof components_1.Portal: return [3 /*break*/, 1];
|
|
55
54
|
}
|
|
56
55
|
return [3 /*break*/, 3];
|
|
57
56
|
case 1: return [4 /*yield*/, expectation.toHaveCount(1, options)];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MenuComponent } from '../../components';
|
|
2
|
+
import type { TextOptions } from '../../options';
|
|
3
|
+
import type { ToContainItemElementLocator } from './LocatorSymbols';
|
|
4
|
+
export declare const toContainItem: (this: import("@playwright/test").ExpectMatcherState, component: MenuComponent & ToContainItemElementLocator, args_0: string, args_1?: TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,11 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toContainItem = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
|
-
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
42
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
43
|
-
exports.
|
|
42
|
+
exports.toContainItem = (0, createAsyncMatcher_1.createAsyncMatcher)('toContainItem', function (component) { return component.rootLocator; }, function (_a, itemText_1, options_1) { return __awaiter(void 0, [_a, itemText_1, options_1], void 0, function (_b, itemText, options) {
|
|
44
43
|
var expectation;
|
|
45
44
|
var isNot = _b.isNot, component = _b.component;
|
|
46
45
|
return __generator(this, function (_c) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ToHaveItemsElementLocator } from './LocatorSymbols';
|
|
2
|
+
import type { TextOptions } from '../../options';
|
|
3
|
+
export declare const toContainItems: (this: import("@playwright/test").ExpectMatcherState, component: ToHaveItemsElementLocator, args_0: string[], args_1?: TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,11 +36,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toContainItems = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
42
42
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
43
|
-
exports.
|
|
43
|
+
exports.toContainItems = (0, createAsyncMatcher_1.createAsyncMatcher)('toContainItems', function (component) { return component[LocatorSymbols_1.toItemsElementLocator](); }, function (_a, itemsText_1, options_1) { return __awaiter(void 0, [_a, itemsText_1, options_1], void 0, function (_b, itemsText, options) {
|
|
44
44
|
var isNot = _b.isNot, locator = _b.locator;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
46
46
|
switch (_c.label) {
|
|
@@ -48,11 +48,11 @@ exports.toContainItemsEx = (0, createAsyncMatcher_1.createAsyncMatcher)('toConta
|
|
|
48
48
|
if (isNot) {
|
|
49
49
|
/** NOTE:
|
|
50
50
|
* Пример: в items лежит массив ['1', '2', '3']
|
|
51
|
-
* При проверке await expect(combobox).not.
|
|
51
|
+
* При проверке await expect(combobox).not.toContainItems(['1']); проверка пройдет.
|
|
52
52
|
* Потому что действительно, такого массива нету в items, есть массив ['1', '2', '3'], но должен быть массив ['1']
|
|
53
53
|
* Поэтому нельзя использовать not assertion
|
|
54
54
|
*/
|
|
55
|
-
throw new Error('not implemented
|
|
55
|
+
throw new Error('not implemented toContainItems not assertion');
|
|
56
56
|
}
|
|
57
57
|
return [4 /*yield*/, (0, test_1.expect)(locator).toContainText(itemsText, options)];
|
|
58
58
|
case 1:
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TextOptions } from '../../options';
|
|
2
|
+
import type { Select } from '../../components';
|
|
3
|
+
export declare const toContainSelectValue: (this: import("@playwright/test").ExpectMatcherState, component: Select, args_0: string | RegExp | readonly (string | RegExp)[], args_1?: TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toContainSelectValue = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toContainSelectValue = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toContainSelectValue', function (component) { return component.buttonOrLinkLocator; }, function (_a, value_1, options_1) { return __awaiter(void 0, [_a, value_1, options_1], void 0, function (_b, value, options) {
|
|
43
43
|
var expectation;
|
|
44
44
|
var isNot = _b.isNot, locator = _b.locator;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Tabs } from '../../components';
|
|
2
|
+
import type { TextOptions } from '../../options';
|
|
3
|
+
export declare const toContainTabs: (this: import("@playwright/test").ExpectMatcherState, component: Tabs, args_0: string[], args_1?: TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toContainTabs = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toContainTabs = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toContainTabs', function (component) { return component.rootLocator; }, function (_a, expectedTabs_1, options_1) { return __awaiter(void 0, [_a, expectedTabs_1, options_1], void 0, function (_b, expectedTabs, options) {
|
|
43
43
|
var expectation;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TokenInput } from '../../components';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const toContainTokens: (this: import("@playwright/test").ExpectMatcherState, component: TokenInput, args_0: string[], args_1?: {
|
|
3
3
|
timeout?: number;
|
|
4
4
|
} | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toContainTokens = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toContainTokens = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toContainTokens', function (component) { return component.rootLocator; }, function (_a, expectedTokens_1, options_1) { return __awaiter(void 0, [_a, expectedTokens_1, options_1], void 0, function (_b, expectedTokens, options) {
|
|
43
43
|
var expectation;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FileUploader } from '../../components';
|
|
2
|
+
export declare const toContainUploadedFiles: (this: import("@playwright/test").ExpectMatcherState, component: FileUploader, args_0: string[], args_1?: {
|
|
3
|
+
timeout?: number;
|
|
4
|
+
} | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
package/build/src/matchers/component/{toContainUploadedFilesEx.js → toContainUploadedFiles.js}
RENAMED
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toContainUploadedFiles = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toContainUploadedFiles = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toContainUploadedFiles', function (component) { return component.files.itemsLocator; }, function (_a, expectedFiles_1, options_1) { return __awaiter(void 0, [_a, expectedFiles_1, options_1], void 0, function (_b, expectedFiles, options) {
|
|
43
43
|
var expectedLower, expectation;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Paging } from '../../components';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const toHaveActivePage: (this: import("@playwright/test").ExpectMatcherState, component: Paging, args_0: number, args_1?: {
|
|
3
3
|
timeout?: number;
|
|
4
4
|
} | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,11 +36,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHaveActivePage = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var constants_1 = require("../../utils/constants");
|
|
42
42
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
43
|
-
exports.
|
|
43
|
+
exports.toHaveActivePage = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toHaveActivePage', function (component) { return component.rootLocator; }, function (_a, expectedPageNumber_1, options_1) { return __awaiter(void 0, [_a, expectedPageNumber_1, options_1], void 0, function (_b, expectedPageNumber, options) {
|
|
44
44
|
var expectation;
|
|
45
45
|
var isNot = _b.isNot, component = _b.component;
|
|
46
46
|
return __generator(this, function (_c) {
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHaveActiveTab = void 0;
|
|
40
40
|
var extensions_1 = require("../../extensions");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toHaveActiveTab = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toHaveActiveTab', function (component) { return component.rootLocator; }, function (_a, expectedTabText_1) { return __awaiter(void 0, [_a, expectedTabText_1], void 0, function (_b, expectedTabText) {
|
|
43
43
|
var tab;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -48,11 +48,11 @@ exports.toHaveActiveTabEx = (0, createAsyncMatcher_1.createComponentAsyncMatcher
|
|
|
48
48
|
case 1:
|
|
49
49
|
tab = _c.sent();
|
|
50
50
|
if (!isNot) return [3 /*break*/, 3];
|
|
51
|
-
return [4 /*yield*/, (0, extensions_1.expect)(tab).
|
|
51
|
+
return [4 /*yield*/, (0, extensions_1.expect)(tab).toBeInactiveTab()];
|
|
52
52
|
case 2:
|
|
53
53
|
_c.sent();
|
|
54
54
|
return [3 /*break*/, 5];
|
|
55
|
-
case 3: return [4 /*yield*/, (0, extensions_1.expect)(tab).
|
|
55
|
+
case 3: return [4 /*yield*/, (0, extensions_1.expect)(tab).toBeActiveTab()];
|
|
56
56
|
case 4:
|
|
57
57
|
_c.sent();
|
|
58
58
|
_c.label = 5;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RootSymbolLocator } from './LocatorSymbols';
|
|
2
|
+
import type { AttributeOptions } from '../../options';
|
|
3
|
+
export declare const toHaveError: (this: import("@playwright/test").ExpectMatcherState, component: RootSymbolLocator, args_0?: AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,19 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHaveError = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var constants_1 = require("../../utils/constants");
|
|
42
42
|
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
43
43
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
44
|
-
exports.
|
|
44
|
+
exports.toHaveError = (0, createAsyncMatcher_1.createAsyncMatcher)('toHaveError', function (component) { return component[LocatorSymbols_1.toRootElementLocator](); }, function (_a, options_1) { return __awaiter(void 0, [_a, options_1], void 0, function (_b, options) {
|
|
45
45
|
var expectation;
|
|
46
46
|
var isNot = _b.isNot, locator = _b.locator;
|
|
47
47
|
return __generator(this, function (_c) {
|
|
48
48
|
switch (_c.label) {
|
|
49
49
|
case 0:
|
|
50
50
|
expectation = isNot ? (0, test_1.expect)(locator).not : (0, test_1.expect)(locator);
|
|
51
|
-
return [4 /*yield*/, expectation.toHaveAttribute(constants_1.DataVisualState.
|
|
51
|
+
return [4 /*yield*/, expectation.toHaveAttribute(constants_1.DataVisualState.Error, options)];
|
|
52
52
|
case 1:
|
|
53
53
|
_c.sent();
|
|
54
54
|
return [2 /*return*/];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AttributeOptions } from '../../options';
|
|
2
|
+
import type { Link } from '../../components';
|
|
3
|
+
export declare const toHaveHref: (this: import("@playwright/test").ExpectMatcherState, component: Link, args_0: string | RegExp, args_1?: AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHaveHref = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toHaveHref = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toHaveHref', function (component) { return component.rootLocator; }, function (_a, href_1, options_1) { return __awaiter(void 0, [_a, href_1, options_1], void 0, function (_b, href, options) {
|
|
43
43
|
var expectation;
|
|
44
44
|
var isNot = _b.isNot, locator = _b.locator;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ToHaveItemsElementLocator } from './LocatorSymbols';
|
|
2
|
+
import type { TextOptions } from '../../options';
|
|
3
|
+
export declare const toHaveItems: (this: import("@playwright/test").ExpectMatcherState, component: ToHaveItemsElementLocator, args_0: string[], args_1?: TextOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,11 +36,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHaveItems = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
42
42
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
43
|
-
exports.
|
|
43
|
+
exports.toHaveItems = (0, createAsyncMatcher_1.createAsyncMatcher)('toHaveItems', function (component) { return component[LocatorSymbols_1.toItemsElementLocator](); }, function (_a, itemsText_1, options_1) { return __awaiter(void 0, [_a, itemsText_1, options_1], void 0, function (_b, itemsText, options) {
|
|
44
44
|
var isNot = _b.isNot, locator = _b.locator;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
46
46
|
switch (_c.label) {
|
|
@@ -48,11 +48,11 @@ exports.toHaveItemsEx = (0, createAsyncMatcher_1.createAsyncMatcher)('toHaveItem
|
|
|
48
48
|
if (isNot) {
|
|
49
49
|
/** NOTE:
|
|
50
50
|
* Пример: в items лежит массив ['1', '2', '3']
|
|
51
|
-
* При проверке await expect(combobox).not.
|
|
51
|
+
* При проверке await expect(combobox).not.toHaveItems(['1']); проверка пройдет.
|
|
52
52
|
* Потому что действительно, такого массива нету в items, есть массив ['1', '2', '3'], но должен быть массив ['1']
|
|
53
53
|
* Поэтому нельзя использовать not assertion
|
|
54
54
|
*/
|
|
55
|
-
throw new Error('not implemented
|
|
55
|
+
throw new Error('not implemented toHaveItems not assertion');
|
|
56
56
|
}
|
|
57
57
|
return [4 /*yield*/, (0, test_1.expect)(locator).toHaveText(itemsText, options)];
|
|
58
58
|
case 1:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Paging } from '../../components';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const toHavePageCount: (this: import("@playwright/test").ExpectMatcherState, component: Paging, args_0: number, args_1?: {
|
|
3
3
|
timeout?: number;
|
|
4
4
|
} | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,10 +36,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHavePageCount = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
42
|
-
exports.
|
|
42
|
+
exports.toHavePageCount = (0, createAsyncMatcher_1.createComponentAsyncMatcher)('toHavePageCount', function (component) { return component.rootLocator; }, function (_a, expectedCount_1, options_1) { return __awaiter(void 0, [_a, expectedCount_1, options_1], void 0, function (_b, expectedCount, options) {
|
|
43
43
|
var expectation;
|
|
44
44
|
var isNot = _b.isNot, component = _b.component;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ValueOptions } from '../../options
|
|
1
|
+
import type { ValueOptions } from '../../options';
|
|
2
2
|
import type { ToWithValueElementLocator } from './LocatorSymbols';
|
|
3
3
|
export declare const toHaveValueEx: (this: import("@playwright/test").ExpectMatcherState, component: ToWithValueElementLocator, args_0: string | number | RegExp | readonly (string | RegExp)[] | {
|
|
4
4
|
start?: string;
|
|
@@ -39,7 +39,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.toHaveValueEx = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var components_1 = require("../../components");
|
|
42
|
-
var is_1 = require("../../utils/is");
|
|
43
42
|
var extensions_1 = require("../../extensions");
|
|
44
43
|
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
45
44
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
@@ -52,10 +51,10 @@ exports.toHaveValueEx = (0, createAsyncMatcher_1.createAsyncMatcher)('toHaveValu
|
|
|
52
51
|
expectation = isNot ? (0, test_1.expect)(locator).not : (0, test_1.expect)(locator);
|
|
53
52
|
_c = true;
|
|
54
53
|
switch (_c) {
|
|
55
|
-
case
|
|
56
|
-
case
|
|
57
|
-
case
|
|
58
|
-
case
|
|
54
|
+
case component instanceof components_1.Select: return [3 /*break*/, 1];
|
|
55
|
+
case component instanceof components_1.CurrencyInput: return [3 /*break*/, 3];
|
|
56
|
+
case component instanceof components_1.ComboBox: return [3 /*break*/, 5];
|
|
57
|
+
case component instanceof components_1.DateRangePicker: return [3 /*break*/, 7];
|
|
59
58
|
}
|
|
60
59
|
return [3 /*break*/, 9];
|
|
61
60
|
case 1: return [4 /*yield*/, checkSelect(isNot, locator, expected, options)];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { RootSymbolLocator } from './LocatorSymbols';
|
|
2
1
|
import type { AttributeOptions } from '../../options';
|
|
3
|
-
|
|
2
|
+
import type { RootSymbolLocator } from './LocatorSymbols';
|
|
3
|
+
export declare const toHaveWarning: (this: import("@playwright/test").ExpectMatcherState, component: RootSymbolLocator, args_0?: AttributeOptions | undefined) => Promise<import("@playwright/test").MatcherReturnType>;
|
|
@@ -36,19 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.toHaveWarning = void 0;
|
|
40
40
|
var test_1 = require("@playwright/test");
|
|
41
41
|
var constants_1 = require("../../utils/constants");
|
|
42
42
|
var LocatorSymbols_1 = require("./LocatorSymbols");
|
|
43
43
|
var createAsyncMatcher_1 = require("../createAsyncMatcher");
|
|
44
|
-
exports.
|
|
44
|
+
exports.toHaveWarning = (0, createAsyncMatcher_1.createAsyncMatcher)('toHaveWarning', function (component) { return component[LocatorSymbols_1.toRootElementLocator](); }, function (_a, options_1) { return __awaiter(void 0, [_a, options_1], void 0, function (_b, options) {
|
|
45
45
|
var expectation;
|
|
46
46
|
var isNot = _b.isNot, locator = _b.locator;
|
|
47
47
|
return __generator(this, function (_c) {
|
|
48
48
|
switch (_c.label) {
|
|
49
49
|
case 0:
|
|
50
50
|
expectation = isNot ? (0, test_1.expect)(locator).not : (0, test_1.expect)(locator);
|
|
51
|
-
return [4 /*yield*/, expectation.toHaveAttribute(constants_1.DataVisualState.
|
|
51
|
+
return [4 /*yield*/, expectation.toHaveAttribute(constants_1.DataVisualState.Warning, options)];
|
|
52
52
|
case 1:
|
|
53
53
|
_c.sent();
|
|
54
54
|
return [2 /*return*/];
|