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', () => {
it('shows the assets screen', () => {
cy.visit(`${basePath}`);
cy.get('#btn-assets');
cy.visit(`${basePath}/assets`);
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', () => {

View file

@ -76,7 +76,7 @@ describe('Liquid Testnet', () => {
it('shows the assets screen', () => {
cy.visit(`${basePath}/assets`);
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', () => {

View file

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