Skip to content

Commit 3b22539

Browse files
authored
Merge pull request #1532 from dearrudam/fix/ci
Fixed tests
2 parents 8b0d9d7 + 168f15c commit 3b22539

File tree

11 files changed

+39
-112
lines changed

11 files changed

+39
-112
lines changed

front-end/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
"build": "ng build",
1010
"test": "ng test",
1111
"lint": "ng lint",
12-
"e2e": "ng e2e"
12+
"e2e": "ng e2e",
13+
"ci:clean": "rimraf ./dist",
14+
"ci:test": "ng test --watch=false --browsers=ChromeHeadlessCI",
15+
"ci:build": "ng build --configuration production"
1316
},
1417
"private": true,
1518
"dependencies": {

front-end/src/app/app-routing.module.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ const routes: Routes = [
1212
loadChildren: () => import('./pages/home/home.module').then(m => m.HomePageModule)
1313
},
1414
{path: 'vagas', loadChildren: () => import('./pages/vagas/vagas.module').then(m => m.VagasPageModule)},
15-
{
16-
path: 'github-auth',
17-
loadChildren: () => import('./github-auth/github-auth.module').then(m => m.GithubAuthPageModule)
18-
},
1915
{
2016
path: 'cadastro-vaga',
2117
loadChildren:

front-end/src/app/app.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('AppComponent', () => {
5151
const menuItems = app.querySelectorAll('ion-label');
5252
expect(menuItems.length).toEqual(2);
5353
expect(menuItems[0].textContent).toContain('Home');
54-
expect(menuItems[1].textContent).toContain('List');
54+
expect(menuItems[1].textContent).toContain('Vagas');
5555
});
5656

5757
it('should have urls', async () => {
@@ -61,7 +61,7 @@ describe('AppComponent', () => {
6161
const menuItems = app.querySelectorAll('ion-item');
6262
expect(menuItems.length).toEqual(2);
6363
expect(menuItems[0].getAttribute('ng-reflect-router-link')).toEqual('/home');
64-
expect(menuItems[1].getAttribute('ng-reflect-router-link')).toEqual('/list');
64+
expect(menuItems[1].getAttribute('ng-reflect-router-link')).toEqual('/vagas');
6565
});
6666

6767
});

front-end/src/app/github-auth/github-auth.module.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

front-end/src/app/github-auth/github-auth.page.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

front-end/src/app/github-auth/github-auth.page.scss

Whitespace-only changes.

front-end/src/app/github-auth/github-auth.page.spec.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

front-end/src/app/github-auth/github-auth.page.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
2+
import { HttpClientTestingModule } from "@angular/common/http/testing";
3+
import { RouterTestingModule } from "@angular/router/testing";
4+
import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing";
35

4-
import { CadastroVagaPage } from './cadastro-vaga.page';
6+
import { CadastroVagaPage } from "./cadastro-vaga.page";
57

6-
describe('CadastroVagaPage', () => {
8+
describe("CadastroVagaPage", () => {
79
let component: CadastroVagaPage;
810
let fixture: ComponentFixture<CadastroVagaPage>;
911

1012
beforeEach(waitForAsync(() => {
1113
TestBed.configureTestingModule({
12-
declarations: [ CadastroVagaPage ],
14+
imports: [HttpClientTestingModule, RouterTestingModule],
15+
declarations: [CadastroVagaPage],
1316
schemas: [CUSTOM_ELEMENTS_SCHEMA],
14-
})
15-
.compileComponents();
17+
}).compileComponents();
1618
}));
1719

1820
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('CadastroVagaPage', () => {
2123
fixture.detectChanges();
2224
});
2325

24-
it('should create', () => {
26+
it("should create", () => {
2527
expect(component).toBeTruthy();
2628
});
2729
});
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2-
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
1+
import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
2+
import { HttpClientTestingModule } from "@angular/common/http/testing";
3+
import { RouterTestingModule } from "@angular/router/testing";
4+
import {
5+
ComponentFixture,
6+
TestBed,
7+
waitForAsync,
8+
} from "@angular/core/testing";
39

4-
import { VagasPage } from './vagas.page';
10+
import { VagasPage } from "./vagas.page";
511

6-
describe('VagasPage', () => {
12+
describe("VagasPage", () => {
713
let component: VagasPage;
814
let fixture: ComponentFixture<VagasPage>;
915

1016
beforeEach(waitForAsync(() => {
1117
TestBed.configureTestingModule({
12-
declarations: [ VagasPage ],
18+
imports: [HttpClientTestingModule, RouterTestingModule],
19+
declarations: [VagasPage],
1320
schemas: [CUSTOM_ELEMENTS_SCHEMA],
14-
})
15-
.compileComponents();
21+
}).compileComponents();
1622
}));
1723

1824
beforeEach(() => {
@@ -21,7 +27,7 @@ describe('VagasPage', () => {
2127
fixture.detectChanges();
2228
});
2329

24-
it('should create', () => {
30+
it("should create", () => {
2531
expect(component).toBeTruthy();
2632
});
2733
});

0 commit comments

Comments
 (0)