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:
Ashley Harrison
2024-02-06 13:43:11 +00:00
committed by GitHub
parent 390461f9e1
commit 28b336ac80
52 changed files with 218 additions and 1822 deletions

View File

@@ -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');
});

View File

@@ -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')

View File

@@ -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', () => {