From 1991b034352d6138bd7d419012802e7df89964df Mon Sep 17 00:00:00 2001 From: antip00 Date: Mon, 12 Aug 2024 17:34:43 +0300 Subject: [PATCH 1/2] Adding tests for SQL Editor. --- tests/testflows/regression.py | 1 + tests/testflows/requirements/requirements.md | 70 ++- tests/testflows/requirements/requirements.py | 232 ++++++++-- tests/testflows/steps/actions.py | 2 +- tests/testflows/steps/dashboard/view.py | 5 +- tests/testflows/steps/panel/locators.py | 29 ++ .../steps/panel/sql_editor/locators.py | 2 +- tests/testflows/steps/panel/view.py | 74 ++- tests/testflows/tests/automated/sql_editor.py | 431 ++++++++++++++++++ 9 files changed, 788 insertions(+), 58 deletions(-) create mode 100644 tests/testflows/tests/automated/sql_editor.py diff --git a/tests/testflows/regression.py b/tests/testflows/regression.py index a22be772a..8bfe62134 100755 --- a/tests/testflows/regression.py +++ b/tests/testflows/regression.py @@ -91,6 +91,7 @@ def regression(self, before, after): with Given("I login in grafana"): login.login() + Feature(run=load("testflows.tests.automated.sql_editor", "feature")) Feature(run=load("testflows.tests.automated.data_source_setup", "feature")) Feature(run=load("testflows.tests.automated.e2e", "feature")) diff --git a/tests/testflows/requirements/requirements.md b/tests/testflows/requirements/requirements.md index ee20c71af..d179870f1 100755 --- a/tests/testflows/requirements/requirements.md +++ b/tests/testflows/requirements/requirements.md @@ -67,22 +67,28 @@ * 26.5 [RQ.SRS.Plugin.MultiUserUsage.DifferentDashboards](#rqsrspluginmultiuserusagedifferentdashboards) * 27 [Query Setup](#query-setup) * 27.1 [RQ.SRS.Plugin.QuerySetup](#rqsrspluginquerysetup) -* 28 [Query Setup Interface](#query-setup-interface) - * 28.1 [RQ.SRS.Plugin.QuerySetupInterface](#rqsrspluginquerysetupinterface) +* 28 [Query Settings](#query-settings) + * 28.1 [RQ.SRS.Plugin.QuerySettings](#rqsrspluginquerysettings) * 29 [Query Options](#query-options) * 29.1 [RQ.SRS.Plugin.QueryOptions](#rqsrspluginqueryoptions) + * 29.2 [RQ.SRS.Plugin.QueryOptions.MaxDataPoints](#rqsrspluginqueryoptionsmaxdatapoints) + * 29.3 [RQ.SRS.Plugin.QueryOptions.MinInterval](#rqsrspluginqueryoptionsmininterval) + * 29.4 [RQ.SRS.Plugin.QueryOptions.Interval](#rqsrspluginqueryoptionsinterval) + * 29.5 [RQ.SRS.Plugin.QueryOptions.RelativeTime](#rqsrspluginqueryoptionsrelativetime) + * 29.6 [RQ.SRS.Plugin.QueryOptions.TimeShift](#rqsrspluginqueryoptionstimeshift) * 30 [Raw SQL Editor](#raw-sql-editor) * 30.1 [RQ.SRS.Plugin.RawSQLEditorInterface](#rqsrspluginrawsqleditorinterface) * 30.2 [RQ.SRS.Plugin.RawSQLEditorInterface.SQLEditor](#rqsrspluginrawsqleditorinterfacesqleditor) - * 30.3 [RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation](#rqsrspluginrawsqleditorinterfaceextrapolation) - * 30.4 [RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments](#rqsrspluginrawsqleditorinterfaceskipcomments) - * 30.5 [RQ.SRS.Plugin.RawSQLEditorInterface.Step](#rqsrspluginrawsqleditorinterfacestep) - * 30.6 [RQ.SRS.Plugin.RawSQLEditorInterface.Round](#rqsrspluginrawsqleditorinterfaceround) - * 30.7 [RQ.SRS.Plugin.RawSQLEditorInterface.Resolution](#rqsrspluginrawsqleditorinterfaceresolution) - * 30.8 [RQ.SRS.Plugin.RawSQLEditorInterface.FormatAs](#rqsrspluginrawsqleditorinterfaceformatas) - * 30.9 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowHelp](#rqsrspluginrawsqleditorinterfaceshowhelp) - * 30.10 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowGeneratedSQL](#rqsrspluginrawsqleditorinterfaceshowgeneratedsql) - * 30.11 [RQ.SRS.Plugin.RawSQLEditorInterface.ReformatQuery](#rqsrspluginrawsqleditorinterfacereformatquery) + * 30.3 [RQ.SRS.Plugin.RawSQLEditorInterface.AddMetadata](#rqsrspluginrawsqleditorinterfaceaddmetadata) + * 30.4 [RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation](#rqsrspluginrawsqleditorinterfaceextrapolation) + * 30.5 [RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments](#rqsrspluginrawsqleditorinterfaceskipcomments) + * 30.6 [RQ.SRS.Plugin.RawSQLEditorInterface.Step](#rqsrspluginrawsqleditorinterfacestep) + * 30.7 [RQ.SRS.Plugin.RawSQLEditorInterface.Round](#rqsrspluginrawsqleditorinterfaceround) + * 30.8 [RQ.SRS.Plugin.RawSQLEditorInterface.Resolution](#rqsrspluginrawsqleditorinterfaceresolution) + * 30.9 [RQ.SRS.Plugin.RawSQLEditorInterface.FormatAs](#rqsrspluginrawsqleditorinterfaceformatas) + * 30.10 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowHelp](#rqsrspluginrawsqleditorinterfaceshowhelp) + * 30.11 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowGeneratedSQL](#rqsrspluginrawsqleditorinterfaceshowgeneratedsql) + * 30.12 [RQ.SRS.Plugin.RawSQLEditorInterface.ReformatQuery](#rqsrspluginrawsqleditorinterfacereformatquery) * 31 [Auto-complete In Queries](#auto-complete-in-queries) * 31.1 [RQ.SRS.Plugin.AutoCompleteInQueries](#rqsrspluginautocompleteinqueries) * 32 [Time range selector](#time-range-selector) @@ -450,9 +456,9 @@ version: 1.0 The [Plugin] SHALL support creating Grafana visualizations using the query setup interface and raw SQL editor. -## Query Setup Interface +## Query Settings -### RQ.SRS.Plugin.QuerySetupInterface +### RQ.SRS.Plugin.QuerySettings version: 1.0 The [Plugin]'s query setup interface SHALL contain the following fields: @@ -482,6 +488,35 @@ The [Plugin] SHALL support the following options for the query: ![query options](https://github.com/antip00/clickhouse-grafana/blob/master/tests/testflows/requirements/images/query%20options.png) +### RQ.SRS.Plugin.QueryOptions.MaxDataPoints +version: 1.0 + +The [Plugin] SHALL support specifying maximum data points per series using `Max data points` text field. + +### RQ.SRS.Plugin.QueryOptions.MinInterval +version: 1.0 + +The [Plugin] SHALL support specifying lower limit for the interval using `Min interval` text field. + +### RQ.SRS.Plugin.QueryOptions.Interval +version: 1.0 + +The [Plugin] SHALL evaluate interval that is used in $__interval and $__interval_ms macro. +This interval SHALL be displayed in `Interval` text field. + +### RQ.SRS.Plugin.QueryOptions.RelativeTime +version: 1.0 + +The [Plugin] SHALL support specifying relative time using `Relative time` text field. +This relative time SHALL override the relative time range for individual panel. + +### RQ.SRS.Plugin.QueryOptions.TimeShift +version: 1.0 + +The [Plugin] SHALL support specifying time shift using `Time shift` text field. +This relative time SHALL override the time range for individual panel +by shifting its start and end relative to the time picker. + ## Raw SQL Editor ### RQ.SRS.Plugin.RawSQLEditorInterface @@ -490,6 +525,7 @@ version: 1.0 The [Plugin]'s raw SQL editor interface SHALL contain the following fields: * SQL editor +* `Add Metadata` * `Extrapolation` * `Skip Comments` * `Step` @@ -508,10 +544,16 @@ version: 1.0 The [Plugin] SHALL support specifying SQL query by using SQL Editor text field for SQL query. +### RQ.SRS.Plugin.RawSQLEditorInterface.AddMetadata +version: 1.0 + +The [Plugin] SHALL support turning on and off adding metadata for queries in reformatted query +for visualizations using the `Add Metadata` toggle. + ### RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation version: 1.0 -The [Plugin] SHALL support turning on and off extrapolation for vizualizations using the `Extrapolation` toggle. +The [Plugin] SHALL support turning on and off extrapolation for visualizations using the `Extrapolation` toggle. ### RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments version: 1.0 diff --git a/tests/testflows/requirements/requirements.py b/tests/testflows/requirements/requirements.py index 2b87a7a20..e7dcf7583 100755 --- a/tests/testflows/requirements/requirements.py +++ b/tests/testflows/requirements/requirements.py @@ -621,8 +621,8 @@ num='27.1' ) -RQ_SRS_Plugin_QuerySetupInterface = Requirement( - name='RQ.SRS.Plugin.QuerySetupInterface', +RQ_SRS_Plugin_QuerySettings = Requirement( + name='RQ.SRS.Plugin.QuerySettings', version='1.0', priority=None, group=None, @@ -671,6 +671,90 @@ num='29.1' ) +RQ_SRS_Plugin_QueryOptions_MaxDataPoints = Requirement( + name='RQ.SRS.Plugin.QueryOptions.MaxDataPoints', + version='1.0', + priority=None, + group=None, + type=None, + uid=None, + description=( + 'The [Plugin] SHALL support specifying maximum data points per series using `Max data points` text field.\n' + '\n' + ), + link=None, + level=2, + num='29.2' +) + +RQ_SRS_Plugin_QueryOptions_MinInterval = Requirement( + name='RQ.SRS.Plugin.QueryOptions.MinInterval', + version='1.0', + priority=None, + group=None, + type=None, + uid=None, + description=( + 'The [Plugin] SHALL support specifying lower limit for the interval using `Min interval` text field.\n' + '\n' + ), + link=None, + level=2, + num='29.3' +) + +RQ_SRS_Plugin_QueryOptions_Interval = Requirement( + name='RQ.SRS.Plugin.QueryOptions.Interval', + version='1.0', + priority=None, + group=None, + type=None, + uid=None, + description=( + 'The [Plugin] SHALL evaluate interval that is used in $__interval and $__interval_ms macro. \n' + 'This interval SHALL be displayed in `Interval` text field.\n' + '\n' + ), + link=None, + level=2, + num='29.4' +) + +RQ_SRS_Plugin_QueryOptions_RelativeTime = Requirement( + name='RQ.SRS.Plugin.QueryOptions.RelativeTime', + version='1.0', + priority=None, + group=None, + type=None, + uid=None, + description=( + 'The [Plugin] SHALL support specifying relative time using `Relative time` text field.\n' + 'This relative time SHALL override the relative time range for individual panel.\n' + '\n' + ), + link=None, + level=2, + num='29.5' +) + +RQ_SRS_Plugin_QueryOptions_TimeShift = Requirement( + name='RQ.SRS.Plugin.QueryOptions.TimeShift', + version='1.0', + priority=None, + group=None, + type=None, + uid=None, + description=( + 'The [Plugin] SHALL support specifying time shift using `Time shift` text field.\n' + 'This relative time SHALL override the time range for individual panel \n' + 'by shifting its start and end relative to the time picker.\n' + '\n' + ), + link=None, + level=2, + num='29.6' +) + RQ_SRS_Plugin_RawSQLEditorInterface = Requirement( name='RQ.SRS.Plugin.RawSQLEditorInterface', version='1.0', @@ -682,6 +766,7 @@ "The [Plugin]'s raw SQL editor interface SHALL contain the following fields:\n" '\n' '* SQL editor\n' + '* `Add Metadata`\n' '* `Extrapolation`\n' '* `Skip Comments`\n' '* `Step`\n' @@ -717,6 +802,23 @@ num='30.2' ) +RQ_SRS_Plugin_RawSQLEditorInterface_AddMetadata = Requirement( + name='RQ.SRS.Plugin.RawSQLEditorInterface.AddMetadata', + version='1.0', + priority=None, + group=None, + type=None, + uid=None, + description=( + 'The [Plugin] SHALL support turning on and off adding metadata for queries in reformatted query\n' + 'for visualizations using the `Add Metadata` toggle.\n' + '\n' + ), + link=None, + level=2, + num='30.3' +) + RQ_SRS_Plugin_RawSQLEditorInterface_Extrapolation = Requirement( name='RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation', version='1.0', @@ -725,12 +827,12 @@ type=None, uid=None, description=( - 'The [Plugin] SHALL support turning on and off extrapolation for vizualizations using the `Extrapolation` toggle.\n' + 'The [Plugin] SHALL support turning on and off extrapolation for visualizations using the `Extrapolation` toggle.\n' '\n' ), link=None, level=2, - num='30.3' + num='30.4' ) RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments = Requirement( @@ -746,7 +848,7 @@ ), link=None, level=2, - num='30.4' + num='30.5' ) RQ_SRS_Plugin_RawSQLEditorInterface_Step = Requirement( @@ -762,7 +864,7 @@ ), link=None, level=2, - num='30.5' + num='30.6' ) RQ_SRS_Plugin_RawSQLEditorInterface_Round = Requirement( @@ -778,7 +880,7 @@ ), link=None, level=2, - num='30.6' + num='30.7' ) RQ_SRS_Plugin_RawSQLEditorInterface_Resolution = Requirement( @@ -794,7 +896,7 @@ ), link=None, level=2, - num='30.7' + num='30.8' ) RQ_SRS_Plugin_RawSQLEditorInterface_FormatAs = Requirement( @@ -811,7 +913,7 @@ ), link=None, level=2, - num='30.8' + num='30.9' ) RQ_SRS_Plugin_RawSQLEditorInterface_ShowHelp = Requirement( @@ -827,7 +929,7 @@ ), link=None, level=2, - num='30.9' + num='30.10' ) RQ_SRS_Plugin_RawSQLEditorInterface_ShowGeneratedSQL = Requirement( @@ -844,7 +946,7 @@ ), link=None, level=2, - num='30.10' + num='30.11' ) RQ_SRS_Plugin_RawSQLEditorInterface_ReformatQuery = Requirement( @@ -860,7 +962,7 @@ ), link=None, level=2, - num='30.11' + num='30.12' ) RQ_SRS_Plugin_AutoCompleteInQueries = Requirement( @@ -1784,22 +1886,28 @@ Heading(name='RQ.SRS.Plugin.MultiUserUsage.DifferentDashboards', level=2, num='26.5'), Heading(name='Query Setup', level=1, num='27'), Heading(name='RQ.SRS.Plugin.QuerySetup', level=2, num='27.1'), - Heading(name='Query Setup Interface', level=1, num='28'), - Heading(name='RQ.SRS.Plugin.QuerySetupInterface', level=2, num='28.1'), + Heading(name='Query Settings', level=1, num='28'), + Heading(name='RQ.SRS.Plugin.QuerySettings', level=2, num='28.1'), Heading(name='Query Options', level=1, num='29'), Heading(name='RQ.SRS.Plugin.QueryOptions', level=2, num='29.1'), + Heading(name='RQ.SRS.Plugin.QueryOptions.MaxDataPoints', level=2, num='29.2'), + Heading(name='RQ.SRS.Plugin.QueryOptions.MinInterval', level=2, num='29.3'), + Heading(name='RQ.SRS.Plugin.QueryOptions.Interval', level=2, num='29.4'), + Heading(name='RQ.SRS.Plugin.QueryOptions.RelativeTime', level=2, num='29.5'), + Heading(name='RQ.SRS.Plugin.QueryOptions.TimeShift', level=2, num='29.6'), Heading(name='Raw SQL Editor', level=1, num='30'), Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface', level=2, num='30.1'), Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.SQLEditor', level=2, num='30.2'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation', level=2, num='30.3'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments', level=2, num='30.4'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Step', level=2, num='30.5'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Round', level=2, num='30.6'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Resolution', level=2, num='30.7'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.FormatAs', level=2, num='30.8'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.ShowHelp', level=2, num='30.9'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.ShowGeneratedSQL', level=2, num='30.10'), - Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.ReformatQuery', level=2, num='30.11'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.AddMetadata', level=2, num='30.3'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation', level=2, num='30.4'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments', level=2, num='30.5'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Step', level=2, num='30.6'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Round', level=2, num='30.7'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.Resolution', level=2, num='30.8'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.FormatAs', level=2, num='30.9'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.ShowHelp', level=2, num='30.10'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.ShowGeneratedSQL', level=2, num='30.11'), + Heading(name='RQ.SRS.Plugin.RawSQLEditorInterface.ReformatQuery', level=2, num='30.12'), Heading(name='Auto-complete In Queries', level=1, num='31'), Heading(name='RQ.SRS.Plugin.AutoCompleteInQueries', level=2, num='31.1'), Heading(name='Time range selector', level=1, num='32'), @@ -1895,10 +2003,16 @@ RQ_SRS_Plugin_MultiUserUsage_SameDashboard, RQ_SRS_Plugin_MultiUserUsage_DifferentDashboards, RQ_SRS_Plugin_QuerySetup, - RQ_SRS_Plugin_QuerySetupInterface, + RQ_SRS_Plugin_QuerySettings, RQ_SRS_Plugin_QueryOptions, + RQ_SRS_Plugin_QueryOptions_MaxDataPoints, + RQ_SRS_Plugin_QueryOptions_MinInterval, + RQ_SRS_Plugin_QueryOptions_Interval, + RQ_SRS_Plugin_QueryOptions_RelativeTime, + RQ_SRS_Plugin_QueryOptions_TimeShift, RQ_SRS_Plugin_RawSQLEditorInterface, RQ_SRS_Plugin_RawSQLEditorInterface_SQLEditor, + RQ_SRS_Plugin_RawSQLEditorInterface_AddMetadata, RQ_SRS_Plugin_RawSQLEditorInterface_Extrapolation, RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments, RQ_SRS_Plugin_RawSQLEditorInterface_Step, @@ -2022,22 +2136,28 @@ * 26.5 [RQ.SRS.Plugin.MultiUserUsage.DifferentDashboards](#rqsrspluginmultiuserusagedifferentdashboards) * 27 [Query Setup](#query-setup) * 27.1 [RQ.SRS.Plugin.QuerySetup](#rqsrspluginquerysetup) -* 28 [Query Setup Interface](#query-setup-interface) - * 28.1 [RQ.SRS.Plugin.QuerySetupInterface](#rqsrspluginquerysetupinterface) +* 28 [Query Settings](#query-settings) + * 28.1 [RQ.SRS.Plugin.QuerySettings](#rqsrspluginquerysettings) * 29 [Query Options](#query-options) * 29.1 [RQ.SRS.Plugin.QueryOptions](#rqsrspluginqueryoptions) + * 29.2 [RQ.SRS.Plugin.QueryOptions.MaxDataPoints](#rqsrspluginqueryoptionsmaxdatapoints) + * 29.3 [RQ.SRS.Plugin.QueryOptions.MinInterval](#rqsrspluginqueryoptionsmininterval) + * 29.4 [RQ.SRS.Plugin.QueryOptions.Interval](#rqsrspluginqueryoptionsinterval) + * 29.5 [RQ.SRS.Plugin.QueryOptions.RelativeTime](#rqsrspluginqueryoptionsrelativetime) + * 29.6 [RQ.SRS.Plugin.QueryOptions.TimeShift](#rqsrspluginqueryoptionstimeshift) * 30 [Raw SQL Editor](#raw-sql-editor) * 30.1 [RQ.SRS.Plugin.RawSQLEditorInterface](#rqsrspluginrawsqleditorinterface) * 30.2 [RQ.SRS.Plugin.RawSQLEditorInterface.SQLEditor](#rqsrspluginrawsqleditorinterfacesqleditor) - * 30.3 [RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation](#rqsrspluginrawsqleditorinterfaceextrapolation) - * 30.4 [RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments](#rqsrspluginrawsqleditorinterfaceskipcomments) - * 30.5 [RQ.SRS.Plugin.RawSQLEditorInterface.Step](#rqsrspluginrawsqleditorinterfacestep) - * 30.6 [RQ.SRS.Plugin.RawSQLEditorInterface.Round](#rqsrspluginrawsqleditorinterfaceround) - * 30.7 [RQ.SRS.Plugin.RawSQLEditorInterface.Resolution](#rqsrspluginrawsqleditorinterfaceresolution) - * 30.8 [RQ.SRS.Plugin.RawSQLEditorInterface.FormatAs](#rqsrspluginrawsqleditorinterfaceformatas) - * 30.9 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowHelp](#rqsrspluginrawsqleditorinterfaceshowhelp) - * 30.10 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowGeneratedSQL](#rqsrspluginrawsqleditorinterfaceshowgeneratedsql) - * 30.11 [RQ.SRS.Plugin.RawSQLEditorInterface.ReformatQuery](#rqsrspluginrawsqleditorinterfacereformatquery) + * 30.3 [RQ.SRS.Plugin.RawSQLEditorInterface.AddMetadata](#rqsrspluginrawsqleditorinterfaceaddmetadata) + * 30.4 [RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation](#rqsrspluginrawsqleditorinterfaceextrapolation) + * 30.5 [RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments](#rqsrspluginrawsqleditorinterfaceskipcomments) + * 30.6 [RQ.SRS.Plugin.RawSQLEditorInterface.Step](#rqsrspluginrawsqleditorinterfacestep) + * 30.7 [RQ.SRS.Plugin.RawSQLEditorInterface.Round](#rqsrspluginrawsqleditorinterfaceround) + * 30.8 [RQ.SRS.Plugin.RawSQLEditorInterface.Resolution](#rqsrspluginrawsqleditorinterfaceresolution) + * 30.9 [RQ.SRS.Plugin.RawSQLEditorInterface.FormatAs](#rqsrspluginrawsqleditorinterfaceformatas) + * 30.10 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowHelp](#rqsrspluginrawsqleditorinterfaceshowhelp) + * 30.11 [RQ.SRS.Plugin.RawSQLEditorInterface.ShowGeneratedSQL](#rqsrspluginrawsqleditorinterfaceshowgeneratedsql) + * 30.12 [RQ.SRS.Plugin.RawSQLEditorInterface.ReformatQuery](#rqsrspluginrawsqleditorinterfacereformatquery) * 31 [Auto-complete In Queries](#auto-complete-in-queries) * 31.1 [RQ.SRS.Plugin.AutoCompleteInQueries](#rqsrspluginautocompleteinqueries) * 32 [Time range selector](#time-range-selector) @@ -2405,9 +2525,9 @@ The [Plugin] SHALL support creating Grafana visualizations using the query setup interface and raw SQL editor. -## Query Setup Interface +## Query Settings -### RQ.SRS.Plugin.QuerySetupInterface +### RQ.SRS.Plugin.QuerySettings version: 1.0 The [Plugin]'s query setup interface SHALL contain the following fields: @@ -2437,6 +2557,35 @@ ![query options](https://github.com/antip00/clickhouse-grafana/blob/master/tests/testflows/requirements/images/query%20options.png) +### RQ.SRS.Plugin.QueryOptions.MaxDataPoints +version: 1.0 + +The [Plugin] SHALL support specifying maximum data points per series using `Max data points` text field. + +### RQ.SRS.Plugin.QueryOptions.MinInterval +version: 1.0 + +The [Plugin] SHALL support specifying lower limit for the interval using `Min interval` text field. + +### RQ.SRS.Plugin.QueryOptions.Interval +version: 1.0 + +The [Plugin] SHALL evaluate interval that is used in $__interval and $__interval_ms macro. +This interval SHALL be displayed in `Interval` text field. + +### RQ.SRS.Plugin.QueryOptions.RelativeTime +version: 1.0 + +The [Plugin] SHALL support specifying relative time using `Relative time` text field. +This relative time SHALL override the relative time range for individual panel. + +### RQ.SRS.Plugin.QueryOptions.TimeShift +version: 1.0 + +The [Plugin] SHALL support specifying time shift using `Time shift` text field. +This relative time SHALL override the time range for individual panel +by shifting its start and end relative to the time picker. + ## Raw SQL Editor ### RQ.SRS.Plugin.RawSQLEditorInterface @@ -2445,6 +2594,7 @@ The [Plugin]'s raw SQL editor interface SHALL contain the following fields: * SQL editor +* `Add Metadata` * `Extrapolation` * `Skip Comments` * `Step` @@ -2463,10 +2613,16 @@ The [Plugin] SHALL support specifying SQL query by using SQL Editor text field for SQL query. +### RQ.SRS.Plugin.RawSQLEditorInterface.AddMetadata +version: 1.0 + +The [Plugin] SHALL support turning on and off adding metadata for queries in reformatted query +for visualizations using the `Add Metadata` toggle. + ### RQ.SRS.Plugin.RawSQLEditorInterface.Extrapolation version: 1.0 -The [Plugin] SHALL support turning on and off extrapolation for vizualizations using the `Extrapolation` toggle. +The [Plugin] SHALL support turning on and off extrapolation for visualizations using the `Extrapolation` toggle. ### RQ.SRS.Plugin.RawSQLEditorInterface.SkipComments version: 1.0 diff --git a/tests/testflows/steps/actions.py b/tests/testflows/steps/actions.py index 60f179275..c2adc3a15 100644 --- a/tests/testflows/steps/actions.py +++ b/tests/testflows/steps/actions.py @@ -263,7 +263,7 @@ def create_new_altinity_datasource( with delay(): with And("entering datasource name"): datasources_altinity_edit.enter_name_into_name_field(datasource_name=datasource_name) - + with delay(): with By("clicking save and test button"): datasources_altinity_edit.click_save_and_test_button() diff --git a/tests/testflows/steps/dashboard/view.py b/tests/testflows/steps/dashboard/view.py index 5ed468dd3..29ff38f2d 100644 --- a/tests/testflows/steps/dashboard/view.py +++ b/tests/testflows/steps/dashboard/view.py @@ -143,9 +143,8 @@ def open_panel(self, panel_name): with When(f"I open dropdown menu for panel {panel_name}"): open_dropdown_menu_for_panel(panel_name=panel_name) - with delay(): - with When("I open panel view"): - edit_panel(panel_name=panel_name) + with When("I open panel view"): + edit_panel(panel_name=panel_name) @TestStep(When) diff --git a/tests/testflows/steps/panel/locators.py b/tests/testflows/steps/panel/locators.py index a139cfa44..eb1b6e9e9 100644 --- a/tests/testflows/steps/panel/locators.py +++ b/tests/testflows/steps/panel/locators.py @@ -57,6 +57,11 @@ def panel_error(self): driver: WebDriver = current().context.driver return driver.find_element(SelectBy.CSS_SELECTOR, "[data-testid='data-testid Panel status error']") + @property + def panel_error_for_table_view(self): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.CSS_SELECTOR, "[aria-label='Panel header error']") + @property def query_inspector_button(self): driver: WebDriver = current().context.driver @@ -169,5 +174,29 @@ def discard_button(self): driver: WebDriver = current().context.driver return driver.find_element(SelectBy.CSS_SELECTOR, f'[title="Undo all changes"]') + @property + def run_query_button(self): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.XPATH, f'//div[contains(@id, "A")]//button') + + @property + def data_is_missing_text(self): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.XPATH, f'//*[text()="Data is missing a time field"]') + + @property + def no_data_text(self): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.XPATH, f'//*[text()="No data"]') + + @property + def table_view_toggle(self): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.CSS_SELECTOR, f'[for="table-view"]') + + def table_column_name(self, column_name): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.XPATH, f'//*[text()="{column_name}"]') + locators = Locators() diff --git a/tests/testflows/steps/panel/sql_editor/locators.py b/tests/testflows/steps/panel/sql_editor/locators.py index b7fcefcf2..4406b28ea 100644 --- a/tests/testflows/steps/panel/sql_editor/locators.py +++ b/tests/testflows/steps/panel/sql_editor/locators.py @@ -26,7 +26,7 @@ def resolution_dropdown(self, query_name): def format_as_dropdown(self, query_name): driver: WebDriver = current().context.driver return driver.find_element(SelectBy.XPATH, - f'//*[contains(@data-rbd-draggable-id, "{query_name}")]//*[contains(@data-rbd-draggable-id, "{query_name}")]//*[./text()="Format As"]/..//*[contains(@class, "grafana-select-value-container")]') + f'//*[contains(@data-rbd-draggable-id, "{query_name}")]//*[./text()="Format As"]/..//input[contains(@id, "react-select")]') def add_metadata_toggle(self, query_name): driver: WebDriver = current().context.driver diff --git a/tests/testflows/steps/panel/view.py b/tests/testflows/steps/panel/view.py index 1e25783ca..0c9a57cb9 100644 --- a/tests/testflows/steps/panel/view.py +++ b/tests/testflows/steps/panel/view.py @@ -408,4 +408,76 @@ def click_apply_button(self): def click_discard_button(self): """Click apply button for panel.""" - locators.discard_button.click() \ No newline at end of file + locators.discard_button.click() + + +@TestStep(When) +def click_run_query_button(self): + """Click Run Query button.""" + + locators.run_query_button.click() + + +@TestStep(When) +def click_table_view_toggle(self): + """Click table view toggle.""" + + locators.table_view_toggle.click() + + +@TestStep(Then) +def check_data_is_missing_text(self): + """Check that 'Data is missing a time field' text is displayed.""" + with By("checking 'Data is missing a time field' text is displayed"): + try: + ui.wait_for_element_to_be_visible( + select_type=SelectBy.XPATH, + element='//*[text()="Data is missing a time field"]' + ) + return True + except: + return False + + +@TestStep(Then) +def check_columns_in_table_view(self, columns): + """Check that columns in table view is displayed.""" + with By(f"checking {','.join(columns)} columns is displayed"): + try: + for column_name in columns: + ui.wait_for_element_to_be_visible( + select_type=SelectBy.XPATH, + element=f'//*[text()="{column_name}"]' + ) + return True + except: + return False + + +@TestStep(Then) +def check_no_data_text(self): + """Check that columns in table view is displayed.""" + with By(f"checking 'No data' text is displayed"): + try: + ui.wait_for_element_to_be_visible( + select_type=SelectBy.XPATH, + element=f'//*[text()="No data"]' + ) + return True + except: + return False + + +@TestStep(Then) +def check_error_for_table_view(self): + """Check that columns in table view is displayed.""" + with By(f"checking 'No data' text is displayed"): + try: + ui.wait_for_element_to_be_visible( + select_type=SelectBy.XPATH, + element=f'//*[text()="No data"]' + ) + return True + except: + return False + diff --git a/tests/testflows/tests/automated/sql_editor.py b/tests/testflows/tests/automated/sql_editor.py new file mode 100644 index 000000000..40eeaaf69 --- /dev/null +++ b/tests/testflows/tests/automated/sql_editor.py @@ -0,0 +1,431 @@ +from testflows.core import * +from steps.delay import delay +from testflows.asserts import error + + +import steps.actions as actions +import steps.panel.view as panel +import steps.dashboard.view as dashboard +import steps.dashboards.view as dashboards +import steps.panel.sql_editor.view as sql_editor + +from requirements.requirements import * + +help_macros = """$table - replaced with selected table name from Query Builder +$dateCol - replaced with Date:Col value from Query Builder +$dateTimeCol - replaced with Column:DateTime or Column:TimeStamp value from Query Builder +$from - replaced with (timestamp with ms)/1000 value of UI selected "Time Range:From" +$to - replaced with (timestamp with ms)/1000 value of UI selected "Time Range:To" +$interval - replaced with selected "Group by time interval" value (as a number of seconds) +$timeFilter - replaced with currently selected "Time Range". Require Column:Date and Column:DateTime or Column:TimeStamp to be selected +$timeSeries - replaced with special ClickHouse construction to convert results as time-series data. Use it as "SELECT $timeSeries...". Require Column:DateTime or Column:TimeStamp to be selected +$naturalTimeSeries - replaced with special ClickHouse construction to convert results as time-series data in logical/natural units. Use it as "SELECT $naturalTimeSeries...". Require Column:DateTime or Column:TimeStamp to be selected +$unescape - unescapes variable value by removing single quotes. Used for multiple-value string variables: "SELECT $unescape($column) FROM requests WHERE $unescape($column) = 5" +$adhoc - replaced with a rendered ad-hoc filter expression, or "1" if no ad-hoc filters exist +$conditionalTest - add `SQL predicate` filter expression only if $variable have non empty value +A description of macros is available by typing their names in Raw Editor""" + +help_functions = """$rate(cols...) - function to convert query results as "change rate per interval". Example usage: $rate(countIf(Type = 200) * 60 AS good, countIf(Type != 200) * 60 AS bad) FROM requests +$columns(key, value) - function to query values as an array of [key, value], where key would be used as a label. Example usage: $columns(Type, count() c) FROM requests +$rateColumns(key, value) - is a combination of $columns and $rate. Example usage: $rateColumns(Type, count() c) FROM requests""" + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_AddMetadata("1.0")) +def add_metadata_toggle(self): + """Check that grafana plugin supports Add metadata toggle.""" + + with Given("I define a query"): + query = define("query", "SELECT now() - number * 1000, number FROM numbers(10)") + + with When("I enter query to SQL editor"): + panel.enter_sql_editor_input(query=query) + + with Then("I click on the visualization to see results"): + with delay(): + panel.click_on_the_visualization() + + with Then("I check reformatted query"): + assert "/* grafana dashboard=a_test_sql_editor, user=1 */" in sql_editor.get_reformatted_query(query_name='A'), error() + + try: + with Then("I click Add metadata toggle"): + with delay(): + sql_editor.click_add_metadata_toggle(query_name='A') + + with Then("I check reformatted query after clicking toggle"): + with delay(): + assert not ("/* grafana dashboard=a_test_sql_editor, user=1 */" in sql_editor.get_reformatted_query(query_name='A')), error() + + finally: + with Finally("I return Add metadata toggle status back"): + with delay(): + sql_editor.click_add_metadata_toggle(query_name='A') + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_Step("1.0")) +def step_textfield(self): + """Check that grafana plugin supports Step textfield.""" + + with Given("I define a query"): + query = define("query", "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t") + + with When("I enter query to SQL editor"): + panel.enter_sql_editor_input(query=query) + + with Then("I click on the visualization to see results"): + with delay(): + panel.click_on_the_visualization() + + try: + with Then("I enter step in seconds"): + with delay(): + sql_editor.enter_step(query_name='A', step="100s") + + with Then("I check reformatted query after entering step in seconds"): + with delay(): + assert "100" in sql_editor.get_reformatted_query(query_name='A'), error() + + with Then("I enter step in minutes"): + with delay(): + sql_editor.enter_step(query_name='A', step="100m") + + with Then("I check reformatted query after entering step in minutes"): + with delay(): + assert f"{100*60}" in sql_editor.get_reformatted_query(query_name='A'), error() + + with Then("I enter step in days"): + with delay(): + sql_editor.enter_step(query_name='A', step="100d") + + with Then("I check reformatted query after entering step in days"): + with delay(): + assert f"{100*60*60*24}" in sql_editor.get_reformatted_query(query_name='A'), error() + + finally: + with Finally("I return Step textfield value back"): + sql_editor.enter_step(query_name='A', step="") + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_Round("1.0")) +def round_textfield(self): + """Check that grafana plugin supports Round textfield.""" + + with Given("I define a query"): + query = define("query", "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t") + + with When("I enter query to SQL editor"): + panel.enter_sql_editor_input(query=query) + + with Then("I click on the visualization to see results"): + with delay(): + panel.click_on_the_visualization() + + try: + with Then("I enter round"): + with delay(): + sql_editor.enter_round(query_name='A', round="100s") + + with Then("I check reformatted contains rounded by 100s 'time from' and 'time to'"): + with delay(): + assert (sql_editor.get_time_from_in_seconds(query_name='A') % 100) == 0, error() + assert (sql_editor.get_time_to_in_seconds(query_name='A') % 100) == 0, error() + + with Then("I enter another round"): + with delay(): + sql_editor.enter_round(query_name='A', round="10000s") + + with Then("I check reformatted contains rounded by 10000s 'time from' and 'time to'"): + with delay(): + assert (sql_editor.get_time_from_in_seconds(query_name='A') % 10000) == 0, error() + assert (sql_editor.get_time_to_in_seconds(query_name='A') % 10000) == 0, error() + finally: + with Finally("I return Round textfield value back"): + with delay(): + sql_editor.enter_round(query_name='A', round="0s") + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_Resolution("1.0")) +def resolution_dropdown(self): + """Check that grafana plugin supports Resolution dropdown.""" + + with Given("I define a query"): + query = define("query", "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t") + + with Given("I define an array of resolutions that will be checked"): + resolutions = define("resolutions", ['1/1', '1/2', '1/3', '1/4', '1/5', '1/10']) + + with When("I enter query to SQL editor"): + panel.enter_sql_editor_input(query=query) + + with Then("I click on the visualization to see results"): + with delay(): + panel.click_on_the_visualization() + + try: + with Then("I enter step"): + with delay(): + sql_editor.enter_step(query_name='A', step="100s") + + for resolution in resolutions: + with Then(f"I change resolution to {resolution}"): + with delay(): + sql_editor.enter_resolution(query_name='A', resolution=resolution) + + with Then(f"I check {resolution} resolution applied to reformatted query"): + with delay(): + assert f'{int(resolution[2:])*100}' in sql_editor.get_reformatted_query(query_name='A'), error() + + finally: + with Finally("I return Step textfield and Resolution dropdown values back"): + with delay(): + sql_editor.enter_resolution(query_name='A', resolution='1/1') + sql_editor.enter_step(query_name='A', step="") + + +@TestOutline +def format_as_dropdown(self, format_as, columns, table_error=False): + """Check that grafana plugin supports Format As dropdown.""" + + with Given("I define a query"): + query = define("query", "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t") + + with When("I enter query to SQL editor"): + panel.enter_sql_editor_input(query=query) + + with Then("I click on the visualization to see results"): + with delay(): + panel.click_on_the_visualization() + + try: + with When("I click table view toggle"): + panel.click_table_view_toggle() + + with Then("I check table contains 'Time' and 'count()' columns"): + panel.check_columns_in_table_view(columns=['Time', 'count()']) + + with Then("I change format as"): + with delay(): + sql_editor.enter_format_as(query_name='A', format_as=format_as) + + with When("I click on run query button"): + panel.click_run_query_button() + + if table_error: + with Then("I check table error exists"): + assert panel.check_error_for_table_view() is True, error() + + elif len(columns) == 0: + with Then("I check table contains no data"): + assert panel.check_no_data_text() is True, error() + + else: + with Then("I check table contains expected columns"): + assert panel.check_columns_in_table_view(columns=columns) is True, error() + + finally: + with Finally("I return Format As dropdown value back"): + with delay(): + sql_editor.enter_format_as(query_name='A', format_as='Time series') + + with And("I turn table view back"): + with delay(): + panel.click_table_view_toggle() + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_FormatAs("1.0")) +def format_as_dropdown_table(self): + """Check that grafana plugin supports specifying Format As dropdown as Table.""" + + format_as_dropdown(format_as='Table', columns=['t', 'count()'], table_error=False) + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_FormatAs("1.0")) +def format_as_dropdown_logs(self): + """Check that grafana plugin supports specifying Format As dropdown as Logs.""" + + format_as_dropdown(format_as='Logs', columns=[], table_error=False) + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_FormatAs("1.0")) +def format_as_dropdown_traces(self): + """Check that grafana plugin supports specifying Format As dropdown as Traces.""" + + format_as_dropdown(format_as='Traces', columns=[], table_error=True) + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_FormatAs("1.0")) +def format_as_dropdown_flame_graph(self): + """Check that grafana plugin supports specifying Format As dropdown as Flame Graph.""" + + format_as_dropdown(format_as='Flame Graph', columns=['label', 'level', 'value', 'self'], table_error=False) + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_ShowHelp("1.0")) +def help_button(self): + """Check that grafana plugin supports Show help button.""" + + try: + with Then("I click Show help button"): + with delay(): + sql_editor.click_show_help_button(query_name='A') + + with (Then("I check show help message")): + with delay(): + assert help_macros in sql_editor.get_help_text(query_name='A'), error() + assert help_functions in sql_editor.get_help_text(query_name='A'), error() + finally: + with Finally("I collapse help text"): + with delay(): + sql_editor.click_show_help_button(query_name='A') + + +@TestScenario +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_Extrapolation("1.0")) +def extrapolation_toggle(self): + """Check that grafana plugin supports Extrapolation toggle.""" + + with Given("I define a query"): + query = define("query", "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t") + + with When("I enter query to SQL editor"): + panel.enter_sql_editor_input(query=query) + + try: + with Then("I enter step"): + with delay(): + sql_editor.enter_step(query_name='A', step="100s") + + with Then("I click on run query button to see results"): + with delay(): + panel.click_run_query_button() + + for attempt in retries(delay=10, count=6): + with attempt: + with When("I click on run query button to see results with turned on extrapolation"): + panel.click_run_query_button() + + with When("I take screenshot with extrapolation"): + panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_on') + + with When("I click on the extrapolation toggle to turn extrapolation off"): + sql_editor.click_extrapolation_toggle(query_name='A') + + with When("I click on run query button to see results with turned off extrapolation"): + panel.click_run_query_button() + + with When("I take screenshot without extrapolation"): + panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_off') + + with When("I click on the extrapolation toggle to turn extrapolation on"): + sql_editor.click_extrapolation_toggle(query_name='A') + + with Then("I check screenshots are different"): + assert not(actions.compare_screenshots(screenshot_name_1='extrapolation_toggle_on', screenshot_name_2='extrapolation_toggle_off')) + + finally: + with Finally("I return Step textfield and Resolution dropdown values back"): + with delay(): + sql_editor.enter_step(query_name='A', step="") + + +@TestOutline +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface_SkipComments("1.0")) +def skip_comments_toggle(self, query): + """Check that grafana plugin supports Skip Comments toggle.""" + + with When("I enter query in SQL editor"): + panel.enter_sql_editor_input(query=query) + + with Then("I click on the visualization to see results"): + with delay(): + panel.click_on_the_visualization() + + try: + with Then("I check reformatted query does not contain the comment"): + assert not ("COMMENT" in sql_editor.get_reformatted_query(query_name='A')), error() + + with Then("I click Skip Comments toggle", description="to allow user to see the comment"): + with delay(): + sql_editor.click_skip_comments_toggle(query_name='A') + + with Then("I check reformatted query contains the comment"): + with delay(): + assert "COMMENT" in sql_editor.get_reformatted_query(query_name='A'), error() + + finally: + with Finally("I return Skip Comments toggle status back"): + with delay(): + sql_editor.click_skip_comments_toggle(query_name='A') + + +@TestScenario +def multiline_comment(self): + """Check that grafana plugin supports Skip Comments toggle with multiline comments.""" + + with Given("I define a query that contains a comment"): + query = define("query", + "SELECT now() - number * 1000, number FROM numbers(10) /*\nCOMMENT*/") + + skip_comments_toggle(query=query) + + +@TestScenario +def double_dash_comment(self): + """Check that grafana plugin supports Skip Comments toggle with multiline comments.""" + + with Given("I define a query that contains a comment"): + query = define("query", + "SELECT now() - number * 1000, number FROM numbers(10) --COMMENT") + + skip_comments_toggle(query=query) + + +@TestFeature +@Requirements(RQ_SRS_Plugin_RawSQLEditorInterface("1.0"), + RQ_SRS_Plugin_RawSQLEditorInterface_ShowGeneratedSQL("1.0"), + RQ_SRS_Plugin_RawSQLEditorInterface_ReformatQuery("1.0"), + ) +@Name("sql editor") +def feature(self): + """Check that grafana plugin supports SQL Editor options.""" + + with Given("I define dashboard name for tests"): + dashboard_name = define("dashboard_name", "a_test_sql_editor") + + with When("I create new altinity datasource"): + actions.create_new_altinity_datasource(datasource_name='sql_editor', url="http://clickhouse:8123",) + + with Given("I create new dashboard"): + actions.create_dashboard(dashboard_name=dashboard_name) + + with When("I add visualization for panel"): + dashboard.add_visualization() + + with When("I select datasource"): + with delay(): + panel.select_datasource_in_panel_view(datasource_name='sql_editor') + + with When("I setup query settings for queries"): + with delay(): + actions.setup_query_settings() + + with When("I open SQL editor"): + with delay(): + panel.go_to_sql_editor() + + with Then("I click Show generated SQL button", + description="opened to check reformatted queries in scenarios"): + with delay(): + sql_editor.click_show_generated_sql_button(query_name='A') + + for scenario in loads(current_module(), Scenario): + scenario() \ No newline at end of file From d6b37bec1bee16350be27e43d135189a5aa7aab6 Mon Sep 17 00:00:00 2001 From: antip00 Date: Mon, 12 Aug 2024 18:00:12 +0300 Subject: [PATCH 2/2] Update testflows.yml --- .github/workflows/testflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testflows.yml b/.github/workflows/testflows.yml index 7036e294a..f9e9e9472 100644 --- a/.github/workflows/testflows.yml +++ b/.github/workflows/testflows.yml @@ -35,7 +35,7 @@ jobs: - name: Run Altinity Grafana Plugin tests run: cd ./tests/testflows/ && python3 - -u ./regression.py --before=0.3 --after=0.3 + -u ./regression.py --before=0.1 --after=0.1 --log raw.log -o classic