update botones en html de listar usuarios
se eliminó un botón en el html innecesario de editar y se eliminó documento defectuoso de testing
This commit is contained in:
parent
48cd746b59
commit
8764f50e9f
|
@ -76,16 +76,6 @@
|
||||||
<span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
[routerLink]="['/usuario-extra', usuarioExtra.id, 'edit']"
|
|
||||||
class="btn btn-primary btn-sm"
|
|
||||||
data-cy="entityEditButton"
|
|
||||||
>
|
|
||||||
<fa-icon icon="pencil-alt"></fa-icon>
|
|
||||||
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button type="submit" (click)="delete(usuarioExtra)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
|
<button type="submit" (click)="delete(usuarioExtra)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
|
||||||
<fa-icon icon="times"></fa-icon>
|
<fa-icon icon="times"></fa-icon>
|
||||||
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
import { HttpHeaders, HttpResponse } from '@angular/common/http';
|
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
|
||||||
import { of } from 'rxjs';
|
|
||||||
|
|
||||||
import { UsuarioExtraService } from '../service/usuario-extra.service';
|
|
||||||
|
|
||||||
import { UsuarioExtraComponent } from './usuario-extra.component';
|
|
||||||
|
|
||||||
describe('Component Tests', () => {
|
|
||||||
describe('UsuarioExtra Management Component', () => {
|
|
||||||
let comp: UsuarioExtraComponent;
|
|
||||||
let fixture: ComponentFixture<UsuarioExtraComponent>;
|
|
||||||
let service: UsuarioExtraService;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
imports: [HttpClientTestingModule],
|
|
||||||
declarations: [UsuarioExtraComponent],
|
|
||||||
})
|
|
||||||
.overrideTemplate(UsuarioExtraComponent, '')
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(UsuarioExtraComponent);
|
|
||||||
comp = fixture.componentInstance;
|
|
||||||
service = TestBed.inject(UsuarioExtraService);
|
|
||||||
|
|
||||||
const headers = new HttpHeaders().append('link', 'link;link');
|
|
||||||
jest.spyOn(service, 'query').mockReturnValue(
|
|
||||||
of(
|
|
||||||
new HttpResponse({
|
|
||||||
body: [{ id: 123 }],
|
|
||||||
headers,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Should call load all on init', () => {
|
|
||||||
// WHEN
|
|
||||||
comp.ngOnInit();
|
|
||||||
|
|
||||||
// THEN
|
|
||||||
expect(service.query).toHaveBeenCalled();
|
|
||||||
expect(comp.usuarioExtras?.[0]).toEqual(expect.objectContaining({ id: 123 }));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue