mirror of
https://github.com/mempool/mempool.git
synced 2025-03-15 04:11:48 +01:00
Update tests - Replace button click blocks -> pools
This commit is contained in:
parent
647f12ffaa
commit
73019b485f
3 changed files with 100 additions and 4 deletions
|
@ -274,6 +274,102 @@ describe('Mainnet', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
it('loads skeleton when changes between networks', () => {
|
||||||
|
cy.visit('/');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
|
||||||
|
cy.changeNetwork("testnet");
|
||||||
|
cy.changeNetwork("signet");
|
||||||
|
cy.changeNetwork("mainnet");
|
||||||
|
});
|
||||||
|
|
||||||
|
it.skip('loads the dashboard with the skeleton blocks', () => {
|
||||||
|
cy.mockMempoolSocket();
|
||||||
|
cy.visit("/");
|
||||||
|
cy.get(':nth-child(1) > #bitcoin-block-0').should('be.visible');
|
||||||
|
cy.get(':nth-child(2) > #bitcoin-block-0').should('be.visible');
|
||||||
|
cy.get(':nth-child(3) > #bitcoin-block-0').should('be.visible');
|
||||||
|
cy.get('#mempool-block-0').should('be.visible');
|
||||||
|
cy.get('#mempool-block-1').should('be.visible');
|
||||||
|
cy.get('#mempool-block-2').should('be.visible');
|
||||||
|
|
||||||
|
emitMempoolInfo({
|
||||||
|
'params': {
|
||||||
|
command: 'init'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.get(':nth-child(1) > #bitcoin-block-0').should('not.exist');
|
||||||
|
cy.get(':nth-child(2) > #bitcoin-block-0').should('not.exist');
|
||||||
|
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('loads the pools screen', () => {
|
||||||
|
cy.visit('/');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('#btn-pools').click().then(() => {
|
||||||
|
cy.waitForPageIdle();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('loads the graphs screen', () => {
|
||||||
|
cy.visit('/');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('#btn-graphs').click().then(() => {
|
||||||
|
cy.wait(1000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('graphs page', () => {
|
||||||
|
it('check buttons - mobile', () => {
|
||||||
|
cy.viewport('iphone-6');
|
||||||
|
cy.visit('/graphs');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('.small-buttons > :nth-child(2)').should('be.visible');
|
||||||
|
cy.get('#dropdownFees').should('be.visible');
|
||||||
|
cy.get('.btn-group').should('be.visible');
|
||||||
|
});
|
||||||
|
it('check buttons - tablet', () => {
|
||||||
|
cy.viewport('ipad-2');
|
||||||
|
cy.visit('/graphs');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('.small-buttons > :nth-child(2)').should('be.visible');
|
||||||
|
cy.get('#dropdownFees').should('be.visible');
|
||||||
|
cy.get('.btn-group').should('be.visible');
|
||||||
|
});
|
||||||
|
it('check buttons - desktop', () => {
|
||||||
|
cy.viewport('macbook-16');
|
||||||
|
cy.visit('/graphs');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('.small-buttons > :nth-child(2)').should('be.visible');
|
||||||
|
cy.get('#dropdownFees').should('be.visible');
|
||||||
|
cy.get('.btn-group').should('be.visible');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('loads the tv screen - desktop', () => {
|
||||||
|
cy.viewport('macbook-16');
|
||||||
|
cy.visit('/');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('#btn-tv').click().then(() => {
|
||||||
|
cy.viewport('macbook-16');
|
||||||
|
cy.get('.chart-holder');
|
||||||
|
cy.get('.blockchain-wrapper').should('be.visible');
|
||||||
|
cy.get('#mempool-block-0').should('be.visible');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('loads the tv screen - mobile', () => {
|
||||||
|
cy.viewport('iphone-6');
|
||||||
|
cy.visit('/tv');
|
||||||
|
cy.waitForSkeletonGone();
|
||||||
|
cy.get('.chart-holder');
|
||||||
|
cy.get('.blockchain-wrapper').should('not.visible');
|
||||||
|
});
|
||||||
|
|
||||||
it('loads genesis block and click on the arrow left', () => {
|
it('loads genesis block and click on the arrow left', () => {
|
||||||
cy.viewport('macbook-16');
|
cy.viewport('macbook-16');
|
||||||
|
|
|
@ -44,10 +44,10 @@ describe('Signet', () => {
|
||||||
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
|
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('loads the blocks screen', () => {
|
it('loads the pools screen', () => {
|
||||||
cy.visit('/signet');
|
cy.visit('/signet');
|
||||||
cy.waitForSkeletonGone();
|
cy.waitForSkeletonGone();
|
||||||
cy.get('#btn-blocks').click().then(() => {
|
cy.get('#btn-pools').click().then(() => {
|
||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -44,10 +44,10 @@ describe('Testnet', () => {
|
||||||
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
|
cy.get(':nth-child(3) > #bitcoin-block-0').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('loads the blocks screen', () => {
|
it('loads the pools screen', () => {
|
||||||
cy.visit('/testnet');
|
cy.visit('/testnet');
|
||||||
cy.waitForSkeletonGone();
|
cy.waitForSkeletonGone();
|
||||||
cy.get('#btn-blocks').click().then(() => {
|
cy.get('#btn-pools').click().then(() => {
|
||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue