Skip to content

Commit

Permalink
adjust query formatting so that suggestions are not accepted when add…
Browse files Browse the repository at this point in the history
…ing new line
  • Loading branch information
sunker committed Aug 18, 2022
1 parent 23efcf2 commit b429d3a
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions cypress/integration/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,17 @@ e2e.scenario({
e2eSelectors.ConfigEditor.table.input().click({ force: true });
e2eSelectors.ConfigEditor.table.wrapper().contains('cloudtrail_logs');
e2eSelectors.ConfigEditor.table.input().type('cloudtrail_logs').type('{enter}');
e2eSelectors.QueryEditor.CodeEditor.container().click({ force: true }).type(`{selectall}{enter}
SELECT 1
$__parseTime(eventtime, 'yyyy-MM-dd''T''HH:mm:ss''Z'),
sum(cast(json_extract_scalar(additionaleventdata, '$.bytesTransferredOut') as real)) AS bytes
FROM
$__table
WHERE additionaleventdata IS NOT NULL AND json_extract_scalar(additionaleventdata, '$.bytesTransferredOut') IS NOT NULL
AND
$__timeFilter(eventtime, 'yyyy-MM-dd''T''HH:mm:ss''Z')
e2eSelectors.QueryEditor.CodeEditor.container()
.click({ force: true })
.type(
`
SELECT $__parseTime(eventtime, 'yyyy-MM-dd''T''HH:mm:ss''Z'), sum(cast(json_extract_scalar(additionaleventdata, '$.bytesTransferredOut') as real)) AS bytes
FROM $__table WHERE additionaleventdata IS NOT NULL AND json_extract_scalar(additionaleventdata, '$.bytesTransferredOut') IS NOT NULL AND $__timeFilter(eventtime, 'yyyy-MM-dd''T''HH:mm:ss''Z')
GROUP BY 1
ORDER BY 1
`);
`,
{ delay: 1 }
);
// blur and wait for loading
cy.get('.panel-content').click();
cy.get('.panel-loading');
Expand Down

0 comments on commit b429d3a

Please sign in to comment.