@grafana/plugin-e2e 0.10.2 → 0.10.3-canary.694.f97a4af.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.js +2 -1
- package/dist/fixtures/grafanaVersion.js +1 -1
- package/dist/fixtures/index.js +0 -3
- package/dist/models/DashboardPage.js +4 -4
- package/dist/models/DataSourceConfigPage.js +5 -5
- package/dist/models/PanelEditPage.js +1 -1
- package/dist/options/index.js +8 -0
- package/package.json +3 -3
- package/dist/api.d.ts +0 -177
- package/dist/e2e-selectors/index.d.ts +0 -2
- package/dist/e2e-selectors/resolver.d.ts +0 -10
- package/dist/e2e-selectors/resolver.test.d.ts +0 -1
- package/dist/e2e-selectors/types.d.ts +0 -174
- package/dist/e2e-selectors/versioned/apis.d.ts +0 -29
- package/dist/e2e-selectors/versioned/components.d.ts +0 -154
- package/dist/e2e-selectors/versioned/constants.d.ts +0 -1
- package/dist/e2e-selectors/versioned/index.d.ts +0 -2
- package/dist/e2e-selectors/versioned/pages.d.ts +0 -125
- package/dist/e2e-selectors/versioned/types.d.ts +0 -8
- package/dist/fixtures/annotationEditPage.d.ts +0 -7
- package/dist/fixtures/commands/createDataSource.d.ts +0 -8
- package/dist/fixtures/commands/createDataSourceConfigPage.d.ts +0 -8
- package/dist/fixtures/commands/login.d.ts +0 -6
- package/dist/fixtures/commands/readProvision.d.ts +0 -7
- package/dist/fixtures/explorePage.d.ts +0 -7
- package/dist/fixtures/grafanaVersion.d.ts +0 -6
- package/dist/fixtures/index.d.ts +0 -4
- package/dist/fixtures/isFeatureToggleEnabled.d.ts +0 -6
- package/dist/fixtures/newDashboardPage.d.ts +0 -7
- package/dist/fixtures/page.d.ts +0 -17
- package/dist/fixtures/panelEditPage.d.ts +0 -7
- package/dist/fixtures/scripts/overrideFeatureToggles.d.ts +0 -1
- package/dist/fixtures/selectors.d.ts +0 -7
- package/dist/fixtures/types.d.ts +0 -2
- package/dist/fixtures/variableEditPage.d.ts +0 -7
- package/dist/index.d.ts +0 -39
- package/dist/matchers/index.d.ts +0 -24
- package/dist/matchers/toBeOK.d.ts +0 -7
- package/dist/matchers/toDisplayPreviews.d.ts +0 -8
- package/dist/matchers/toHaveAlert.d.ts +0 -8
- package/dist/matchers/toHavePanelError.d.ts +0 -9
- package/dist/matchers/utils.d.ts +0 -1
- package/dist/models/AnnotationEditPage.d.ts +0 -18
- package/dist/models/AnnotationPage.d.ts +0 -16
- package/dist/models/DashboardPage.d.ts +0 -33
- package/dist/models/DataSourceConfigPage.d.ts +0 -23
- package/dist/models/DataSourcePicker.d.ts +0 -9
- package/dist/models/ExplorePage.d.ts +0 -21
- package/dist/models/GrafanaPage.d.ts +0 -43
- package/dist/models/PanelEditPage.d.ts +0 -57
- package/dist/models/TimeRange.d.ts +0 -9
- package/dist/models/VariableEditPage.d.ts +0 -26
- package/dist/models/VariablePage.d.ts +0 -16
- package/dist/models/index.d.ts +0 -8
- package/dist/selectorEngine.d.ts +0 -7
- package/dist/types.d.ts +0 -206
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
export declare const versionedComponents: {
|
|
2
|
-
TimePicker: {
|
|
3
|
-
openButton: {
|
|
4
|
-
'8.1.0': string;
|
|
5
|
-
"8.0.0": string;
|
|
6
|
-
};
|
|
7
|
-
fromField: {
|
|
8
|
-
'10.2.3': string;
|
|
9
|
-
"8.0.0": string;
|
|
10
|
-
};
|
|
11
|
-
toField: {
|
|
12
|
-
'10.2.3': string;
|
|
13
|
-
"8.0.0": string;
|
|
14
|
-
};
|
|
15
|
-
applyTimeRange: {
|
|
16
|
-
'8.1.0': string;
|
|
17
|
-
"8.0.0": string;
|
|
18
|
-
};
|
|
19
|
-
absoluteTimeRangeTitle: {
|
|
20
|
-
"8.0.0": string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
Panels: {
|
|
24
|
-
Panel: {
|
|
25
|
-
title: {
|
|
26
|
-
'8.1.2': (title: string) => string;
|
|
27
|
-
"8.0.0": (title: string) => string;
|
|
28
|
-
};
|
|
29
|
-
headerCornerInfo: {
|
|
30
|
-
"8.0.0": (mode: string) => string;
|
|
31
|
-
};
|
|
32
|
-
status: {
|
|
33
|
-
"10.2.0": (status: string) => string;
|
|
34
|
-
"8.0.0": (_: string) => string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
Visualization: {
|
|
38
|
-
Table: {
|
|
39
|
-
header: {
|
|
40
|
-
"8.0.0": string;
|
|
41
|
-
};
|
|
42
|
-
footer: {
|
|
43
|
-
"8.0.0": string;
|
|
44
|
-
};
|
|
45
|
-
body: {
|
|
46
|
-
'10.2.0': string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
PanelEditor: {
|
|
52
|
-
General: {
|
|
53
|
-
content: {
|
|
54
|
-
"8.0.0": string;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
applyButton: {
|
|
58
|
-
'9.2.0': string;
|
|
59
|
-
"8.0.0": string;
|
|
60
|
-
};
|
|
61
|
-
toggleVizPicker: {
|
|
62
|
-
'10.0.0': string;
|
|
63
|
-
"8.0.0": string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
RefreshPicker: {
|
|
67
|
-
runButtonV2: {
|
|
68
|
-
"8.3.0": string;
|
|
69
|
-
"8.0.0": string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
QueryEditorRows: {
|
|
73
|
-
rows: {
|
|
74
|
-
"8.0.0": string;
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
QueryEditorRow: {
|
|
78
|
-
title: {
|
|
79
|
-
"8.0.0": (refId: string) => string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
Alert: {
|
|
83
|
-
alertV2: {
|
|
84
|
-
'8.3.0': (severity: string) => string;
|
|
85
|
-
"8.0.0": (severity: string) => string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
PageToolbar: {
|
|
89
|
-
item: {
|
|
90
|
-
"8.0.0": (tooltip: string) => string;
|
|
91
|
-
};
|
|
92
|
-
shotMoreItems: {
|
|
93
|
-
"8.0.0": string;
|
|
94
|
-
};
|
|
95
|
-
itemButton: {
|
|
96
|
-
"9.5.0": (title: string) => string;
|
|
97
|
-
};
|
|
98
|
-
itemButtonTitle: {
|
|
99
|
-
'10.1.0': string;
|
|
100
|
-
"8.0.0": string;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
QueryEditorToolbarItem: {
|
|
104
|
-
button: {
|
|
105
|
-
"8.0.0": (title: string) => string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
OptionsGroup: {
|
|
109
|
-
group: {
|
|
110
|
-
"8.0.0": (title?: string) => string;
|
|
111
|
-
};
|
|
112
|
-
toggle: {
|
|
113
|
-
"8.0.0": (title?: string) => string;
|
|
114
|
-
};
|
|
115
|
-
groupTitle: {
|
|
116
|
-
"8.0.0": string;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
PluginVisualization: {
|
|
120
|
-
item: {
|
|
121
|
-
"8.0.0": (title: string) => string;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
Select: {
|
|
125
|
-
option: {
|
|
126
|
-
"8.0.0": string;
|
|
127
|
-
};
|
|
128
|
-
input: {
|
|
129
|
-
'8.3.0': () => string;
|
|
130
|
-
"8.0.0": () => string;
|
|
131
|
-
};
|
|
132
|
-
singleValue: {
|
|
133
|
-
"8.0.0": () => string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
DataSourcePicker: {
|
|
137
|
-
container: {
|
|
138
|
-
'10.0.0': string;
|
|
139
|
-
'8.3.0': string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
TimeZonePicker: {
|
|
143
|
-
containerV2: {
|
|
144
|
-
'8.3.0': string;
|
|
145
|
-
"8.0.0": string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
CodeEditor: {
|
|
149
|
-
container: {
|
|
150
|
-
'10.2.3': string;
|
|
151
|
-
"8.0.0": string;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MIN_GRAFANA_VERSION = "8.0.0";
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
export declare const versionedPages: {
|
|
2
|
-
Home: {
|
|
3
|
-
url: {
|
|
4
|
-
"8.0.0": string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
DataSource: {
|
|
8
|
-
saveAndTest: {
|
|
9
|
-
'10.0.0': string;
|
|
10
|
-
"8.0.0": string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
EditDataSource: {
|
|
14
|
-
url: {
|
|
15
|
-
'10.2.0': (dataSourceUid: string) => string;
|
|
16
|
-
"8.0.0": (dataSourceUid: string) => string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
AddDashboard: {
|
|
20
|
-
url: {
|
|
21
|
-
"8.0.0": string;
|
|
22
|
-
};
|
|
23
|
-
itemButton: {
|
|
24
|
-
'9.5.0': (title: string) => string;
|
|
25
|
-
};
|
|
26
|
-
addNewPanel: {
|
|
27
|
-
"8.0.0": string;
|
|
28
|
-
};
|
|
29
|
-
itemButtonAddViz: {
|
|
30
|
-
"8.0.0": string;
|
|
31
|
-
};
|
|
32
|
-
Settings: {
|
|
33
|
-
Annotations: {
|
|
34
|
-
List: {
|
|
35
|
-
url: {
|
|
36
|
-
"8.0.0": string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
Edit: {
|
|
40
|
-
url: {
|
|
41
|
-
"8.0.0": (annotationIndex: string) => string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
Variables: {
|
|
46
|
-
List: {
|
|
47
|
-
url: {
|
|
48
|
-
"8.0.0": string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
Edit: {
|
|
52
|
-
url: {
|
|
53
|
-
"8.0.0": (annotationIndex: string) => string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
Dashboard: {
|
|
60
|
-
url: {
|
|
61
|
-
"8.0.0": (uid: string) => string;
|
|
62
|
-
};
|
|
63
|
-
Settings: {
|
|
64
|
-
Annotations: {
|
|
65
|
-
Edit: {
|
|
66
|
-
url: {
|
|
67
|
-
"8.0.0": (dashboardUid: string, annotationIndex: string) => string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
List: {
|
|
71
|
-
url: {
|
|
72
|
-
"8.0.0": (dashboardUid: string) => string;
|
|
73
|
-
};
|
|
74
|
-
addAnnotationCTA: string;
|
|
75
|
-
addAnnotationCTAV2: {
|
|
76
|
-
'8.3.0': string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
Variables: {
|
|
81
|
-
List: {
|
|
82
|
-
url: {
|
|
83
|
-
"8.0.0": (dashboardUid: string) => string;
|
|
84
|
-
};
|
|
85
|
-
newButton: {
|
|
86
|
-
"8.0.0": string;
|
|
87
|
-
};
|
|
88
|
-
table: {
|
|
89
|
-
"8.0.0": string;
|
|
90
|
-
};
|
|
91
|
-
addVariableCTAV2: {
|
|
92
|
-
"8.0.0": (name: string) => string;
|
|
93
|
-
};
|
|
94
|
-
addVariableCTAV2Item: {
|
|
95
|
-
"8.0.0": string;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
Edit: {
|
|
99
|
-
url: {
|
|
100
|
-
"8.0.0": (dashboardUid: string, editIndex: string) => string;
|
|
101
|
-
};
|
|
102
|
-
General: {
|
|
103
|
-
generalTypeSelectV2: {
|
|
104
|
-
'8.5.0': string;
|
|
105
|
-
"8.0.0": string;
|
|
106
|
-
};
|
|
107
|
-
previewOfValuesOption: {
|
|
108
|
-
'10.4.0': string;
|
|
109
|
-
"8.0.0": string;
|
|
110
|
-
};
|
|
111
|
-
submitButton: {
|
|
112
|
-
'10.4.0': string;
|
|
113
|
-
"8.0.0": string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
Explore: {
|
|
121
|
-
url: {
|
|
122
|
-
"8.0.0": string;
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { versionedAPIs } from './apis';
|
|
2
|
-
import { versionedComponents } from './components';
|
|
3
|
-
import { versionedPages } from './pages';
|
|
4
|
-
export type VersionedSelectors = {
|
|
5
|
-
pages: typeof versionedPages;
|
|
6
|
-
components: typeof versionedComponents;
|
|
7
|
-
apis: typeof versionedAPIs;
|
|
8
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { AnnotationEditPage } from '../models';
|
|
4
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
5
|
-
type AnnotationEditPageFixture = TestFixture<AnnotationEditPage, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const annotationEditPage: AnnotationEditPageFixture;
|
|
7
|
-
export default annotationEditPage;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { APIRequestContext, TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../../api';
|
|
3
|
-
import { CreateDataSourceArgs, DataSource } from '../../types';
|
|
4
|
-
import { PlaywrightCombinedArgs } from '../types';
|
|
5
|
-
type CreateDataSourceViaAPIFixture = TestFixture<(args: CreateDataSourceArgs) => Promise<DataSource>, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
export declare const createDataSourceViaAPI: (request: APIRequestContext, datasource: DataSource) => Promise<DataSource>;
|
|
7
|
-
declare const createDataSource: CreateDataSourceViaAPIFixture;
|
|
8
|
-
export default createDataSource;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../../api';
|
|
3
|
-
import { CreateDataSourcePageArgs } from '../../types';
|
|
4
|
-
import { PlaywrightCombinedArgs } from '../types';
|
|
5
|
-
import { DataSourceConfigPage } from '../../models';
|
|
6
|
-
type CreateDataSourceConfigPageFixture = TestFixture<(args: CreateDataSourcePageArgs) => Promise<DataSourceConfigPage>, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
7
|
-
declare const createDataSourceConfigPage: CreateDataSourceConfigPageFixture;
|
|
8
|
-
export default createDataSourceConfigPage;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../../api';
|
|
3
|
-
import { PlaywrightCombinedArgs } from '../types';
|
|
4
|
-
type LoginFixture = TestFixture<() => Promise<void>, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
5
|
-
declare const login: LoginFixture;
|
|
6
|
-
export default login;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../../api';
|
|
3
|
-
import { ReadProvisionArgs } from '../../types';
|
|
4
|
-
import { PlaywrightCombinedArgs } from '../types';
|
|
5
|
-
type ReadProvisionFixture = TestFixture<(<T = any>(args: ReadProvisionArgs) => Promise<T>), PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const readProvision: ReadProvisionFixture;
|
|
7
|
-
export default readProvision;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { ExplorePage } from '../models/ExplorePage';
|
|
4
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
5
|
-
type ExplorePageFixture = TestFixture<ExplorePage, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const explorePage: ExplorePageFixture;
|
|
7
|
-
export default explorePage;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
4
|
-
type GrafanaVersion = TestFixture<string, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
5
|
-
declare const grafanaVersion: GrafanaVersion;
|
|
6
|
-
export default grafanaVersion;
|
package/dist/fixtures/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
4
|
-
type FeatureToggleFixture = TestFixture<(<T = object>(featureToggle: keyof T) => Promise<boolean>), PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
5
|
-
declare const isFeatureToggleEnabled: FeatureToggleFixture;
|
|
6
|
-
export default isFeatureToggleEnabled;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { DashboardPage } from '../models';
|
|
4
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
5
|
-
type NewDashboardPageFixture = TestFixture<DashboardPage, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const newDashboardPage: NewDashboardPageFixture;
|
|
7
|
-
export default newDashboardPage;
|
package/dist/fixtures/page.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TestFixture, Page } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
4
|
-
type PageFixture = TestFixture<Page, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
5
|
-
/**
|
|
6
|
-
* This fixture ensures the feature toggles defined in the Playwright config are being used in Grafana frontend.
|
|
7
|
-
* If Grafana version >= 10.1.0, feature toggles are read from to the 'grafana.featureToggles' key in the browser's localStorage.
|
|
8
|
-
* Otherwise, feature toggles are added directly to the window.grafanaBootData.settings.featureToggles object.
|
|
9
|
-
*
|
|
10
|
-
* page.addInitScript adds a script which would be evaluated in one of the following scenarios:
|
|
11
|
-
* - Whenever the page is navigated.
|
|
12
|
-
* - Whenever the child frame is attached or navigated. In this case, the script is evaluated in the context of the
|
|
13
|
-
* newly attached frame.
|
|
14
|
-
* The script is evaluated after the document was created but before any of its scripts were run.
|
|
15
|
-
*/
|
|
16
|
-
declare const page: PageFixture;
|
|
17
|
-
export default page;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { PanelEditPage } from '../models';
|
|
4
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
5
|
-
type PanelEditPageFixture = TestFixture<PanelEditPage, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const panelEditPage: PanelEditPageFixture;
|
|
7
|
-
export default panelEditPage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function overrideFeatureToggles(featureToggles: any): void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { E2ESelectors } from '../e2e-selectors';
|
|
4
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
5
|
-
type SelectorFixture = TestFixture<E2ESelectors, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const selectors: SelectorFixture;
|
|
7
|
-
export default selectors;
|
package/dist/fixtures/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TestFixture } from '@playwright/test';
|
|
2
|
-
import { PluginFixture, PluginOptions } from '../api';
|
|
3
|
-
import { VariableEditPage } from '../models';
|
|
4
|
-
import { PlaywrightCombinedArgs } from './types';
|
|
5
|
-
type VariableEditPageFixture = TestFixture<VariableEditPage, PluginFixture & PluginOptions & PlaywrightCombinedArgs>;
|
|
6
|
-
declare const variableEditPage: VariableEditPageFixture;
|
|
7
|
-
export default variableEditPage;
|
package/dist/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { GrafanaPage, VariableEditPage } from './models';
|
|
2
|
-
import { AlertPageOptions, AlertVariant, ContainTextOptions, PanelError } from './types';
|
|
3
|
-
export { expect, test, type PluginFixture, type PluginOptions } from './api';
|
|
4
|
-
export * from './e2e-selectors';
|
|
5
|
-
export * from './fixtures';
|
|
6
|
-
export * from './models';
|
|
7
|
-
declare global {
|
|
8
|
-
interface Window {
|
|
9
|
-
grafanaBootData: {
|
|
10
|
-
settings: {
|
|
11
|
-
featureToggles: Record<string, boolean>;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
namespace PlaywrightTest {
|
|
16
|
-
const r: unique symbol;
|
|
17
|
-
const t: unique symbol;
|
|
18
|
-
interface Matchers<R, T> {
|
|
19
|
-
[r]: R;
|
|
20
|
-
[t]: T;
|
|
21
|
-
/**
|
|
22
|
-
* Await the response of a Playwright request and asserts the response was successful (status in the range 200-299).
|
|
23
|
-
*/
|
|
24
|
-
toBeOK(this: Matchers<unknown, Promise<Response>>): R;
|
|
25
|
-
/**
|
|
26
|
-
* Asserts that preview text elements are displayed on the Variable Edit Page. You should make sure any variable queries are completed before calling this matcher.
|
|
27
|
-
*/
|
|
28
|
-
toDisplayPreviews(this: Matchers<unknown, VariableEditPage>, previewTexts: Array<string | RegExp>, options: ContainTextOptions): R;
|
|
29
|
-
/**
|
|
30
|
-
* Asserts that a GrafanaPage contains an alert with the specified severity. Use the options to specify the timeout and to filter the alerts.
|
|
31
|
-
*/
|
|
32
|
-
toHaveAlert(this: Matchers<unknown, GrafanaPage>, severity: AlertVariant, options?: AlertPageOptions): R;
|
|
33
|
-
/**
|
|
34
|
-
* Asserts that the number of panel errors displayed on the page is equal to 1.
|
|
35
|
-
*/
|
|
36
|
-
toHavePanelError(this: Matchers<unknown, PanelError>): R;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
package/dist/matchers/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
toBeOK: (request: Promise<import("playwright-core").Response>) => Promise<{
|
|
3
|
-
message: () => string;
|
|
4
|
-
pass: boolean;
|
|
5
|
-
actual: number;
|
|
6
|
-
}>;
|
|
7
|
-
toHavePanelError: (panelError: import("../types").PanelError, options?: {
|
|
8
|
-
timeout?: number;
|
|
9
|
-
}) => Promise<{
|
|
10
|
-
message: () => any;
|
|
11
|
-
pass: boolean;
|
|
12
|
-
actual: number;
|
|
13
|
-
}>;
|
|
14
|
-
toDisplayPreviews: (variableEditPage: import("..").VariableEditPage, previewTexts: (string | RegExp)[], options?: import("../types").ContainTextOptions) => Promise<{
|
|
15
|
-
pass: boolean;
|
|
16
|
-
actual: boolean;
|
|
17
|
-
message: () => string;
|
|
18
|
-
}>;
|
|
19
|
-
toHaveAlert: (grafanaPage: import("..").GrafanaPage, severity: import("./toHaveAlert").AlertVariant, options?: import("../types").AlertPageOptions) => Promise<{
|
|
20
|
-
message: () => any;
|
|
21
|
-
pass: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
};
|
|
24
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { VariableEditPage } from '../models';
|
|
2
|
-
import { ContainTextOptions } from '../types';
|
|
3
|
-
declare const toDisplayPreviews: (variableEditPage: VariableEditPage, previewTexts: Array<string | RegExp>, options?: ContainTextOptions) => Promise<{
|
|
4
|
-
pass: boolean;
|
|
5
|
-
actual: boolean;
|
|
6
|
-
message: () => string;
|
|
7
|
-
}>;
|
|
8
|
-
export default toDisplayPreviews;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GrafanaPage } from '../models';
|
|
2
|
-
import { AlertPageOptions } from '../types';
|
|
3
|
-
export type AlertVariant = 'success' | 'warning' | 'error' | 'info';
|
|
4
|
-
declare const toHaveAlert: (grafanaPage: GrafanaPage, severity: AlertVariant, options?: AlertPageOptions) => Promise<{
|
|
5
|
-
message: () => any;
|
|
6
|
-
pass: boolean;
|
|
7
|
-
}>;
|
|
8
|
-
export default toHaveAlert;
|
package/dist/matchers/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getMessage: (expected: string, received: string) => string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DataSourcePicker } from './DataSourcePicker';
|
|
2
|
-
import { DashboardEditViewArgs, NavigateOptions, PluginTestCtx, RequestOptions } from '../types';
|
|
3
|
-
import { GrafanaPage } from './GrafanaPage';
|
|
4
|
-
export declare class AnnotationEditPage extends GrafanaPage {
|
|
5
|
-
readonly ctx: PluginTestCtx;
|
|
6
|
-
readonly args: DashboardEditViewArgs<string>;
|
|
7
|
-
datasource: DataSourcePicker;
|
|
8
|
-
constructor(ctx: PluginTestCtx, args: DashboardEditViewArgs<string>);
|
|
9
|
-
/**
|
|
10
|
-
* Navigates to the annotation edit page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
|
|
11
|
-
*/
|
|
12
|
-
goto(options?: NavigateOptions): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Executes the annotation query defined in the annotation page and returns the response promise
|
|
15
|
-
* @param options - Optional. RequestOptions to pass to waitForResponse
|
|
16
|
-
*/
|
|
17
|
-
runQuery(options?: RequestOptions): Promise<import("playwright-core").Response>;
|
|
18
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DashboardPageArgs, NavigateOptions, PluginTestCtx } from '../types';
|
|
2
|
-
import { AnnotationEditPage } from './AnnotationEditPage';
|
|
3
|
-
import { GrafanaPage } from './GrafanaPage';
|
|
4
|
-
export declare class AnnotationPage extends GrafanaPage {
|
|
5
|
-
readonly ctx: PluginTestCtx;
|
|
6
|
-
readonly dashboard?: DashboardPageArgs;
|
|
7
|
-
constructor(ctx: PluginTestCtx, dashboard?: DashboardPageArgs);
|
|
8
|
-
/**
|
|
9
|
-
* Navigates to the annotation list page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
|
|
10
|
-
*/
|
|
11
|
-
goto(options?: NavigateOptions): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Clicks the add new annotation button and returns the annotation edit page
|
|
14
|
-
*/
|
|
15
|
-
clickAddNew(): Promise<AnnotationEditPage>;
|
|
16
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { DashboardPageArgs, NavigateOptions, PluginTestCtx } from '../types';
|
|
2
|
-
import { GrafanaPage } from './GrafanaPage';
|
|
3
|
-
import { PanelEditPage } from './PanelEditPage';
|
|
4
|
-
import { TimeRange } from './TimeRange';
|
|
5
|
-
export declare class DashboardPage extends GrafanaPage {
|
|
6
|
-
readonly ctx: PluginTestCtx;
|
|
7
|
-
readonly dashboard?: DashboardPageArgs;
|
|
8
|
-
dataSourcePicker: any;
|
|
9
|
-
timeRange: TimeRange;
|
|
10
|
-
constructor(ctx: PluginTestCtx, dashboard?: DashboardPageArgs);
|
|
11
|
-
/**
|
|
12
|
-
* Navigates to the dashboard page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
|
|
13
|
-
*/
|
|
14
|
-
goto(options?: NavigateOptions): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Navigates to the panel edit page for the given panel id
|
|
17
|
-
*
|
|
18
|
-
* If the panel id does not exist in the dashboard, Grafana will redirect to the dashboard page
|
|
19
|
-
*/
|
|
20
|
-
gotoPanelEditPage(panelId: string): Promise<PanelEditPage>;
|
|
21
|
-
/**
|
|
22
|
-
* Clicks the buttons to add a new panel and returns the panel edit page for the new panel
|
|
23
|
-
*/
|
|
24
|
-
addPanel(): Promise<PanelEditPage>;
|
|
25
|
-
/**
|
|
26
|
-
* Deletes the dashboard
|
|
27
|
-
*/
|
|
28
|
-
deleteDashboard(): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Clicks the run button in the refresh picker to refresh the dashboard
|
|
31
|
-
*/
|
|
32
|
-
refreshDashboard(): Promise<void>;
|
|
33
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DataSource, NavigateOptions, PluginTestCtx, TriggerQueryOptions } from '../types';
|
|
2
|
-
import { GrafanaPage } from './GrafanaPage';
|
|
3
|
-
export declare class DataSourceConfigPage extends GrafanaPage {
|
|
4
|
-
private datasource;
|
|
5
|
-
constructor(ctx: PluginTestCtx, datasource: DataSource);
|
|
6
|
-
deleteDataSource(): Promise<void>;
|
|
7
|
-
/**
|
|
8
|
-
* Navigates to the datasource edit page for an existing datasource
|
|
9
|
-
*/
|
|
10
|
-
goto(options?: NavigateOptions): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Mocks the response of the datasource health check call
|
|
13
|
-
* @param json the json response to return
|
|
14
|
-
* @param status the HTTP status code to return. Defaults to 200
|
|
15
|
-
*/
|
|
16
|
-
mockHealthCheckResponse<T = any>(json: T, status?: number): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Clicks the save and test button and waits for the response
|
|
19
|
-
*
|
|
20
|
-
* Optionally, you can skip waiting for the response by passing in { skipWaitForResponse: true } as the options parameter
|
|
21
|
-
*/
|
|
22
|
-
saveAndTest(options?: TriggerQueryOptions): Promise<void | import("playwright-core").Response>;
|
|
23
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PluginTestCtx } from '../types';
|
|
2
|
-
import { GrafanaPage } from './GrafanaPage';
|
|
3
|
-
export declare class DataSourcePicker extends GrafanaPage {
|
|
4
|
-
constructor(ctx: PluginTestCtx);
|
|
5
|
-
/**
|
|
6
|
-
* Sets the data source picker to the provided name
|
|
7
|
-
*/
|
|
8
|
-
set(name: string): Promise<void>;
|
|
9
|
-
}
|