@grafana/plugin-e2e 0.5.0 → 0.6.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.
@@ -3,12 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.versionedComponents = void 0;
4
4
  const constants_1 = require("./constants");
5
5
  exports.versionedComponents = {
6
- Breadcrumbs: {
7
- breadcrumb: {
8
- // did not exist prior to 9.4.0
9
- '9.4.0': (title) => `data-testid ${title} breadcrumb`,
10
- },
11
- },
12
6
  TimePicker: {
13
7
  openButton: {
14
8
  '8.1.0': 'data-testid TimePicker Open Button',
@@ -22,315 +16,98 @@ exports.versionedComponents = {
22
16
  '10.2.3': 'data-testid Time Range to field',
23
17
  [constants_1.MIN_GRAFANA_VERSION]: 'Time Range to field',
24
18
  },
25
- applyTimeRange: 'data-testid TimePicker submit button',
26
- calendar: {
27
- label: 'Time Range calendar',
28
- openButton: 'Open time range calendar',
29
- closeButton: 'Close time range Calendar',
30
- },
31
- absoluteTimeRangeTitle: 'data-testid-absolute-time-range-narrow',
32
- },
33
- DataSourcePermissions: {
34
- form: () => 'form[name="addPermission"]',
35
- roleType: 'Role to add new permission to',
36
- rolePicker: 'Built-in role picker',
37
- permissionLevel: 'Permission Level',
38
- },
39
- DataSource: {
40
- TestData: {
41
- QueryTab: {
42
- scenarioSelectContainer: 'Test Data Query scenario select container',
43
- scenarioSelect: 'Test Data Query scenario select',
44
- max: 'TestData max',
45
- min: 'TestData min',
46
- noise: 'TestData noise',
47
- seriesCount: 'TestData series count',
48
- spread: 'TestData spread',
49
- startValue: 'TestData start value',
50
- drop: 'TestData drop values',
51
- },
19
+ applyTimeRange: {
20
+ '8.1.0': 'data-testid TimePicker submit button',
21
+ [constants_1.MIN_GRAFANA_VERSION]: 'TimePicker submit button',
52
22
  },
53
- DataSourceHttpSettings: {
54
- urlInput: 'Datasource HTTP settings url',
55
- },
56
- Jaeger: {
57
- traceIDInput: 'Trace ID',
58
- },
59
- Prometheus: {
60
- configPage: {
61
- connectionSettings: 'Data source connection URL',
62
- exemplarsAddButton: 'Add exemplar config button',
63
- internalLinkSwitch: 'Internal link switch',
64
- },
65
- exemplarMarker: 'Exemplar marker',
66
- },
67
- },
68
- Menu: {
69
- MenuComponent: (title) => `${title} menu`,
70
- MenuGroup: (title) => `${title} menu group`,
71
- MenuItem: (title) => `${title} menu item`,
72
- SubMenu: {
73
- container: 'SubMenu container',
74
- icon: 'SubMenu icon',
23
+ absoluteTimeRangeTitle: {
24
+ [constants_1.MIN_GRAFANA_VERSION]: 'data-testid-absolute-time-range-narrow',
75
25
  },
76
26
  },
77
27
  Panels: {
78
28
  Panel: {
79
- title: (title) => `data-testid Panel header ${title}`,
80
- headerItems: (item) => `data-testid Panel header item ${item}`,
81
- menuItems: (item) => `data-testid Panel menu item ${item}`,
82
- menu: (title) => `data-testid Panel menu ${title}`,
83
- containerByTitle: (title) => `${title} panel`,
84
- headerCornerInfo: (mode) => `Panel header ${mode}`,
29
+ headerCornerInfo: {
30
+ [constants_1.MIN_GRAFANA_VERSION]: (mode) => `Panel header ${mode}`,
31
+ },
85
32
  status: {
86
33
  ['10.2.0']: (status) => `data-testid Panel status ${status}`,
87
34
  [constants_1.MIN_GRAFANA_VERSION]: (_) => 'Panel status',
88
35
  },
89
- loadingBar: () => `Panel loading bar`,
90
- HoverWidget: {
91
- container: 'data-testid hover-header-container',
92
- dragIcon: 'data-testid drag-icon',
93
- },
94
- },
95
- Visualization: {
96
- Graph: {
97
- container: 'Graph container',
98
- VisualizationTab: {
99
- legendSection: 'Legend section',
100
- },
101
- Legend: {
102
- legendItemAlias: (name) => `gpl alias ${name}`,
103
- showLegendSwitch: 'gpl show legend',
104
- },
105
- xAxis: {
106
- labels: () => 'div.flot-x-axis > div.flot-tick-label',
107
- },
108
- },
109
- BarGauge: {
110
- /**
111
- * @deprecated use valueV2 from Grafana 8.3 instead
112
- */
113
- value: 'Bar gauge value',
114
- valueV2: 'data-testid Bar gauge value',
115
- },
116
- PieChart: {
117
- svgSlice: 'Pie Chart Slice',
118
- },
119
- Text: {
120
- container: () => '.markdown-html',
121
- },
122
- Table: {
123
- header: 'table header',
124
- footer: 'table-footer',
125
- body: {
126
- // did not exist prior to 10.2.0
127
- '10.2.0': 'data-testid table body',
128
- },
129
- },
130
- },
131
- },
132
- VizLegend: {
133
- seriesName: (name) => `VizLegend series ${name}`,
134
- },
135
- Drawer: {
136
- General: {
137
- title: (title) => `Drawer title ${title}`,
138
- expand: 'Drawer expand',
139
- contract: 'Drawer contract',
140
- close: 'Drawer close',
141
- rcContentWrapper: () => '.rc-drawer-content-wrapper',
142
36
  },
143
37
  },
144
38
  PanelEditor: {
145
39
  General: {
146
- content: 'Panel editor content',
147
- },
148
- OptionsPane: {
149
- content: 'Panel editor option pane content',
150
- select: 'Panel editor option pane select',
151
- fieldLabel: (type) => `${type} field property editor`,
40
+ content: {
41
+ [constants_1.MIN_GRAFANA_VERSION]: 'Panel editor content',
42
+ },
152
43
  },
153
- // not sure about the naming *DataPane*
154
- DataPane: {
155
- content: 'Panel editor data pane content',
44
+ applyButton: {
45
+ '9.2.0': 'data-testid Apply changes and go back to dashboard',
46
+ [constants_1.MIN_GRAFANA_VERSION]: 'Apply changes and go back to dashboard',
156
47
  },
157
- applyButton: 'data-testid Apply changes and go back to dashboard',
158
48
  toggleVizPicker: {
159
49
  '10.0.0': 'data-testid toggle-viz-picker',
160
50
  [constants_1.MIN_GRAFANA_VERSION]: 'toggle-viz-picker',
161
51
  },
162
- toggleVizOptions: 'data-testid toggle-viz-options',
163
- toggleTableView: 'toggle-table-view',
164
- // [Geomap] Map controls
165
- showZoomField: 'Map controls Show zoom control field property editor',
166
- showAttributionField: 'Map controls Show attribution field property editor',
167
- showScaleField: 'Map controls Show scale field property editor',
168
- showMeasureField: 'Map controls Show measure tools field property editor',
169
- showDebugField: 'Map controls Show debug field property editor',
170
- measureButton: 'show measure tools',
171
- },
172
- PanelInspector: {
173
- Data: {
174
- content: 'Panel inspector Data content',
175
- },
176
- Stats: {
177
- content: 'Panel inspector Stats content',
178
- },
179
- Json: {
180
- content: 'Panel inspector Json content',
181
- },
182
- Query: {
183
- content: 'Panel inspector Query content',
184
- refreshButton: 'Panel inspector Query refresh button',
185
- jsonObjectKeys: () => '.json-formatter-key',
186
- },
187
- },
188
- Tab: {
189
- title: (title) => `Tab ${title}`,
190
- active: () => '[class*="-activeTabStyle"]',
191
52
  },
192
53
  RefreshPicker: {
193
- /**
194
- * @deprecated use runButtonV2 from Grafana 8.3 instead
195
- */
196
- runButton: 'RefreshPicker run button',
197
- /**
198
- * @deprecated use intervalButtonV2 from Grafana 8.3 instead
199
- */
200
- intervalButton: 'RefreshPicker interval button',
201
- runButtonV2: 'data-testid RefreshPicker run button',
202
- intervalButtonV2: 'data-testid RefreshPicker interval button',
203
- },
204
- QueryTab: {
205
- content: 'Query editor tab content',
206
- queryInspectorButton: 'Query inspector button',
207
- queryHistoryButton: 'data-testid query-history-button',
208
- addQuery: 'data-testid query-tab-add-query',
209
- },
210
- QueryHistory: {
211
- queryText: 'Query text',
54
+ runButtonV2: {
55
+ ['8.3.0']: 'data-testid RefreshPicker run button',
56
+ [constants_1.MIN_GRAFANA_VERSION]: 'RefreshPicker run button',
57
+ },
212
58
  },
213
59
  QueryEditorRows: {
214
- rows: 'Query editor row',
60
+ rows: {
61
+ [constants_1.MIN_GRAFANA_VERSION]: 'Query editor row',
62
+ },
215
63
  },
216
64
  QueryEditorRow: {
217
- actionButton: (title) => `${title}`,
218
- title: (refId) => `Query editor row title ${refId}`,
219
- container: (refId) => `Query editor row ${refId}`,
220
- },
221
- AlertTab: {
222
- content: 'Alert editor tab content',
223
- },
224
- Alert: {
225
- /**
226
- * @deprecated use alertV2 from Grafana 8.3 instead
227
- */
228
- alert: (severity) => `Alert ${severity}`,
229
- alertV2: (severity) => `data-testid Alert ${severity}`,
230
- },
231
- TransformTab: {
232
- content: 'data-testid Transform editor tab content',
233
- newTransform: (name) => `data-testid New transform ${name}`,
234
- transformationEditor: (name) => `data-testid Transformation editor ${name}`,
235
- transformationEditorDebugger: (name) => `data-testid Transformation editor debugger ${name}`,
236
- },
237
- Transforms: {
238
- card: (name) => `data-testid New transform ${name}`,
239
- Reduce: {
240
- modeLabel: 'Transform mode label',
241
- calculationsLabel: 'Transform calculations label',
242
- },
243
- SpatialOperations: {
244
- actionLabel: 'root Action field property editor',
245
- locationLabel: 'root Location Mode field property editor',
246
- location: {
247
- autoOption: 'Auto location option',
248
- coords: {
249
- option: 'Coords location option',
250
- latitudeFieldLabel: 'root Latitude field field property editor',
251
- longitudeFieldLabel: 'root Longitude field field property editor',
252
- },
253
- geohash: {
254
- option: 'Geohash location option',
255
- geohashFieldLabel: 'root Geohash field field property editor',
256
- },
257
- lookup: {
258
- option: 'Lookup location option',
259
- lookupFieldLabel: 'root Lookup field field property editor',
260
- gazetteerFieldLabel: 'root Gazetteer field property editor',
261
- },
262
- },
65
+ title: {
66
+ [constants_1.MIN_GRAFANA_VERSION]: (refId) => `Query editor row title ${refId}`,
263
67
  },
264
- searchInput: 'search transformations',
265
- addTransformationButton: 'data-testid add transformation button',
266
68
  },
267
- NavBar: {
268
- Configuration: {
269
- button: 'Configuration',
270
- },
271
- Toggle: {
272
- button: 'Toggle menu',
273
- },
274
- Reporting: {
275
- button: 'Reporting',
69
+ Alert: {
70
+ alertV2: {
71
+ '8.3.0': (severity) => `data-testid Alert ${severity}`,
72
+ [constants_1.MIN_GRAFANA_VERSION]: (severity) => `Alert ${severity}`,
276
73
  },
277
74
  },
278
- NavMenu: {
279
- item: 'data-testid Nav menu item',
280
- },
281
- NavToolbar: {
282
- container: 'data-testid Nav toolbar',
283
- },
284
75
  PageToolbar: {
285
- container: () => '.page-toolbar',
286
- item: (tooltip) => `${tooltip}`,
76
+ item: {
77
+ [constants_1.MIN_GRAFANA_VERSION]: (tooltip) => `${tooltip}`,
78
+ },
287
79
  shotMoreItems: {
288
80
  [constants_1.MIN_GRAFANA_VERSION]: 'Show more items',
289
81
  },
290
- itemButton: (title) => `data-testid ${title}`,
82
+ itemButton: {
83
+ //did not exist prior to 9.5.0
84
+ ['9.5.0']: (title) => `data-testid ${title}`,
85
+ },
291
86
  itemButtonTitle: {
292
87
  '10.1.0': 'Add button',
293
88
  [constants_1.MIN_GRAFANA_VERSION]: 'Add panel button',
294
89
  },
295
90
  },
296
91
  QueryEditorToolbarItem: {
297
- button: (title) => `QueryEditor toolbar item button ${title}`,
298
- },
299
- BackButton: {
300
- backArrow: 'Go Back',
92
+ button: {
93
+ [constants_1.MIN_GRAFANA_VERSION]: (title) => `QueryEditor toolbar item button ${title}`,
94
+ },
301
95
  },
302
96
  OptionsGroup: {
303
- group: (title) => (title ? `Options group ${title}` : 'Options group'),
304
- toggle: (title) => (title ? `Options group ${title} toggle` : 'Options group toggle'),
97
+ group: {
98
+ [constants_1.MIN_GRAFANA_VERSION]: (title) => (title ? `Options group ${title}` : 'Options group'),
99
+ },
100
+ toggle: {
101
+ [constants_1.MIN_GRAFANA_VERSION]: (title) => (title ? `Options group ${title} toggle` : 'Options group toggle'),
102
+ },
305
103
  groupTitle: {
306
104
  [constants_1.MIN_GRAFANA_VERSION]: 'Panel options',
307
105
  },
308
106
  },
309
107
  PluginVisualization: {
310
- item: (title) => `Plugin visualization item ${title}`,
311
- current: () => '[class*="-currentVisualizationItem"]',
312
- },
313
- Select: {
314
- option: 'Select option',
315
- input: () => 'input[id*="time-options-input"]',
316
- singleValue: () => 'div[class*="-singleValue"]',
317
- },
318
- FieldConfigEditor: {
319
- content: 'Field config editor content',
320
- },
321
- OverridesConfigEditor: {
322
- content: 'Field overrides editor content',
323
- },
324
- FolderPicker: {
325
- /**
326
- * @deprecated use containerV2 from Grafana 8.3 instead
327
- */
328
- container: 'Folder picker select container',
329
- containerV2: 'data-testid Folder picker select container',
330
- input: 'Select a folder',
331
- },
332
- ReadonlyFolderPicker: {
333
- container: 'data-testid Readonly folder picker select container',
108
+ item: {
109
+ [constants_1.MIN_GRAFANA_VERSION]: (title) => `Plugin visualization item ${title}`,
110
+ },
334
111
  },
335
112
  DataSourcePicker: {
336
113
  container: {
@@ -338,77 +115,12 @@ exports.versionedComponents = {
338
115
  // did not exist prior to 8.3.0
339
116
  '8.3.0': 'Data source picker select container',
340
117
  },
341
- /**
342
- * @deprecated use inputV2 instead
343
- */
344
- input: () => 'input[id="data-source-picker"]',
345
- inputV2: 'data-testid Select a data source',
346
118
  },
347
119
  TimeZonePicker: {
348
- /**
349
- * @deprecated use TimeZonePicker.containerV2 from Grafana 8.3 instead
350
- */
351
- container: 'Time zone picker select container',
352
- containerV2: 'data-testid Time zone picker select container',
353
- },
354
- WeekStartPicker: {
355
- /**
356
- * @deprecated use WeekStartPicker.containerV2 from Grafana 8.3 instead
357
- */
358
- container: 'Choose starting day of the week',
359
- containerV2: 'data-testid Choose starting day of the week',
360
- placeholder: 'Choose starting day of the week',
361
- },
362
- TraceViewer: {
363
- spanBar: 'data-testid SpanBar--wrapper',
364
- },
365
- QueryField: { container: 'Query field' },
366
- QueryBuilder: {
367
- queryPatterns: 'Query patterns',
368
- labelSelect: 'Select label',
369
- valueSelect: 'Select value',
370
- matchOperatorSelect: 'Select match operator',
371
- },
372
- ValuePicker: {
373
- button: (name) => `Value picker button ${name}`,
374
- select: (name) => `Value picker select ${name}`,
375
- },
376
- Search: {
377
- /**
378
- * @deprecated use sectionV2 from Grafana 8.3 instead
379
- */
380
- section: 'Search section',
381
- sectionV2: 'data-testid Search section',
382
- /**
383
- * @deprecated use itemsV2 from Grafana 8.3 instead
384
- */
385
- items: 'Search items',
386
- itemsV2: 'data-testid Search items',
387
- cards: 'data-testid Search cards',
388
- collapseFolder: (sectionId) => `data-testid Collapse folder ${sectionId}`,
389
- expandFolder: (sectionId) => `data-testid Expand folder ${sectionId}`,
390
- dashboardCard: (item) => `data-testid Search card ${item}`,
391
- folderHeader: (folderName) => `data-testid Folder header ${folderName}`,
392
- folderContent: (folderName) => `data-testid Folder content ${folderName}`,
393
- dashboardItems: 'data-testid Dashboard search item',
394
- },
395
- DashboardLinks: {
396
- container: 'data-testid Dashboard link container',
397
- dropDown: 'data-testid Dashboard link dropdown',
398
- link: 'data-testid Dashboard link',
399
- },
400
- LoadingIndicator: {
401
- icon: 'Loading indicator',
402
- },
403
- CallToActionCard: {
404
- /**
405
- * @deprecated use buttonV2 from Grafana 8.3 instead
406
- */
407
- button: (name) => `Call to action button ${name}`,
408
- buttonV2: (name) => `data-testid Call to action button ${name}`,
409
- },
410
- DataLinksContextMenu: {
411
- singleLink: 'Data link',
120
+ containerV2: {
121
+ '8.3.0': 'data-testid Time zone picker select container',
122
+ [constants_1.MIN_GRAFANA_VERSION]: 'Folder picker select container',
123
+ },
412
124
  },
413
125
  CodeEditor: {
414
126
  container: {
@@ -416,53 +128,4 @@ exports.versionedComponents = {
416
128
  [constants_1.MIN_GRAFANA_VERSION]: 'Code editor container',
417
129
  },
418
130
  },
419
- DashboardImportPage: {
420
- textarea: 'data-testid-import-dashboard-textarea',
421
- submit: 'data-testid-load-dashboard',
422
- },
423
- ImportDashboardForm: {
424
- name: 'data-testid-import-dashboard-title',
425
- submit: 'data-testid-import-dashboard-submit',
426
- },
427
- PanelAlertTabContent: {
428
- content: 'Unified alert editor tab content',
429
- },
430
- VisualizationPreview: {
431
- card: (name) => `data-testid suggestion-${name}`,
432
- },
433
- ColorSwatch: {
434
- name: `data-testid-colorswatch`,
435
- },
436
- DashboardRow: {
437
- title: (title) => `data-testid dashboard-row-title-${title}`,
438
- },
439
- UserProfile: {
440
- profileSaveButton: 'data-testid-user-profile-save',
441
- preferencesSaveButton: 'data-testid-shared-prefs-save',
442
- orgsTable: 'data-testid-user-orgs-table',
443
- sessionsTable: 'data-testid-user-sessions-table',
444
- },
445
- FileUpload: {
446
- inputField: 'data-testid-file-upload-input-field',
447
- fileNameSpan: 'data-testid-file-upload-file-name',
448
- },
449
- DebugOverlay: {
450
- wrapper: 'debug-overlay',
451
- },
452
- OrgRolePicker: {
453
- input: 'Role',
454
- },
455
- AnalyticsToolbarButton: {
456
- button: 'Dashboard insights',
457
- },
458
- Variables: {
459
- variableOption: 'data-testid variable-option',
460
- },
461
- Annotations: {
462
- annotationsTypeInput: 'annotations-type-input',
463
- annotationsChoosePanelInput: 'choose-panels-input',
464
- },
465
- Tooltip: {
466
- container: 'data-testid tooltip',
467
- },
468
131
  };