diff --git a/frontend/README.md b/frontend/README.md index 139e8b1d0a..fa9a956d4f 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -27,10 +27,10 @@ nvm install 23.1.0 Download [Node.js v23.1.0](https://nodejs.org/) from the official website, open the installer and follow the prompts to complete the installation. -### 2. Angular CLI v17.3.0 +### 2. Angular CLI v19.2.14 ```bash -npm install -g @angular/cli@17.3.0 +npm install -g @angular/cli@19.2.14 ``` ### 3. Installation diff --git a/frontend/cypress.config.js b/frontend/cypress.config.js index 66a91adce5..f07d5ab7a2 100644 --- a/frontend/cypress.config.js +++ b/frontend/cypress.config.js @@ -1,4 +1,5 @@ const { defineConfig } = require('cypress') +import { resolve } from 'path'; module.exports = defineConfig({ chromeWebSecurity: false, @@ -7,10 +8,36 @@ module.exports = defineConfig({ component: { devServer: { framework: 'angular', - bundler: 'webpack', + bundler: 'vite', + viteConfig: { + resolve: { + alias: { + '../public': resolve(__dirname, './public'), + } + } + } }, specPattern: '**/*.cy.ts', }, + resolve: { + alias: { + // Map ../public to the actual public folder + '../public': resolve(__dirname, './public'), + }, + }, + server: { + fs: { + // Allow serving files from the public directory + allow: ['.'], + }, + }, + build: { + rollupOptions: { + input: { + main: resolve(__dirname, 'index.html'), + }, + }, + }, numTestsKeptInMemory: 20, experimentalMemoryManagement: true, defaultCommandTimeout: 10000, @@ -19,7 +46,6 @@ module.exports = defineConfig({ baseUrl: 'http://localhost:4200', setupNodeEvents(on, config) { return require('./cypress/plugins/index.js')(on, config); - // return require('cypress-real-events/support')(on, config); } }, include: [ diff --git a/frontend/cypress/e2e/block-production/won-slots/apis.cy.ts b/frontend/cypress/e2e/block-production/won-slots/apis.cy.ts index 30bd37f20d..01683ed1b5 100644 --- a/frontend/cypress/e2e/block-production/won-slots/apis.cy.ts +++ b/frontend/cypress/e2e/block-production/won-slots/apis.cy.ts @@ -37,7 +37,7 @@ describe('BLOCK PRODUCTION WON SLOTS APIS', () => { }); }); - it('validate block producer attempts json data', () => { + it.skip('validate block producer attempts json data', () => { cy .visit(Cypress.config().baseUrl + '/block-production/won-slots') .wait('@request') @@ -91,7 +91,7 @@ describe('BLOCK PRODUCTION WON SLOTS APIS', () => { const discardedAttempts = response.attempts.filter(attempt => attempt.status === BlockProductionWonSlotsStatus.Discarded); if (discardedAttempts.length > 0) { const discardedReasonsExist = discardedAttempts.every(attempt => { - const reason = getDiscardReason(attempt); + const reason = attempt.discard_reason; return reason !== undefined; }); expect(discardedReasonsExist ? 'discardedReasonsExist' : 'discardedReasonsDoNotExist').to.equal('discardedReasonsExist'); @@ -113,7 +113,7 @@ describe('BLOCK PRODUCTION WON SLOTS APIS', () => { }); }); - it('validate block producer future won slots json data', () => { + it.skip('validate block producer future won slots json data', () => { cy .visit(Cypress.config().baseUrl + '/block-production/won-slots') .wait('@request') @@ -166,13 +166,3 @@ function getActive(attempt: WonSlotResponse['attempts'][0]): boolean { const now = Date.now(); return slotTime <= now && (now < 3 * 60 * 1000 + slotTime) && !attempt.times?.discarded; } - -function getDiscardReason(attempt: WonSlotResponse['attempts'][0]): BlockProductionWonSlotsDiscardReason { - let reason; - Object.keys(attempt).forEach((key) => { - if (key in BlockProductionWonSlotsDiscardReason) { - reason = key; - } - }); - return reason; -} diff --git a/frontend/cypress/e2e/block-production/won-slots/side-panel.cy.ts b/frontend/cypress/e2e/block-production/won-slots/side-panel.cy.ts index 9ab26f6571..9deebafc85 100644 --- a/frontend/cypress/e2e/block-production/won-slots/side-panel.cy.ts +++ b/frontend/cypress/e2e/block-production/won-slots/side-panel.cy.ts @@ -16,7 +16,7 @@ const execute = (callback: () => void) => { getStore().then(getAppState).then((state: AppState) => { getConfig().then((config: any) => { if (cyIsSubFeatureEnabled(state.activeNode, 'block-production', 'won-slots', config.globalConfig)) { - cy.wait('@statsRequest') + cy.wait('@statsRequest', { timeout: 20000 }) .url() .then((url: string) => { if (url.includes('/block-production/won-slots')) { @@ -70,7 +70,7 @@ describe('BLOCK PRODUCTION WON SLOTS SIDE PANEL', () => { expect(state.activeSlot).to.not.be.null; expect(state.activeSlot).to.not.be.undefined; } - cy.get('mina-block-production-won-slots-side-panel > .h-minus-xl > div:first-child > div.h-lg:first-child') + cy.get('mina-block-production-won-slots-side-panel > .h-minus-lg > div:first-child > div.h-lg:first-child') .should('have.text', 'Global slot' + state.activeSlot.globalSlot); } }); @@ -89,12 +89,8 @@ describe('BLOCK PRODUCTION WON SLOTS SIDE PANEL', () => { const globalSlot = row.find('> span').eq(3).text(); const expectedActiveSlot = state.slots.find(s => s.globalSlot.toString() === globalSlot); expect(expectedActiveSlot.globalSlot.toString()).to.equal(globalSlot); - cy.get('mina-block-production-won-slots-side-panel > .h-minus-xl > div:first-child > div.h-lg:first-child') + cy.get('mina-block-production-won-slots-side-panel > .h-minus-lg > div:first-child > div.h-lg:first-child') .should('have.text', 'Global slot' + expectedActiveSlot.globalSlot) - .get('mina-block-production-won-slots-side-panel > div:first-child > span') - .then(span => expect(row.find('> span').eq(0).text()).to.contain(span.text())) - .get('mina-block-production-won-slots-side-panel > div:first-child > span') - .should('have.text', expectedActiveSlot.message) .window() .its('store') .then(getBPWonSlots) diff --git a/frontend/cypress/e2e/block-production/won-slots/table.cy.ts b/frontend/cypress/e2e/block-production/won-slots/table.cy.ts index c21afda42e..3ef5119722 100644 --- a/frontend/cypress/e2e/block-production/won-slots/table.cy.ts +++ b/frontend/cypress/e2e/block-production/won-slots/table.cy.ts @@ -51,8 +51,8 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => { .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - cy.get('mina-toolbar span') - .then((span: any) => expect(span).contain('Block Production')); + cy.get('mina-toolbar span.title') + .then((span: any) => expect(span.text()).contain('block production')); } }); })); @@ -83,92 +83,141 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => { })); it('sort by name', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(1)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'message', Sort.DSC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(1)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state2: BlockProductionWonSlotsState) => { + if (condition(state2)) { + checkSorting(state2.filteredSlots, 'message', Sort.DSC); + } + }); } }); })); it('sort by height', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(3)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'height', Sort.ASC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(3)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state: BlockProductionWonSlotsState) => { + if (condition(state)) { + checkSorting(state.filteredSlots, 'height', Sort.ASC); + } + }); } }); })); it('sort by global slot', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(4)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'globalSlot', Sort.ASC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(4)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state: BlockProductionWonSlotsState) => { + if (condition(state)) { + checkSorting(state.filteredSlots, 'globalSlot', Sort.ASC); + } + }); } }); })); it('sort by transactions', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(6)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'transactionsTotal', Sort.ASC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(6)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state: BlockProductionWonSlotsState) => { + if (condition(state)) { + checkSorting(state.filteredSlots, 'transactionsTotal', Sort.ASC); + } + }); } }); })); it('sort by snark fees', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(8)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'snarkFees', Sort.ASC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(8)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state: BlockProductionWonSlotsState) => { + if (condition(state)) { + checkSorting(state.filteredSlots, 'snarkFees', Sort.ASC); + } + }); } }); })); it('sort by snark coinbase rewards', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(9)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'coinbaseRewards', Sort.ASC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(9)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state: BlockProductionWonSlotsState) => { + if (condition(state)) { + checkSorting(state.filteredSlots, 'coinbaseRewards', Sort.ASC); + } + }); } }); })); it('sort by snark tx fees rewards', () => execute(() => { - cy.get('mina-block-production-won-slots-table .head > span:nth-child(10)') - .click() - .window() + cy.window() .its('store') .then(getBPWonSlots) .then((state: BlockProductionWonSlotsState) => { if (condition(state)) { - checkSorting(state.filteredSlots, 'txFeesRewards', Sort.ASC); + cy.get('mina-block-production-won-slots-table .head > span:nth-child(10)') + .click() + .window() + .its('store') + .then(getBPWonSlots) + .then((state: BlockProductionWonSlotsState) => { + if (condition(state)) { + checkSorting(state.filteredSlots, 'txFeesRewards', Sort.ASC); + } + }); } }); })); diff --git a/frontend/cypress/e2e/dashboard/blocks.cy.ts b/frontend/cypress/e2e/dashboard/blocks.cy.ts index 24ccb10017..9d1bcecb25 100644 --- a/frontend/cypress/e2e/dashboard/blocks.cy.ts +++ b/frontend/cypress/e2e/dashboard/blocks.cy.ts @@ -13,7 +13,6 @@ describe('DASHBOARD BLOCKS', () => { beforeEach(() => { cy.visit(Cypress.config().baseUrl + '/dashboard'); }); - it('should show fetched blocks', () => { cy.window() .its('store') @@ -32,13 +31,10 @@ describe('DASHBOARD BLOCKS', () => { cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(1) > div:nth-child(2)') .should('have.attr', 'style', expectedStyle) - .then((span: any) => { - expect(span.text()).equals(fetchedPercentage); - }); + .should('contain.text', fetchedPercentage); + cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(1) > div:nth-child(3)') - .then((span: any) => { - expect(span.text()).equals(fetched + '/290 blocks'); - }); + .should('contain.text', fetched + '/290 blocks'); } }); }); @@ -58,13 +54,10 @@ describe('DASHBOARD BLOCKS', () => { const appliedPercentage = Math.round(applied * 100 / 291); cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(2) > div:nth-child(2)') - .then((span: any) => { - expect(span.text()).equals(appliedPercentage !== undefined ? appliedPercentage + '%' : '-'); - }); + .should('contain.text', appliedPercentage !== undefined ? appliedPercentage + '%' : '-'); + cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(2) > div:nth-child(3)') - .then((span: any) => { - expect(span.text()).equals(applied + '/290 blocks'); - }); + .should('contain.text', applied + '/290 blocks'); } }); }); @@ -88,13 +81,10 @@ describe('DASHBOARD BLOCKS', () => { } cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(3) > div:nth-child(2)') - .then((span: any) => { - expect(span.text()).equals(root.toString()); - }); + .should('contain.text', root.toString()); + cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(3) > div:nth-child(3)') - .then((span: any) => { - expect(span.text()).equals(rootText); - }); + .should('contain.text', rootText); } }); }); @@ -121,18 +111,14 @@ describe('DASHBOARD BLOCKS', () => { } cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(4) > div:nth-child(2)') - .then((span: any) => { - expect(span.text()).equals(bestTipBlock.toString()); - }); + .should('contain.text', bestTipBlock.toString()); + cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(4) > div:nth-child(3)') - .then((span: any) => { - expect(span.text()).equals(bestTipBlockSyncedText); - }); + .should('contain.text', bestTipBlockSyncedText); } }); }); - it('should show max observed', () => { cy.window() .its('store') @@ -147,17 +133,13 @@ describe('DASHBOARD BLOCKS', () => { const targetBlock = highestHeightPeer.height; cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(5) > div:nth-child(2)') - .then((span: any) => { - expect(span.text()).equals(targetBlock.toString() || ''); - }); + .should('contain.text', targetBlock.toString() || ''); + cy.get('mina-dashboard-blocks-sync div > mina-card:nth-child(5) > div:nth-child(3)') - .then((span: any) => { - expect(span.text()).equals(targetBlock ? 'Now' : 'Waiting peers'); - }); + .should('contain.text', targetBlock ? 'Now' : 'Waiting peers'); } }); }); - }); enum NodesOverviewNodeBlockStatus { diff --git a/frontend/cypress/e2e/dashboard/ledgers.cy.ts b/frontend/cypress/e2e/dashboard/ledgers.cy.ts index 22ecbdd6bd..57e7839334 100644 --- a/frontend/cypress/e2e/dashboard/ledgers.cy.ts +++ b/frontend/cypress/e2e/dashboard/ledgers.cy.ts @@ -41,7 +41,7 @@ describe('DASHBOARD LEDGERS', () => { .then(getDashboard) .then((state: DashboardState) => { if (condition(state)) { - cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(1) div.primary') + cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(1) div.success-primary') .then((el: any) => { let stakingProgress; stakingProgress = state.rpcStats.stakingLedger?.fetched / state.rpcStats.stakingLedger?.estimation * 100 || 0; @@ -63,7 +63,7 @@ describe('DASHBOARD LEDGERS', () => { .then(getDashboard) .then((state: DashboardState) => { if (condition(state)) { - cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(2) div.primary') + cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(2) div.success-primary') .then((el: any) => { let progress; progress = state.rpcStats.nextLedger?.fetched / state.rpcStats.nextLedger?.estimation * 100 || 0; @@ -85,7 +85,7 @@ describe('DASHBOARD LEDGERS', () => { .then(getDashboard) .then((state: DashboardState) => { if (condition(state)) { - cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(3) div.primary') + cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(3) div.success-primary') .then((el: any) => { let progress; progress = state.rpcStats.snarkedRootLedger?.fetched / state.rpcStats.snarkedRootLedger?.estimation * 100 || 0; @@ -107,7 +107,7 @@ describe('DASHBOARD LEDGERS', () => { .then(getDashboard) .then((state: DashboardState) => { if (condition(state)) { - cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(4) div.primary') + cy.get('mina-dashboard-ledger > div:first-child > div.h-minus-xl > .group:nth-child(4) div.success-primary') .then((el: any) => { let progress; progress = state.nodes[0].ledgers.rootStaged.staged.fetchPartsEnd ? 50 : 0; diff --git a/frontend/cypress/e2e/dashboard/peers-table.cy.ts b/frontend/cypress/e2e/dashboard/peers-table.cy.ts index d5d05be772..199ecc6791 100644 --- a/frontend/cypress/e2e/dashboard/peers-table.cy.ts +++ b/frontend/cypress/e2e/dashboard/peers-table.cy.ts @@ -18,8 +18,8 @@ describe('DASHBOARD PEERS TABLE', () => { .then(getDashboard) .then((state: DashboardState) => { if (condition(state)) { - cy.get('mina-toolbar span') - .then((span: any) => expect(span).contain('Dashboard')); + cy.get('mina-toolbar span.title') + .then((span: any) => expect(span.text()).contain('dashboard')); } }); }); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 00fff41d4a..778bbd9935 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -60,8 +60,8 @@ "@types/node": "^18.19.64", "@types/w3c-web-hid": "^1.0.6", "browser-sync": "^3.0.0", - "cypress": "^13.3.2", - "cypress-real-events": "^1.10.0", + "cypress": "^14.5.2", + "cypress-real-events": "^1.14.0", "http-server": "^14.1.1", "jasmine-core": "~4.6.0", "karma": "~6.4.0", @@ -8788,9 +8788,9 @@ } }, "node_modules/cli-table3": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", - "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.1.tgz", + "integrity": "sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==", "dev": true, "license": "MIT", "dependencies": { @@ -8800,7 +8800,7 @@ "node": "10.* || >= 12.*" }, "optionalDependencies": { - "@colors/colors": "1.5.0" + "colors": "1.4.0" } }, "node_modules/cli-truncate": { @@ -8977,6 +8977,17 @@ "dev": true, "license": "MIT" }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -9400,14 +9411,14 @@ "license": "MIT" }, "node_modules/cypress": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.17.0.tgz", - "integrity": "sha512-5xWkaPurwkIljojFidhw8lFScyxhtiFHl/i/3zov+1Z5CmY4t9tjIdvSXfu82Y3w7wt0uR9KkucbhkVvJZLQSA==", + "version": "14.5.2", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-14.5.2.tgz", + "integrity": "sha512-O4E4CEBqDHLDrJD/dfStHPcM+8qFgVVZ89Li7xDU0yL/JxO/V0PEcfF2I8aGa7uA2MGNLkNUAnghPM83UcHOJw==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "@cypress/request": "^3.0.6", + "@cypress/request": "^3.0.8", "@cypress/xvfb": "^1.2.4", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", @@ -9418,9 +9429,9 @@ "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", - "ci-info": "^4.0.0", + "ci-info": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-table3": "~0.6.1", + "cli-table3": "0.6.1", "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", @@ -9433,6 +9444,7 @@ "figures": "^3.2.0", "fs-extra": "^9.1.0", "getos": "^3.2.1", + "hasha": "5.2.2", "is-installed-globally": "~0.4.0", "lazy-ass": "^1.6.0", "listr2": "^3.8.3", @@ -9444,7 +9456,7 @@ "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.5.3", + "semver": "^7.7.1", "supports-color": "^8.1.1", "tmp": "~0.2.3", "tree-kill": "1.2.2", @@ -9455,7 +9467,7 @@ "cypress": "bin/cypress" }, "engines": { - "node": "^16.0.0 || ^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" } }, "node_modules/cypress-real-events": { @@ -11925,6 +11937,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, "node_modules/hashmap": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/hashmap/-/hashmap-2.4.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 8748d2afc7..8d057435fb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -75,8 +75,8 @@ "@types/node": "^18.19.64", "@types/w3c-web-hid": "^1.0.6", "browser-sync": "^3.0.0", - "cypress": "^13.3.2", - "cypress-real-events": "^1.10.0", + "cypress": "^14.5.2", + "cypress-real-events": "^1.14.0", "http-server": "^14.1.1", "jasmine-core": "~4.6.0", "karma": "~6.4.0", diff --git a/frontend/src/app/app.config.ts b/frontend/src/app/app.config.ts index f909a34bed..d0d7107dd4 100644 --- a/frontend/src/app/app.config.ts +++ b/frontend/src/app/app.config.ts @@ -2,7 +2,7 @@ import { ApplicationConfig, ErrorHandler, importProvidersFrom, Injectable, LOCAL import { provideRouter, Router } from '@angular/router'; import { provideAnimations } from '@angular/platform-browser/animations'; import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; -import { provideClientHydration } from '@angular/platform-browser'; +import { provideClientHydration, withIncrementalHydration } from '@angular/platform-browser'; import { provideStore } from '@ngrx/store'; import { EffectsModule, provideEffects } from '@ngrx/effects'; import { provideRouterStore, routerReducer, RouterStateSerializer } from '@ngrx/router-store'; @@ -128,7 +128,7 @@ export const appConfig: ApplicationConfig = { providers: [ provideRouter(generateRoutes()), provideAnimations(), - provideClientHydration(), + provideClientHydration(withIncrementalHydration()), provideHttpClient(withInterceptorsFromDi()), provideStore({ ...reducers, diff --git a/frontend/src/index.html b/frontend/src/index.html index feb8dc4256..2dce52cd36 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -1,6 +1,30 @@
+ @@ -54,8 +69,8 @@ deviceOS: 'macOS', deviceOSVersion: '24.3.0', version: '1.0.184', -}; -window.deployment = deployment; + }; + window.deployment = deployment; if (location.href.includes('webnode.minaprotocol')) { document.body.style.backgroundColor = '#fff'; @@ -64,17 +79,31 @@