mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DockedMegaMenu: Clean up toggle and old code (#81878)
* remove toggle * remove code not behind toggle * remove old MegaMenu * rename DockedMegaMenu -> MegaMenu and clean up go code * fix backend test * run yarn i18n:extract * fix some unit tests * fix remaining unit tests * fix remaining e2e/unit tests
This commit is contained in:
@@ -26,21 +26,14 @@ describe('Datasource sandbox', () => {
|
||||
});
|
||||
|
||||
it('Loads the app page without the sandbox div wrapper', () => {
|
||||
e2e.pages.Home.visit();
|
||||
e2e.components.NavBar.Toggle.button().click();
|
||||
e2e.components.NavToolbar.container().get('[aria-label="Expand section Apps"]').click();
|
||||
e2e.components.NavMenu.item().contains('Sandbox app test plugin').click();
|
||||
cy.visit(`/a/${APP_ID}`);
|
||||
cy.wait(200); // wait to prevent false positives because cypress checks too fast
|
||||
cy.get('div[data-plugin-sandbox="sandbox-app-test"]').should('not.exist');
|
||||
cy.get('div[data-testid="sandbox-app-test-page-one"]').should('exist');
|
||||
});
|
||||
|
||||
it('Loads the app configuration without the sandbox div wrapper', () => {
|
||||
e2e.pages.Home.visit();
|
||||
e2e.components.NavBar.Toggle.button().click();
|
||||
e2e.components.NavToolbar.container().get('[aria-label="Expand section Apps"]').click();
|
||||
e2e.components.NavMenu.item().contains('Apps').click();
|
||||
cy.get('a[aria-label="Tab Sandbox App Page"]').click();
|
||||
cy.visit(`/plugins/${APP_ID}`);
|
||||
cy.wait(200); // wait to prevent false positives because cypress checks too fast
|
||||
cy.get('div[data-plugin-sandbox="sandbox-app-test"]').should('not.exist');
|
||||
cy.get('div[data-testid="sandbox-app-test-config-page"]').should('exist');
|
||||
@@ -55,20 +48,13 @@ describe('Datasource sandbox', () => {
|
||||
});
|
||||
|
||||
it('Loads the app page with the sandbox div wrapper', () => {
|
||||
e2e.pages.Home.visit();
|
||||
e2e.components.NavBar.Toggle.button().click();
|
||||
e2e.components.NavToolbar.container().get('[aria-label="Expand section Apps"]').click();
|
||||
e2e.components.NavMenu.item().contains('Sandbox app test plugin').click();
|
||||
cy.visit(`/a/${APP_ID}`);
|
||||
cy.get('div[data-plugin-sandbox="sandbox-app-test"]').should('exist');
|
||||
cy.get('div[data-testid="sandbox-app-test-page-one"]').should('exist');
|
||||
});
|
||||
|
||||
it('Loads the app configuration with the sandbox div wrapper', () => {
|
||||
e2e.pages.Home.visit();
|
||||
e2e.components.NavBar.Toggle.button().click();
|
||||
e2e.components.NavToolbar.container().get('[aria-label="Expand section Apps"]').click();
|
||||
e2e.components.NavMenu.item().contains('Apps').click();
|
||||
cy.get('a[aria-label="Tab Sandbox App Page"]').click();
|
||||
cy.visit(`/plugins/${APP_ID}`);
|
||||
cy.get('div[data-plugin-sandbox="sandbox-app-test"]').should('exist');
|
||||
cy.get('div[data-testid="sandbox-app-test-config-page"]').should('exist');
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('Auto-migrate graph panel', () => {
|
||||
e2e.pages.Dashboard.Annotations.marker().should('exist');
|
||||
});
|
||||
|
||||
cy.get('body').children().find('.scrollbar-view').first().scrollTo('bottom');
|
||||
cy.get('#pageContent .scrollbar-view').first().scrollTo('bottom');
|
||||
|
||||
e2e.components.Panels.Panel.title('05:00')
|
||||
.should('exist')
|
||||
|
||||
@@ -6,11 +6,7 @@ describe('Docked Navigation', () => {
|
||||
cy.viewport(1280, 800);
|
||||
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
||||
|
||||
cy.visit(fromBaseUrl('/'), {
|
||||
onBeforeLoad(window) {
|
||||
window.localStorage.setItem('grafana.featureToggles', 'dockedMegaMenu=1');
|
||||
},
|
||||
});
|
||||
cy.visit(fromBaseUrl('/'));
|
||||
});
|
||||
|
||||
it('should remain docked when reloading the page', () => {
|
||||
|
||||
Reference in New Issue
Block a user