Skip to content

Commit

Permalink
Merge pull request #32 from Uniandes-isis2603/misPruebas
Browse files Browse the repository at this point in the history
mis bellas pruebas
  • Loading branch information
jimenezzz authored Jun 6, 2022
2 parents 04324d7 + 451c225 commit 7cedc5e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div class = "col-lg">
<div class="page-section team-member">
<div class="text-center margin-foto">
<h2 class="section-heading text-uppercase ">{{ proveedor.nombre }}</h2>
<h2 class="section-heading text-uppercase " id="nombre">{{ proveedor.nombre }}</h2>
<h3 class="section-subheading text-muted">proveedor</h3>
</div>
<img class="mx-auto rounded-circle" src="{{proveedor.foto.url}}" alt="..." />
<img class="mx-auto rounded-circle" id ="foto" src="{{proveedor.foto.url}}" alt="..." />
</div>
</div>
<div class = "col-lg">
Expand Down Expand Up @@ -41,21 +41,21 @@ <h3 class="section-subheading text-muted">del proveedor</h3>
<img src="\assets\images\Hola1.png" class="ochenta-image">
</span>
<h4 class="my-3">Experticia</h4>
<p class="text-muted">{{proveedor.experticia}} días</p>
<p class="text-muted" id="experticia">{{proveedor.experticia}} días</p>
</div>
<div class="col">
<span>
<img src="\assets\images\Hola2.png" class="ochenta-image">
</span>
<h4 class="my-3">Tipo de proveedor</h4>
<p class="text-muted">{{proveedor.tipoDocumento == "Nit"? "Empresa" : "Persona natural"}}</p>
<p class="text-muted" id="tipoDocumento">{{proveedor.tipoDocumento == "Nit"? "Empresa" : "Persona natural"}}</p>
</div>
<div class="col">
<span>
<img src="\assets\images\Hola3.png" class="ochenta-image">
</span>
<h4 class="my-3">Teléfono</h4>
<p class="text-muted">{{proveedor.telefono}}</p>
<p class="text-muted" id="telefono">{{proveedor.telefono}}</p>
</div>
</div>
</div>
Expand All @@ -67,7 +67,7 @@ <h4 class="my-3">Teléfono</h4>
<div class="container">
<div class="text-center">
<h2 class="texto-contacto text-uppercase">Contacta a</h2>
<h3 class="nombre-contacto text-muted">{{proveedor.nombre}}</h3>
<h3 class="nombre-contacto text-muted" id="nombre2">{{proveedor.nombre}}</h3>
</div>
<form id="contactForm" data-sb-form-api-token="API_TOKEN" class="contact">
<div class="row align-items-stretch mb-5">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { RouterTestingModule } from '@angular/router/testing';
import { HttpClientModule } from '@angular/common/http';
import { Expedicion, Foto, Itinerario, Mapa, Recomendacion } from 'src/app/model/trekking.model';
import { faker } from '@faker-js/faker';
import { By } from '@angular/platform-browser';

describe('ProveedorDetalleComponent', () => {
let component: ProveedorDetalleComponent;
Expand Down Expand Up @@ -84,4 +85,30 @@ describe('ProveedorDetalleComponent', () => {
expect(component).toBeTruthy();
});

it('should have a nombre', () => {
expect(debug.nativeElement.querySelector('#nombre').textContent).toContain(component.proveedor.nombre)
});

it('should have a foto', () => {
expect(
debug.query(By.css('#foto')).attributes['src']
).toEqual(component.proveedor.foto.url);
});

it('should have a experticia', () => {
expect(debug.nativeElement.querySelector('#experticia').textContent).toContain(component.proveedor.experticia)
});

it('should have a telefono', () => {
expect(debug.nativeElement.querySelector('#telefono').textContent).toContain(component.proveedor.telefono)
});

it('should have a nombre2', () => {
expect(debug.nativeElement.querySelector('#nombre2').textContent).toContain(component.proveedor.nombre)
});

it('should have a tipoDocumento', () => {
expect(debug.nativeElement.querySelector('#tipoDocumento').textContent).toContain(component.proveedor.tipoDocumento == "Nit"? "Empresa" : "Persona natural")
});

});

0 comments on commit 7cedc5e

Please sign in to comment.