Skip to content

Commit

Permalink
add constants
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 committed Dec 6, 2024
1 parent c11e5cb commit 2afbb1d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .cypress/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export const setTimeFilter = (setEndTime = false, refresh = true) => {
.focus()
.type('{selectall}' + startTime, { force: true });
if (setEndTime) {
cy.get('button.euiDatePopoverButton--end[data-test-subj="superDatePickerendDatePopoverButton"]').click();
cy.get(
'button.euiDatePopoverButton--end[data-test-subj="superDatePickerendDatePopoverButton"]'
).click();
cy.get('.euiTab__content').contains('Absolute').click();
cy.get('input[data-test-subj="superDatePickerAbsoluteDateInput"]')

Check warning on line 81 in .cypress/utils/constants.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
.focus()
Expand Down Expand Up @@ -128,10 +130,17 @@ export const SQL_QUERY_TEXT = `%sql
select * from opensearch_dashboards_sample_data_flights limit 20 {enter}
`;

export const SQL_INCORRECT_QUERY_TEXT = `%sql
selectaaaaa * from opensearch_dashboards_sample_data_flights limit 20 {enter}
`;

export const PPL_QUERY_TEXT = `%ppl
source=opensearch_dashboards_sample_data_flights {enter}
`;

export const PPL_INCORRECT_QUERY_TEXT = `%ppl
source=opensearch_dashboards_sample_data_flights__ {enter}
`;

export const suppressResizeObserverIssue = () => {
// exception is thrown on loading EuiDataGrid in cypress only, ignore for now
Expand Down

0 comments on commit 2afbb1d

Please sign in to comment.