Merge branch 'master' into knorrium/refactor_cypress_gha
This commit is contained in:
		
						commit
						1244eac03c
					
				@ -35,21 +35,23 @@ const getRectangle = ($el) => $el[0].getBoundingClientRect();
 | 
			
		||||
describe('Mainnet', () => {
 | 
			
		||||
  beforeEach(() => {
 | 
			
		||||
    //cy.intercept('/sockjs-node/info*').as('socket');
 | 
			
		||||
    cy.intercept('/api/block-height/*').as('block-height');
 | 
			
		||||
    cy.intercept('/api/block/*').as('block');
 | 
			
		||||
    cy.intercept('/api/block/*/txs/0').as('block-txs');
 | 
			
		||||
    cy.intercept('/api/tx/*/outspends').as('tx-outspends');
 | 
			
		||||
    cy.intercept('/resources/pools.json').as('pools');
 | 
			
		||||
    // cy.intercept('/api/block-height/*').as('block-height');
 | 
			
		||||
    // cy.intercept('/api/v1/block/*').as('block');
 | 
			
		||||
    // cy.intercept('/api/block/*/txs/0').as('block-txs');
 | 
			
		||||
    // cy.intercept('/api/v1/block/*/summary').as('block-summary');
 | 
			
		||||
    // cy.intercept('/api/v1/outspends/*').as('outspends');
 | 
			
		||||
    // cy.intercept('/api/tx/*/outspends').as('tx-outspends');
 | 
			
		||||
    // cy.intercept('/resources/pools.json').as('pools');
 | 
			
		||||
 | 
			
		||||
    // Search Auto Complete
 | 
			
		||||
    cy.intercept('/api/address-prefix/1wiz').as('search-1wiz');
 | 
			
		||||
    cy.intercept('/api/address-prefix/1wizS').as('search-1wizS');
 | 
			
		||||
    cy.intercept('/api/address-prefix/1wizSA').as('search-1wizSA');
 | 
			
		||||
 | 
			
		||||
    Cypress.Commands.add('waitForBlockData', () => {
 | 
			
		||||
      cy.wait('@tx-outspends');
 | 
			
		||||
      cy.wait('@pools');
 | 
			
		||||
    });
 | 
			
		||||
    // Cypress.Commands.add('waitForBlockData', () => {
 | 
			
		||||
    //   cy.wait('@tx-outspends');
 | 
			
		||||
    //   cy.wait('@pools');
 | 
			
		||||
    // });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  if (baseModule === 'mempool') {
 | 
			
		||||
@ -409,7 +411,7 @@ describe('Mainnet', () => {
 | 
			
		||||
 | 
			
		||||
    it('loads the tv screen - desktop', () => {
 | 
			
		||||
      cy.viewport('macbook-16');
 | 
			
		||||
      cy.visit('/');
 | 
			
		||||
      cy.visit('/graphs/mempool');
 | 
			
		||||
      cy.waitForSkeletonGone();
 | 
			
		||||
      cy.get('#btn-tv').click().then(() => {
 | 
			
		||||
        cy.viewport('macbook-16');
 | 
			
		||||
 | 
			
		||||
@ -60,10 +60,10 @@ describe('Signet', () => {
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    describe('tv mode', () => {
 | 
			
		||||
    describe.skip('tv mode', () => {
 | 
			
		||||
      it('loads the tv screen - desktop', () => {
 | 
			
		||||
        cy.viewport('macbook-16');
 | 
			
		||||
        cy.visit('/signet');
 | 
			
		||||
        cy.visit('/signet/graphs');
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
        cy.get('#btn-tv').click().then(() => {
 | 
			
		||||
          cy.get('.chart-holder').should('be.visible');
 | 
			
		||||
@ -73,19 +73,17 @@ describe('Signet', () => {
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('loads the tv screen - mobile', () => {
 | 
			
		||||
        cy.visit('/signet');
 | 
			
		||||
        cy.visit('/signet/graphs');
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
        cy.get('#btn-tv').click().then(() => {
 | 
			
		||||
          cy.viewport('iphone-8');
 | 
			
		||||
          cy.get('.chart-holder').should('be.visible');
 | 
			
		||||
          cy.get('.tv-only').should('not.exist');
 | 
			
		||||
          //TODO: Remove comment when the bug is fixed
 | 
			
		||||
          //cy.get('#mempool-block-0').should('be.visible');
 | 
			
		||||
          cy.get('#mempool-block-0').should('be.visible');
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    it('loads the api screen', () => {
 | 
			
		||||
      cy.visit('/signet');
 | 
			
		||||
      cy.waitForSkeletonGone();
 | 
			
		||||
 | 
			
		||||
@ -63,18 +63,17 @@ describe('Testnet', () => {
 | 
			
		||||
    describe('tv mode', () => {
 | 
			
		||||
      it('loads the tv screen - desktop', () => {
 | 
			
		||||
        cy.viewport('macbook-16');
 | 
			
		||||
        cy.visit('/testnet');
 | 
			
		||||
        cy.visit('/testnet/graphs');
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
        cy.get('#btn-tv').click().then(() => {
 | 
			
		||||
          cy.wait(1000);
 | 
			
		||||
          cy.get('.tv-only').should('not.exist');
 | 
			
		||||
          //TODO: Remove comment when the bug is fixed
 | 
			
		||||
          //cy.get('#mempool-block-0').should('be.visible');
 | 
			
		||||
          cy.get('#mempool-block-0').should('be.visible');
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it('loads the tv screen - mobile', () => {
 | 
			
		||||
        cy.visit('/testnet');
 | 
			
		||||
        cy.visit('/testnet/graphs');
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
        cy.get('#btn-tv').click().then(() => {
 | 
			
		||||
          cy.viewport('iphone-6');
 | 
			
		||||
 | 
			
		||||
@ -1,12 +1,12 @@
 | 
			
		||||
<ng-container *ngIf="{ val: network$ | async } as network">
 | 
			
		||||
<header>
 | 
			
		||||
  <nav class="navbar navbar-expand-md navbar-dark bg-dark">
 | 
			
		||||
  <a class="navbar-brand" [routerLink]="['/' | relativeUrl]">
 | 
			
		||||
  <ng-template [ngIf]="subdomain">
 | 
			
		||||
    <div class="subdomain_container">
 | 
			
		||||
      <img [src]="'/api/v1/enterprise/images/' + subdomain + '/logo'" class="subdomain_logo">
 | 
			
		||||
    </div>
 | 
			
		||||
  </ng-template>
 | 
			
		||||
  <a class="navbar-brand" [routerLink]="['/' | relativeUrl]" style="position: relative;">
 | 
			
		||||
    <ng-container *ngIf="{ val: connectionState$ | async } as connectionState">
 | 
			
		||||
      <img *ngIf="!officialMempoolSpace" src="/resources/mempool-logo.png" height="35" width="140" class="logo" [ngStyle]="{'opacity': connectionState.val === 2 ? 1 : 0.5 }" alt="The Mempool Open Source Project logo">
 | 
			
		||||
      <app-svg-images *ngIf="officialMempoolSpace" name="officialMempoolSpace" style="width: 140px; height: 35px" width="500" height="126" viewBox="0 0 500 126"></app-svg-images>
 | 
			
		||||
 | 
			
		||||
@ -68,10 +68,6 @@ li.nav-item {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-brand {
 | 
			
		||||
  width: 60%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar {
 | 
			
		||||
  .dropdown {
 | 
			
		||||
    .dropdown-toggle {
 | 
			
		||||
@ -80,10 +76,8 @@ li.nav-item {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media (min-width: 576px) {
 | 
			
		||||
  .navbar-brand {
 | 
			
		||||
    width: 140px;
 | 
			
		||||
  }
 | 
			
		||||
.navbar-brand {
 | 
			
		||||
  position: relative;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
nav {
 | 
			
		||||
@ -93,8 +87,7 @@ nav {
 | 
			
		||||
.connection-badge {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  top: 13px;
 | 
			
		||||
  left: 0px;
 | 
			
		||||
  width: 140px;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.badge {
 | 
			
		||||
@ -150,6 +143,7 @@ nav {
 | 
			
		||||
  max-height: 45px;
 | 
			
		||||
  max-width: 140px;
 | 
			
		||||
  margin: auto;
 | 
			
		||||
  align-self: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.subdomain_container {
 | 
			
		||||
@ -157,3 +151,13 @@ nav {
 | 
			
		||||
  margin-right: 15px;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.logo-holder {
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: row;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.navbar-brand {
 | 
			
		||||
  flex-direction: row;
 | 
			
		||||
  display: flex;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -14,7 +14,7 @@
 | 
			
		||||
            [class]="stateService.env.MINING_DASHBOARD ? 'mining' : ''" (click)="saveGraphPreference()">
 | 
			
		||||
            <div *ngIf="!isMobile()" class="btn-group btn-group-toggle">
 | 
			
		||||
              <label ngbButtonLabel class="btn-primary btn-sm mr-2">
 | 
			
		||||
                <a [routerLink]="['/tv' | relativeUrl]" style="color: white">
 | 
			
		||||
                <a [routerLink]="['/tv' | relativeUrl]" style="color: white" id="btn-tv">
 | 
			
		||||
                  <fa-icon [icon]="['fas', 'tv']" [fixedWidth]="true" i18n-title="master-page.tvview" title="TV view"></fa-icon>
 | 
			
		||||
                </a>
 | 
			
		||||
                </label>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user