Correcting more tests.

This commit is contained in:
softsimon 2022-02-06 18:48:25 +04:00
parent 1dbae4cd62
commit b634984ca6
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 21 additions and 24 deletions

View File

@ -115,10 +115,9 @@ describe('Liquid', () => {
describe('assets', () => { describe('assets', () => {
it('shows the assets screen', () => { it('shows the assets screen', () => {
cy.visit(`${basePath}`); cy.visit(`${basePath}/assets`);
cy.get('#btn-assets');
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('table tr').should('have.length.at.least', 5); cy.get('.featuredBox .card').should('have.length.at.least', 5);
}); });
it('allows searching assets', () => { it('allows searching assets', () => {

View File

@ -76,7 +76,7 @@ describe('Liquid Testnet', () => {
it('shows the assets screen', () => { it('shows the assets screen', () => {
cy.visit(`${basePath}/assets`); cy.visit(`${basePath}/assets`);
cy.waitForSkeletonGone(); cy.waitForSkeletonGone();
cy.get('table tr').should('have.length.at.least', 5); cy.get('.featuredBox .card').should('have.length.at.least', 5);
}); });
it('allows searching assets', () => { it('allows searching assets', () => {

View File

@ -1,24 +1,22 @@
<div *ngIf="featuredAssets$ | async as featured; else loading" class="featuredBox"> <div *ngIf="featuredAssets$ | async as featured; else loading" class="featuredBox">
<div *ngFor="let group of featured"> <div class="card" *ngFor="let group of featured">
<div class="card"> <ng-template [ngIf]="group.assets" [ngIfElse]="singleAsset">
<ng-template [ngIf]="group.assets" [ngIfElse]="singleAsset"> <a [routerLink]="['/assets/asset-group', group.id]">
<a [routerLink]="['/assets/asset-group', group.id]"> <img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.assets[0] + '/icon'">
<img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.assets[0] + '/icon'"> </a>
</a> <div class="title"><a [routerLink]="['/assets/asset-group', group.id]">{{ group.name }}</a></div>
<div class="title"><a [routerLink]="['/assets/asset-group', group.id]">{{ group.name }}</a></div> <div class="sub-title" i18n>Group of {{ group.assets.length | number }} assets</div>
<div class="sub-title" i18n>Group of {{ group.assets.length | number }} assets</div> </ng-template>
</ng-template> <ng-template #singleAsset>
<ng-template #singleAsset> <a [routerLink]="['/assets/asset/', group.asset]">
<a [routerLink]="['/assets/asset/', group.asset]"> <img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.asset + '/icon'">
<img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.asset + '/icon'"> </a>
</a> <div class="title">
<div class="title"> <a [routerLink]="['/assets/asset/', group.asset]">{{ group.name }}</a>
<a [routerLink]="['/assets/asset/', group.asset]">{{ group.name }}</a> </div>
</div> <div class="ticker">{{ group.ticker }}</div>
<div class="ticker">{{ group.ticker }}</div> </ng-template>
</ng-template>
</div>
</div> </div>
</div> </div>