Fix lint errors. (#556)
This commit is contained in:
parent
1bd0c40c15
commit
0121052f0b
@ -1,52 +1,51 @@
|
|||||||
describe('Bisq', () => {
|
describe('Bisq', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
||||||
cy.intercept('/sockjs-node/info*').as('socket')
|
cy.intercept('/sockjs-node/info*').as('socket');
|
||||||
cy.intercept('/bisq/api/markets/hloc?market=btc_usd&interval=day').as('hloc')
|
cy.intercept('/bisq/api/markets/hloc?market=btc_usd&interval=day').as('hloc');
|
||||||
cy.intercept('/bisq/api/markets/ticker').as('ticker')
|
cy.intercept('/bisq/api/markets/ticker').as('ticker');
|
||||||
cy.intercept('/bisq/api/markets/markets').as('markets')
|
cy.intercept('/bisq/api/markets/markets').as('markets');
|
||||||
cy.intercept('/bisq/api/markets/volumes/7d').as('7d')
|
cy.intercept('/bisq/api/markets/volumes/7d').as('7d');
|
||||||
cy.intercept('/bisq/api/markets/trades?market=all').as('trades')
|
cy.intercept('/bisq/api/markets/trades?market=all').as('trades');
|
||||||
cy.intercept('/bisq/api/txs/*/*').as('txs')
|
cy.intercept('/bisq/api/txs/*/*').as('txs');
|
||||||
cy.intercept('/bisq/api/blocks/*/*').as('blocks')
|
cy.intercept('/bisq/api/blocks/*/*').as('blocks');
|
||||||
cy.intercept('/bisq/api/stats').as('stats')
|
cy.intercept('/bisq/api/stats').as('stats');
|
||||||
})
|
});
|
||||||
it('loads the dashboard', () => {
|
it('loads the dashboard', () => {
|
||||||
cy.visit('/bisq')
|
cy.visit('/bisq');
|
||||||
|
|
||||||
cy.wait('@socket')
|
cy.wait('@socket');
|
||||||
cy.wait('@hloc')
|
cy.wait('@hloc');
|
||||||
cy.wait('@ticker')
|
cy.wait('@ticker');
|
||||||
cy.wait('@markets')
|
cy.wait('@markets');
|
||||||
cy.wait('@7d')
|
cy.wait('@7d');
|
||||||
cy.wait('@trades')
|
cy.wait('@trades');
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the transactions screen', () => {
|
it('loads the transactions screen', () => {
|
||||||
cy.visit('/bisq')
|
cy.visit('/bisq');
|
||||||
cy.get('li:nth-of-type(2) > a').click().then(() => {
|
cy.get('li:nth-of-type(2) > a').click().then(() => {
|
||||||
cy.wait('@txs')
|
cy.wait('@txs');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
it('loads the blocks screen', () => {
|
it('loads the blocks screen', () => {
|
||||||
cy.visit('/bisq')
|
cy.visit('/bisq');
|
||||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||||
cy.wait('@blocks')
|
cy.wait('@blocks');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
it('loads the stats screen', () => {
|
it('loads the stats screen', () => {
|
||||||
cy.visit('/bisq')
|
cy.visit('/bisq');
|
||||||
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
||||||
cy.wait('@stats')
|
cy.wait('@stats');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the api screen', () => {
|
it('loads the api screen', () => {
|
||||||
cy.visit('/bisq')
|
cy.visit('/bisq');
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
@ -1,81 +1,81 @@
|
|||||||
describe('Liquid', () => {
|
describe('Liquid', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
//TODO: Fix ng serve to deliver these files
|
// TODO: Fix ng serve to deliver these files
|
||||||
cy.fixture('assets.minimal').then((json) => {
|
cy.fixture('assets.minimal').then((json) => {
|
||||||
cy.intercept('/resources/assets.minimal.json', json)
|
cy.intercept('/resources/assets.minimal.json', json);
|
||||||
})
|
});
|
||||||
|
|
||||||
cy.fixture('assets').then((json) => {
|
cy.fixture('assets').then((json) => {
|
||||||
cy.intercept('/resources/assets.json', json)
|
cy.intercept('/resources/assets.json', json);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the dashboard', () => {
|
it('loads the dashboard', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the blocks page', () => {
|
it('loads the blocks page', () => {
|
||||||
cy.visit('/liquid/blocks')
|
cy.visit('/liquid/blocks');
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads a specific block page', () => {
|
it('loads a specific block page', () => {
|
||||||
cy.visit('/liquid/blocks')
|
cy.visit('/liquid/blocks');
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the graphs page', () => {
|
it('loads the graphs page', () => {
|
||||||
cy.visit('/liquid/graphs')
|
cy.visit('/liquid/graphs');
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the tv page - desktop', () => {
|
it('loads the tv page - desktop', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the graphs page - mobile', () => {
|
it('loads the graphs page - mobile', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||||
cy.viewport('iphone-6')
|
cy.viewport('iphone-6');
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
//TODO: Should we really support TV Mode in Mobile for Bisq?
|
// TODO: Should we really support TV Mode in Mobile for Bisq?
|
||||||
//cy.get('.tv-only').should('be.visible')
|
// cy.get('.tv-only').should('be.visible')
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
describe('assets', () => {
|
describe('assets', () => {
|
||||||
it('shows the assets screen', () => {
|
it('shows the assets screen', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
cy.get('table tr').should('have.length', 5)
|
cy.get('table tr').should('have.length', 5);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('allows searching assets', () => {
|
it('allows searching assets', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
|
cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
|
||||||
cy.get('table tr').should('have.length', 1)
|
cy.get('table tr').should('have.length', 1);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('shows a specific asset ID', () => {
|
it('shows a specific asset ID', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
|
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
|
||||||
cy.get('table tr td:nth-of-type(4) a').click()
|
cy.get('table tr td:nth-of-type(4) a').click();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('shows a specific asset issuance TX', () => {
|
it('shows a specific asset issuance TX', () => {
|
||||||
cy.visit('/liquid')
|
cy.visit('/liquid');
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
|
cy.get('.container-xl input').click().type('Liquid CAD').then(() => {
|
||||||
cy.get('table tr td:nth-of-type(5) a').click()
|
cy.get('table tr td:nth-of-type(5) a').click();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
@ -1,98 +1,97 @@
|
|||||||
describe('Mainnet', () => {
|
describe('Mainnet', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.intercept('/api/block-height/*').as('block-height')
|
cy.intercept('/api/block-height/*').as('block-height');
|
||||||
cy.intercept('/api/block/*').as('block')
|
cy.intercept('/api/block/*').as('block');
|
||||||
cy.intercept('/api/block/*/txs/0').as('block-txs')
|
cy.intercept('/api/block/*/txs/0').as('block-txs');
|
||||||
cy.intercept('/api/tx/*/outspends').as('tx-outspends')
|
cy.intercept('/api/tx/*/outspends').as('tx-outspends');
|
||||||
|
|
||||||
//TODO: Fix ng serve to deliver this file
|
// TODO: Fix ng serve to deliver this file
|
||||||
cy.fixture('pools').then((json) => {
|
cy.fixture('pools').then((json) => {
|
||||||
cy.intercept('/resources/pools.json', json)
|
cy.intercept('/resources/pools.json', json);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the dashboard', () => {
|
it('loads the dashboard', () => {
|
||||||
cy.visit('/')
|
cy.visit('/');
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the blocks screen', () => {
|
it('loads the blocks screen', () => {
|
||||||
cy.visit('/')
|
cy.visit('/');
|
||||||
cy.get('li:nth-of-type(2) > a').click().then(() => {
|
cy.get('li:nth-of-type(2) > a').click().then(() => {
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the graphs screen', () => {
|
it('loads the graphs screen', () => {
|
||||||
cy.visit('/')
|
cy.visit('/');
|
||||||
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
cy.get('li:nth-of-type(3) > a').click().then(() => {
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
describe('tv mode', () => {
|
describe('tv mode', () => {
|
||||||
it('loads the tv screen - desktop', () => {
|
it('loads the tv screen - desktop', () => {
|
||||||
cy.viewport('macbook-16')
|
cy.viewport('macbook-16');
|
||||||
cy.visit('/')
|
cy.visit('/');
|
||||||
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
cy.get('.tv-only').should('not.be.visible')
|
cy.get('.tv-only').should('not.be.visible');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('loads the tv screen - mobile', () => {
|
it('loads the tv screen - mobile', () => {
|
||||||
cy.visit('/')
|
cy.visit('/');
|
||||||
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
cy.get('li:nth-of-type(4) > a').click().then(() => {
|
||||||
cy.viewport('iphone-6')
|
cy.viewport('iphone-6');
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
cy.get('.tv-only').should('be.visible')
|
cy.get('.tv-only').should('be.visible');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
it('loads the api screen', () => {
|
it('loads the api screen', () => {
|
||||||
cy.visit('/')
|
cy.visit('/');
|
||||||
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
cy.get('li:nth-of-type(5) > a').click().then(() => {
|
||||||
cy.wait(1000)
|
cy.wait(1000);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
describe('blocks', () => {
|
describe('blocks', () => {
|
||||||
it('shows empty blocks properly', () => {
|
it('shows empty blocks properly', () => {
|
||||||
cy.visit('/block/0000000000000000000bd14f744ef2e006e61c32214670de7eb891a5732ee775')
|
cy.visit('/block/0000000000000000000bd14f744ef2e006e61c32214670de7eb891a5732ee775');
|
||||||
cy.get('h2').invoke('text').should('equal', '1 transaction')
|
cy.get('h2').invoke('text').should('equal', '1 transaction');
|
||||||
})
|
});
|
||||||
|
|
||||||
it('expands and collapses the block details', () => {
|
it('expands and collapses the block details', () => {
|
||||||
cy.visit('/block/0')
|
cy.visit('/block/0');
|
||||||
cy.wait('@tx-outspends')
|
cy.wait('@tx-outspends');
|
||||||
cy.get('.btn.btn-outline-info').click().then(() => {
|
cy.get('.btn.btn-outline-info').click().then(() => {
|
||||||
cy.get('#details').should('be.visible');
|
cy.get('#details').should('be.visible');
|
||||||
})
|
});
|
||||||
|
|
||||||
cy.get('.btn.btn-outline-info').click().then(() => {
|
cy.get('.btn.btn-outline-info').click().then(() => {
|
||||||
cy.get('#details').should('not.be.visible');
|
cy.get('#details').should('not.be.visible');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
it('shows blocks with no pagination', () => {
|
it('shows blocks with no pagination', () => {
|
||||||
cy.visit('/block/00000000000000000001ba40caf1ad4cec0ceb77692662315c151953bfd7c4c4')
|
cy.visit('/block/00000000000000000001ba40caf1ad4cec0ceb77692662315c151953bfd7c4c4');
|
||||||
cy.get('h2').invoke('text').should('equal', '19 transactions')
|
cy.get('h2').invoke('text').should('equal', '19 transactions');
|
||||||
cy.get('ul.pagination').first().children().should('have.length', 5)
|
cy.get('ul.pagination').first().children().should('have.length', 5);
|
||||||
})
|
});
|
||||||
|
|
||||||
it('supports pagination on the block screen', () => {
|
it('supports pagination on the block screen', () => {
|
||||||
//41 txs
|
// 41 txs
|
||||||
cy.visit('/block/00000000000000000009f9b7b0f63ad50053ad12ec3b7f5ca951332f134f83d8')
|
cy.visit('/block/00000000000000000009f9b7b0f63ad50053ad12ec3b7f5ca951332f134f83d8');
|
||||||
cy.get('.header-bg.box > a').invoke('text').then((text1) => {
|
cy.get('.header-bg.box > a').invoke('text').then((text1) => {
|
||||||
cy.get('.active + li').first().click().then(() => {
|
cy.get('.active + li').first().click().then(() => {
|
||||||
cy.get('.header-bg.box > a').invoke('text').then((text2) => {
|
cy.get('.header-bg.box > a').invoke('text').then((text2) => {
|
||||||
expect(text1).not.to.eq(text2)
|
expect(text1).not.to.eq(text2);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
describe('Signet', () => {
|
describe('Signet', () => {
|
||||||
it('loads the dashboard', () => {
|
it('loads the dashboard', () => {
|
||||||
cy.visit('/signet')
|
cy.visit('/signet');
|
||||||
})
|
});
|
||||||
|
|
||||||
it.skip('loads all the pages properly', () => {
|
it.skip('loads all the pages properly', () => {
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
describe('Testnet', () => {
|
describe('Testnet', () => {
|
||||||
it('loads the dashboard', () => {
|
it('loads the dashboard', () => {
|
||||||
cy.visit('/testnet')
|
cy.visit('/testnet');
|
||||||
})
|
});
|
||||||
|
|
||||||
it.skip('loads all the pages properly', () => {
|
it.skip('loads all the pages properly', () => {
|
||||||
|
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user