Skip to content

Commit

Permalink
Corrige teste
Browse files Browse the repository at this point in the history
Signed-off-by: DaviMarinho <[email protected]>
  • Loading branch information
DaviMarinho committed Dec 9, 2023
1 parent bd9f1e8 commit 01d1b3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/pages/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="flex justify-start items-center text-blue-brand underline pl-4 cursor-pointer" (click)="navigator('/register')">
Cadastre-se
</div>
<div class="pt-4 flex justify-start items-center text-blue-brand underline pl-4 cursor-pointer" (click)="navigator('/loginsocial')">
<div id="loginSocialButton" class="pt-4 flex justify-start items-center text-blue-brand underline pl-4 cursor-pointer" (click)="navigator('/loginsocial')">
Login com redes sociais
</div>
</form>
Expand Down
5 changes: 1 addition & 4 deletions src/app/pages/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,12 @@ describe('LoginComponent', () => {

it('should call navigator method when "Login com redes sociais" is clicked', () => {
const navigatorSpy = spyOn(component, 'navigator').and.callThrough();
fixture.detectChanges();
const loginSocial = fixture.nativeElement.querySelector('.text-blue-brand');
const loginSocial = fixture.nativeElement.querySelector('#loginSocialButton');
loginSocial.click();

tick();
expect(navigatorSpy).toHaveBeenCalledWith('/loginsocial');
});


it('should call login and return an error', () => {
fixture.detectChanges();
const form = component.userForm;
Expand Down

0 comments on commit 01d1b3d

Please sign in to comment.