Merge pull request #4862 from mempool/knorrium/fix_liquid_tests
Re-enable and fix Liquid tests
This commit is contained in:
commit
1bf4f9902e
@ -1,4 +1,4 @@
|
||||
describe.skip('Liquid', () => {
|
||||
describe('Liquid', () => {
|
||||
const baseModule = Cypress.env('BASE_MODULE');
|
||||
const basePath = '';
|
||||
|
||||
@ -23,6 +23,13 @@ describe.skip('Liquid', () => {
|
||||
cy.get('#mempool-block-0 > .blockLink').should('exist');
|
||||
});
|
||||
|
||||
it('load first mempool block after skeleton loads', () => {
|
||||
cy.visit(`${basePath}`);
|
||||
cy.waitForSkeletonGone();
|
||||
cy.get('#mempool-block-0 > .blockLink').click();
|
||||
cy.waitForSkeletonGone();
|
||||
});
|
||||
|
||||
it('loads the dashboard', () => {
|
||||
cy.visit(`${basePath}`);
|
||||
cy.waitForSkeletonGone();
|
||||
@ -84,10 +91,11 @@ describe.skip('Liquid', () => {
|
||||
cy.waitForSkeletonGone();
|
||||
//TODO: Change to an element id so we don't assert on a string
|
||||
cy.get('.table-tx-vin').should('contain', 'Peg-in');
|
||||
cy.get('.table-tx-vin a').click().then(() => {
|
||||
//Remove the target=_blank attribute so the new url opens in the same tab
|
||||
cy.get('.table-tx-vin a').invoke('removeAttr', 'target').click().then(() => {
|
||||
cy.waitForSkeletonGone();
|
||||
if (baseModule === 'liquid') {
|
||||
cy.url().should('eq', 'https://mempool.space/tx/f148c0d854db4174ea420655235f910543f0ec3680566dcfdf84fb0a1697b592');
|
||||
cy.url().should('eq', 'https://mempool.space/tx/f148c0d854db4174ea420655235f910543f0ec3680566dcfdf84fb0a1697b592#vout=0');
|
||||
} else {
|
||||
//TODO: Use an environment variable to get the hostname
|
||||
cy.url().should('eq', 'http://localhost:4200/tx/f148c0d854db4174ea420655235f910543f0ec3680566dcfdf84fb0a1697b592');
|
||||
@ -98,7 +106,8 @@ describe.skip('Liquid', () => {
|
||||
it('loads peg out addresses', () => {
|
||||
cy.visit(`${basePath}/tx/ecf6eba04ffb3946faa172343c87162df76f1a57b07b0d6dc6ad956b13376dc8`);
|
||||
cy.waitForSkeletonGone();
|
||||
cy.get('.table-tx-vout a').first().click().then(() => {
|
||||
//Remove the target=_blank attribute so the new url opens in the same tab
|
||||
cy.get('.table-tx-vout a').first().invoke('removeAttr', 'target').click().then(() => {
|
||||
cy.waitForSkeletonGone();
|
||||
if (baseModule === 'liquid') {
|
||||
cy.url().should('eq', 'https://mempool.space/address/1BxoGcMg14oaH3CwHD2hF4gU9VcfgX5yoR');
|
||||
|
@ -1,4 +1,4 @@
|
||||
describe.skip('Liquid Testnet', () => {
|
||||
describe('Liquid Testnet', () => {
|
||||
const baseModule = Cypress.env('BASE_MODULE');
|
||||
const basePath = '/testnet';
|
||||
|
||||
@ -28,6 +28,17 @@ describe.skip('Liquid Testnet', () => {
|
||||
cy.waitForSkeletonGone();
|
||||
});
|
||||
|
||||
it.skip('loads the dashboard with no scrollbars on mobile', () => {
|
||||
cy.viewport('iphone-xr');
|
||||
cy.visit(`${basePath}`);
|
||||
cy.waitForSkeletonGone();
|
||||
cy.window().then(window => {
|
||||
const htmlWidth = Cypress.$('html')[0].scrollWidth;
|
||||
const scrollBarWidth = window.innerWidth - htmlWidth;
|
||||
expect(scrollBarWidth).to.be.eq(0); //check for no horizontal scrollbar
|
||||
});
|
||||
});
|
||||
|
||||
it('loads the blocks page', () => {
|
||||
cy.visit(`${basePath}`)
|
||||
cy.get('#btn-blocks');
|
||||
@ -57,17 +68,14 @@ describe.skip('Liquid Testnet', () => {
|
||||
cy.get('.tv-only').should('not.exist');
|
||||
});
|
||||
|
||||
it.skip('renders unconfidential addresses correctly on mobile', () => {
|
||||
cy.viewport('iphone-6');
|
||||
cy.visit(`${basePath}/address/__TODO__`);
|
||||
it.skip('renders unconfidential transactions correctly on mobile', () => {
|
||||
cy.viewport('iphone-xr');
|
||||
cy.visit(`${basePath}/tx/b119f338878416781dc285b94c0de52826341dea43566e4de4740d3ebfd1f6dc#blinded=99707,144c654344aa716d6f3abcc1ca90e5641e4e2a7f633bc09fe3baf64585819a49,1377e4ec8eb0c89296e14ffca57e377f4b51ad8f1c881e43364434d8430dbfda,cdd6caae4c3452586cfcb107478dd2b7acaa5f82714a6a966578255e857eee60`);
|
||||
cy.waitForSkeletonGone();
|
||||
//TODO: Add proper IDs for these selectors
|
||||
const firstRowSelector = '.container-xl > :nth-child(3) > div > :nth-child(1) > .table > tbody';
|
||||
const thirdRowSelector = '.container-xl > :nth-child(3) > div > :nth-child(3)';
|
||||
cy.get(firstRowSelector).invoke('css', 'width').then(firstRowWidth => {
|
||||
cy.get(thirdRowSelector).invoke('css', 'width').then(thirdRowWidth => {
|
||||
expect(parseInt(firstRowWidth)).to.be.lessThan(parseInt(thirdRowWidth));
|
||||
});
|
||||
cy.window().then(window => {
|
||||
const htmlWidth = Cypress.$('html')[0].scrollWidth;
|
||||
const scrollBarWidth = window.innerWidth - htmlWidth;
|
||||
expect(scrollBarWidth).to.be.eq(0); //check for no horizontal scrollbar
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user