diff --git a/e2e/scenes/various-suite/keybinds.spec.ts b/e2e/scenes/various-suite/keybinds.spec.ts index 88e256b5576..624731dbec4 100644 --- a/e2e/scenes/various-suite/keybinds.spec.ts +++ b/e2e/scenes/various-suite/keybinds.spec.ts @@ -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); }); }); diff --git a/e2e/various-suite/keybinds.spec.ts b/e2e/various-suite/keybinds.spec.ts index 37f3c8da9c0..3f51fe04037 100644 --- a/e2e/various-suite/keybinds.spec.ts +++ b/e2e/various-suite/keybinds.spec.ts @@ -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); }); });