Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
29598d83
Unverified
Commit
29598d83
authored
Jun 05, 2020
by
Hugo Häggmark
Committed by
GitHub
Jun 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e: waits for requests to minimize flakiness (#25368)
parent
69b36697
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
e2e/suite1/specs/panelEdit_queries.spec.ts
+20
-0
No files found.
e2e/suite1/specs/panelEdit_queries.spec.ts
View file @
29598d83
...
@@ -25,6 +25,14 @@ e2e.scenario({
...
@@ -25,6 +25,14 @@ e2e.scenario({
expect
(
rows
.
length
).
equals
(
1
);
expect
(
rows
.
length
).
equals
(
1
);
});
});
e2e
().
server
();
e2e
()
.
route
({
method
:
'POST'
,
url
:
'/api/tsdb/query'
,
})
.
as
(
'apiPostQuery'
);
// Add query button should be visible and clicking on it should create a new row
// Add query button should be visible and clicking on it should create a new row
e2e
.
components
.
QueryTab
.
addQuery
()
e2e
.
components
.
QueryTab
.
addQuery
()
.
scrollIntoView
()
.
scrollIntoView
()
...
@@ -42,6 +50,8 @@ e2e.scenario({
...
@@ -42,6 +50,8 @@ e2e.scenario({
.
should
(
'be.visible'
)
.
should
(
'be.visible'
)
.
click
();
.
click
();
cy
.
wait
(
'@apiPostQuery'
);
// We expect row with refId B to exist and be visible
// We expect row with refId B to exist and be visible
e2e
.
components
.
QueryEditorRows
.
rows
().
within
(
rows
=>
{
e2e
.
components
.
QueryEditorRows
.
rows
().
within
(
rows
=>
{
expect
(
rows
.
length
).
equals
(
1
);
expect
(
rows
.
length
).
equals
(
1
);
...
@@ -63,6 +73,8 @@ e2e.scenario({
...
@@ -63,6 +73,8 @@ e2e.scenario({
.
eq
(
1
)
.
eq
(
1
)
.
select
(
'CSV Metric Values'
);
.
select
(
'CSV Metric Values'
);
cy
.
wait
(
'@apiPostQuery'
);
// Change order or query rows
// Change order or query rows
// Check the order of the rows before
// Check the order of the rows before
e2e
.
components
.
QueryEditorRows
.
rows
()
e2e
.
components
.
QueryEditorRows
.
rows
()
...
@@ -82,6 +94,8 @@ e2e.scenario({
...
@@ -82,6 +94,8 @@ e2e.scenario({
.
eq
(
1
)
.
eq
(
1
)
.
click
();
.
click
();
cy
.
wait
(
'@apiPostQuery'
);
// Check the order of the rows after change
// Check the order of the rows after change
e2e
.
components
.
QueryEditorRows
.
rows
()
e2e
.
components
.
QueryEditorRows
.
rows
()
.
eq
(
0
)
.
eq
(
0
)
...
@@ -108,6 +122,8 @@ e2e.scenario({
...
@@ -108,6 +122,8 @@ e2e.scenario({
.
should
(
'be.visible'
)
.
should
(
'be.visible'
)
.
click
();
.
click
();
cy
.
wait
(
'@apiPostQuery'
);
expectInspectorResultAndClose
(
keys
=>
{
expectInspectorResultAndClose
(
keys
=>
{
const
length
=
keys
.
length
;
const
length
=
keys
.
length
;
expect
(
keys
[
length
-
1
].
innerText
).
equals
(
'A:'
);
expect
(
keys
[
length
-
1
].
innerText
).
equals
(
'A:'
);
...
@@ -119,6 +135,8 @@ e2e.scenario({
...
@@ -119,6 +135,8 @@ e2e.scenario({
.
should
(
'be.visible'
)
.
should
(
'be.visible'
)
.
click
();
.
click
();
cy
.
wait
(
'@apiPostQuery'
);
expectInspectorResultAndClose
(
keys
=>
{
expectInspectorResultAndClose
(
keys
=>
{
const
length
=
keys
.
length
;
const
length
=
keys
.
length
;
expect
(
keys
[
length
-
2
].
innerText
).
equals
(
'A:'
);
expect
(
keys
[
length
-
2
].
innerText
).
equals
(
'A:'
);
...
@@ -136,6 +154,8 @@ const expectInspectorResultAndClose = (expectCallBack: (keys: any[]) => void) =>
...
@@ -136,6 +154,8 @@ const expectInspectorResultAndClose = (expectCallBack: (keys: any[]) => void) =>
.
should
(
'be.visible'
)
.
should
(
'be.visible'
)
.
click
();
.
click
();
cy
.
wait
(
'@apiPostQuery'
);
e2e
.
components
.
PanelInspector
.
Query
.
jsonObjectKeys
()
e2e
.
components
.
PanelInspector
.
Query
.
jsonObjectKeys
()
.
should
(
'be.visible'
)
.
should
(
'be.visible'
)
.
within
((
keys
:
any
)
=>
expectCallBack
(
keys
));
.
within
((
keys
:
any
)
=>
expectCallBack
(
keys
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment