diff --git a/apps/explorer-e2e/src/integration/blocks.cy.js b/apps/explorer-e2e/src/integration/blocks.cy.js index aeb680b73..db664b1da 100644 --- a/apps/explorer-e2e/src/integration/blocks.cy.js +++ b/apps/explorer-e2e/src/integration/blocks.cy.js @@ -1,33 +1,27 @@ context('Blocks page', { tags: '@regression' }, function () { - before('visit token home page', function () { - cy.visit('/'); - }); - describe('Verify elements on page', function () { - const blockNavigation = 'a[href="/blocks"]'; + beforeEach(() => { + cy.visit('/blocks'); + }); const blockHeight = '[data-testid="block-height"]'; const blockTime = '[data-testid="block-time"]'; const blockHeader = '[data-testid="block-header"]'; const previousBlockBtn = '[data-testid="previous-block"]'; const infiniteScrollWrapper = '[data-testid="infinite-scroll-wrapper"]'; - beforeEach('navigate to blocks page', function () { - cy.get(blockNavigation).click(); - }); - it('Blocks page is displayed', function () { validateBlocksDisplayed(); }); it('Blocks page is displayed on mobile', function () { - cy.common_switch_to_mobile_and_click_toggle(); - cy.get(blockNavigation).click(); + cy.switchToMobile(); validateBlocksDisplayed(); }); it('Block validator page is displayed', function () { waitForBlocksResponse(); - cy.get(blockHeight).eq(0).click(); + cy.get(blockHeight).eq(0).find('a').click({ force: true }); + cy.get('[data-testid="block-validator"]').should('not.be.empty'); cy.get(blockTime).should('not.be.empty'); //TODO: Add assertion for transactions when txs are added @@ -35,7 +29,7 @@ context('Blocks page', { tags: '@regression' }, function () { it('Navigate to previous block', function () { waitForBlocksResponse(); - cy.get(blockHeight).eq(0).click(); + cy.get(blockHeight).eq(0).find('a').click({ force: true }); cy.get(blockHeader) .invoke('text') .then(($blockHeaderTxt) => { diff --git a/apps/explorer-e2e/src/integration/network.cy.js b/apps/explorer-e2e/src/integration/network.cy.js index cea6b65f9..2de12f213 100644 --- a/apps/explorer-e2e/src/integration/network.cy.js +++ b/apps/explorer-e2e/src/integration/network.cy.js @@ -2,17 +2,14 @@ context('Network parameters page', { tags: '@smoke' }, function () { before('navigate to network parameter page', function () { cy.fixture('net_parameter_format_lookup').as('networkParameterFormat'); }); - describe('Verify elements on page', function () { - const networkParametersNavigation = 'a[href="/network-parameters"]'; + beforeEach(() => { + cy.visit('/network-parameters'); + }); + const networkParametersHeader = '[data-testid="network-param-header"]'; const tableRows = '[data-testid="key-value-table-row"]'; - before('navigate to network parameter page', function () { - cy.visit('/'); - cy.get(networkParametersNavigation).click(); - }); - it('should show network parameter heading at top of page', function () { cy.get(networkParametersHeader) .should('have.text', 'Network Parameters') @@ -201,55 +198,8 @@ context('Network parameters page', { tags: '@smoke' }, function () { }); }); - it('should be able to switch network parameter page - between light and dark mode', function () { - const whiteThemeSelectedMenuOptionColor = 'rgb(255, 7, 127)'; - const whiteThemeJsonFieldBackColor = 'rgb(255, 255, 255)'; - const whiteThemeSideMenuBackgroundColor = 'rgb(255, 255, 255)'; - const darkThemeSelectedMenuOptionColor = 'rgb(215, 251, 80)'; - const darkThemeJsonFieldBackColor = 'rgb(38, 38, 38)'; - const darkThemeSideMenuBackgroundColor = 'rgb(0, 0, 0)'; - const themeSwitcher = '[data-testid="theme-switcher"]'; - const jsonFields = '.hljs'; - const sideMenuBackground = '.absolute'; - - // Engage dark mode if not already set - cy.get(sideMenuBackground) - .should('have.css', 'background-color') - .then((background_color) => { - if (background_color.includes(whiteThemeSideMenuBackgroundColor)) - cy.get(themeSwitcher).click(); - }); - - // Engage white mode - cy.get(themeSwitcher).click(); - - // White Mode - cy.get(networkParametersNavigation) - .should('have.css', 'background-color') - .and('include', whiteThemeSelectedMenuOptionColor); - cy.get(jsonFields) - .should('have.css', 'background-color') - .and('include', whiteThemeJsonFieldBackColor); - cy.get(sideMenuBackground) - .should('have.css', 'background-color') - .and('include', whiteThemeSideMenuBackgroundColor); - - // Dark Mode - cy.get(themeSwitcher).click(); - cy.get(networkParametersNavigation) - .should('have.css', 'background-color') - .and('include', darkThemeSelectedMenuOptionColor); - cy.get(jsonFields) - .should('have.css', 'background-color') - .and('include', darkThemeJsonFieldBackColor); - cy.get(sideMenuBackground) - .should('have.css', 'background-color') - .and('include', darkThemeSideMenuBackgroundColor); - }); - - it.skip('should be able to see network parameters - on mobile', function () { - cy.common_switch_to_mobile_and_click_toggle(); - cy.get(networkParametersNavigation).click(); + it('should be able to see network parameters - on mobile', function () { + cy.switchToMobile(); cy.get_network_parameters().then((network_parameters) => { network_parameters = Object.entries(network_parameters); network_parameters.forEach((network_parameter) => { diff --git a/apps/explorer/src/app/app.tsx b/apps/explorer/src/app/app.tsx index 1f292caed..8aac5da50 100644 --- a/apps/explorer/src/app/app.tsx +++ b/apps/explorer/src/app/app.tsx @@ -1,6 +1,4 @@ -import classnames from 'classnames'; import { NetworkLoader, useInitializeEnv } from '@vegaprotocol/environment'; -import { Nav } from './components/nav'; import { Header } from './components/header'; import { Main } from './components/main'; import { TendermintWebsocketProvider } from './contexts/websocket/tendermint-websocket-provider'; @@ -11,6 +9,7 @@ import { useAssetDetailsDialogStore, } from '@vegaprotocol/assets'; import { DEFAULT_CACHE_CONFIG } from '@vegaprotocol/apollo-client'; +import classNames from 'classnames'; const DialogsContainer = () => { const { isOpen, id, trigger, asJson, setOpen } = useAssetDetailsDialogStore(); @@ -25,35 +24,42 @@ const DialogsContainer = () => { ); }; -function App() { - const layoutClasses = classnames( - 'grid grid-rows-[auto_1fr_auto] grid-cols-[1fr] md:grid-rows-[auto_minmax(700px,_1fr)_auto] md:grid-cols-[300px_1fr]', - 'min-h-[100vh] mx-auto my-0', - 'border-neutral-700 dark:border-neutral-300 lg:border-l lg:border-r', - 'bg-white dark:bg-black', - 'antialiased text-black dark:text-white', - 'overflow-hidden relative' - ); +const MainnetSimAd = () => ( + +
+ Mainnet sim 2 is live! + + Come help stress test the network + +
+
+); +function App() { return ( - -
- Mainnet sim 2 is live! - - Come help stress test the network - +
+
+
+ +
+
+
+
+
+
- - -
-
-
- diff --git a/apps/explorer/src/app/components/footer/footer.tsx b/apps/explorer/src/app/components/footer/footer.tsx index ce817c809..ab1b5e755 100644 --- a/apps/explorer/src/app/components/footer/footer.tsx +++ b/apps/explorer/src/app/components/footer/footer.tsx @@ -16,7 +16,7 @@ export const Footer = () => { return ( <> -