@grafana/plugin-e2e 0.3.0-canary.623.aedff75.0 → 0.3.0
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/dist/api.d.ts
CHANGED
|
@@ -3,19 +3,7 @@ import { CreateDataSourceArgs, CreateDataSourcePageArgs, DataSource, ReadProvisi
|
|
|
3
3
|
import { PanelEditPage, GrafanaPage, DataSourceConfigPage, DashboardPage, VariableEditPage, AnnotationEditPage } from './models';
|
|
4
4
|
import { ExplorePage } from './models/ExplorePage';
|
|
5
5
|
export type PluginOptions = {
|
|
6
|
-
|
|
7
|
-
* When using the readProvisioning fixture, files will be read from this directory. If no directory is provided,
|
|
8
|
-
* the 'provisioning' directory in the current working directory will be used.
|
|
9
|
-
*
|
|
10
|
-
* eg.
|
|
11
|
-
* export default defineConfig({
|
|
12
|
-
use: {
|
|
13
|
-
provisioningRootDir: 'path/to/provisioning',
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
provisioningRootDir: string;
|
|
6
|
+
selectorRegistration: void;
|
|
19
7
|
};
|
|
20
8
|
export type PluginFixture = {
|
|
21
9
|
/**
|
|
@@ -127,7 +115,7 @@ export type PluginFixture = {
|
|
|
127
115
|
*/
|
|
128
116
|
isFeatureToggleEnabled<T = object>(featureToggle: keyof T): Promise<boolean>;
|
|
129
117
|
};
|
|
130
|
-
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PluginFixture, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions
|
|
118
|
+
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & PluginFixture & PluginOptions, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
|
|
131
119
|
export declare const expect: import("@playwright/test").Expect<{
|
|
132
120
|
toBeOK: (request: Promise<import("@playwright/test").Response>) => Promise<{
|
|
133
121
|
message: () => string;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const fs_1 = require("fs");
|
|
7
|
-
const path_1 =
|
|
4
|
+
const path_1 = require("path");
|
|
8
5
|
const yaml_1 = require("yaml");
|
|
9
|
-
const readProvision = async ({
|
|
6
|
+
const readProvision = async ({}, use) => {
|
|
10
7
|
await use(async ({ filePath }) => {
|
|
11
|
-
const resolvedPath = path_1.
|
|
8
|
+
const resolvedPath = (0, path_1.resolve)(process.cwd(), 'provisioning', filePath);
|
|
12
9
|
const contents = await fs_1.promises.readFile(resolvedPath, 'utf8');
|
|
13
10
|
return (0, yaml_1.parse)(contents);
|
|
14
11
|
});
|
package/dist/fixtures/index.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare const _default: {
|
|
2
|
+
selectors: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: import("..").E2ESelectors) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
3
|
+
grafanaVersion: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: string) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
4
|
+
login: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: () => Promise<void>) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
5
|
+
createDataSourceConfigPage: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: (args: import("../types").CreateDataSourcePageArgs) => Promise<import("..").DataSourceConfigPage>) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
6
|
+
newDashboardPage: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: import("..").DashboardPage) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
7
|
+
panelEditPage: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: import("..").PanelEditPage) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
8
|
+
variableEditPage: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: import("..").VariableEditPage) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
9
|
+
annotationEditPage: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: import("..").AnnotationEditPage) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
10
|
+
explorePage: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: import("../models/ExplorePage").ExplorePage) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
11
|
+
createDataSource: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: (args: import("../types").CreateDataSourceArgs) => Promise<import("../types").DataSource<any>>) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
12
|
+
readProvision: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: <T = any>(args: import("../types").ReadProvisionArgs) => Promise<T>) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
13
|
+
isFeatureToggleEnabled: (args: import("..").PluginFixture & import("..").PluginOptions & import("playwright/test").PlaywrightTestArgs & import("playwright/test").PlaywrightTestOptions & import("playwright/test").PlaywrightWorkerArgs & import("playwright/test").PlaywrightWorkerOptions, use: (r: <T_1 = object>(featureToggle: keyof T_1) => Promise<boolean>) => Promise<void>, testInfo: import("playwright/test").TestInfo) => any;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
package/dist/fixtures/index.js
CHANGED
|
@@ -3,7 +3,6 @@ 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
|
-
const path_1 = __importDefault(require("path"));
|
|
7
6
|
const annotationEditPage_1 = __importDefault(require("./annotationEditPage"));
|
|
8
7
|
const grafanaVersion_1 = __importDefault(require("./grafanaVersion"));
|
|
9
8
|
const selectors_1 = __importDefault(require("./selectors"));
|
|
@@ -16,8 +15,7 @@ const newDashboardPage_1 = __importDefault(require("./newDashboardPage"));
|
|
|
16
15
|
const variableEditPage_1 = __importDefault(require("./variableEditPage"));
|
|
17
16
|
const explorePage_1 = __importDefault(require("./explorePage"));
|
|
18
17
|
const isFeatureToggleEnabled_1 = __importDefault(require("./isFeatureToggleEnabled"));
|
|
19
|
-
|
|
20
|
-
provisioningRootDir: [path_1.default.join(process.cwd(), 'provisioning'), { option: true, scope: 'worker' }],
|
|
18
|
+
exports.default = {
|
|
21
19
|
selectors: selectors_1.default,
|
|
22
20
|
grafanaVersion: grafanaVersion_1.default,
|
|
23
21
|
login: login_1.default,
|
|
@@ -31,4 +29,3 @@ const fixtures = {
|
|
|
31
29
|
readProvision: readProvision_1.default,
|
|
32
30
|
isFeatureToggleEnabled: isFeatureToggleEnabled_1.default,
|
|
33
31
|
};
|
|
34
|
-
exports.default = fixtures;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/plugin-e2e",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"semver": "^7.5.4",
|
|
45
45
|
"uuid": "^9.0.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "bd2acc5fd476cb92454939e071e30dffe05e25b0"
|
|
48
48
|
}
|