mirror of
https://github.com/grafana/grafana.git
synced 2024-12-24 16:10:22 -06:00
parent
be2aa9a3a7
commit
54cfae8fef
@ -41,7 +41,7 @@ describe.skip('Keyboard shortcuts', () => {
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
});
|
||||
|
||||
it('multiple time range shortcuts should work', () => {
|
||||
it('time range shortcuts should work', () => {
|
||||
cy.get('body').type('ge');
|
||||
e2e.pages.Explore.General.container().should('be.visible');
|
||||
|
||||
@ -61,28 +61,10 @@ describe.skip('Keyboard shortcuts', () => {
|
||||
expectedRange = `Time range selected: 2024-06-05 10:04:00 to 2024-06-05 10:05:00`; // 1 min back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
|
||||
cy.log('Trying two shift-lefts');
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:03:00 to 2024-06-05 10:04:00`; // 1 min back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:02:00 to 2024-06-05 10:03:00`; // 2 mins back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
|
||||
cy.log('Trying two shift-lefts and a shift-right');
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:01:00 to 2024-06-05 10:02:00`; // 1 min back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:00:00 to 2024-06-05 10:01:00`; // 2 mins back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
cy.log('Trying one shift-right');
|
||||
cy.get('body').type('t{rightarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:01:00 to 2024-06-05 10:02:00`; // 1 min forward (1 min back total)
|
||||
expectedRange = `Time range selected: 2024-06-05 10:05:00 to 2024-06-05 10:06:00`; // 1 min forward
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
});
|
||||
});
|
||||
|
@ -42,7 +42,7 @@ describe('Keyboard shortcuts', () => {
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
});
|
||||
|
||||
it('multiple time range shortcuts should work', () => {
|
||||
it('time range shortcuts should work', () => {
|
||||
cy.get('body').type('ge');
|
||||
e2e.pages.Explore.General.container().should('be.visible');
|
||||
|
||||
@ -62,28 +62,10 @@ describe('Keyboard shortcuts', () => {
|
||||
expectedRange = `Time range selected: 2024-06-05 10:04:00 to 2024-06-05 10:05:00`; // 1 min back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
|
||||
cy.log('Trying two shift-lefts');
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:03:00 to 2024-06-05 10:04:00`; // 1 min back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:02:00 to 2024-06-05 10:03:00`; // 2 mins back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
|
||||
cy.log('Trying two shift-lefts and a shift-right');
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:01:00 to 2024-06-05 10:02:00`; // 1 min back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
cy.get('body').type('t{leftarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:00:00 to 2024-06-05 10:01:00`; // 2 mins back
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
cy.log('Trying one shift-right');
|
||||
cy.get('body').type('t{rightarrow}');
|
||||
e2e.components.RefreshPicker.runButtonV2().should('have.text', 'Run query');
|
||||
expectedRange = `Time range selected: 2024-06-05 10:01:00 to 2024-06-05 10:02:00`; // 1 min forward (1 min back total)
|
||||
expectedRange = `Time range selected: 2024-06-05 10:05:00 to 2024-06-05 10:06:00`; // 1 min forward
|
||||
e2e.components.TimePicker.openButton().should('have.attr', 'aria-label', expectedRange);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user