Skip to content

Commit

Permalink
Merge pull request #4 from gsgomezm/develop
Browse files Browse the repository at this point in the history
Test: se actualiza la cantidad de cafes de la prueba
  • Loading branch information
gsgomezm authored Nov 5, 2023
2 parents bac0483 + b088240 commit 353b898
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
28 changes: 14 additions & 14 deletions reports/ut_report.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<testExecutions version="1">
<file path="src/app/coffee/coffee.component.spec.ts">
<testCase name="CoffeeComponent should create" duration="259"/>
</file>
<file path="src/app/app.component.spec.ts">
<testCase name="AppComponent should create the app" duration="37"/>
<testCase name="AppComponent should have as title 'base-project'" duration="11"/>
<testCase name="AppComponent should create the app" duration="35"/>
<testCase name="AppComponent should have as title 'base-project'" duration="5"/>
</file>
<file path="src/app/shared/spinner/spinner.component.spec.ts">
<testCase name="SpinnerComponent should create" duration="13"/>
<file path="src/app/coffee/coffee.component.spec.ts">
<testCase name="CoffeeComponent should create" duration="6"/>
</file>
<file path="src/app/coffee/coffee-list/coffee-list.component.spec.ts">
<testCase name="CoffeeListComponent should have the corresponding id, nombre, tipo and region to the 10 coffees elements" duration="26"/>
<testCase name="CoffeeListComponent should have the corresponding total blend coffe types" duration="12"/>
<testCase name="CoffeeListComponent should have 11 &lt;tr> elements" duration="9"/>
<testCase name="CoffeeListComponent should have the corresponding table header elements" duration="5"/>
<testCase name="CoffeeListComponent should have the corresponding total origen coffe types" duration="5"/>
<testCase name="CoffeeListComponent should create" duration="6"/>
<testCase name="CoffeeListComponent should have h1 tag with the coffee shop name" duration="6"/>
<testCase name="CoffeeListComponent should create" duration="20"/>
<testCase name="CoffeeListComponent should have 11 &lt;tr> elements" duration="17"/>
<testCase name="CoffeeListComponent should have the corresponding table header elements" duration="8"/>
<testCase name="CoffeeListComponent should have the corresponding id, nombre, tipo and region to the 3 coffees elements" duration="12"/>
<testCase name="CoffeeListComponent should have the corresponding total blend coffe types" duration="9"/>
<testCase name="CoffeeListComponent should have h1 tag with the coffee shop name" duration="12"/>
<testCase name="CoffeeListComponent should have the corresponding total origen coffe types" duration="12"/>
</file>
<file path="src/app/shared/spinner/spinner.component.spec.ts">
<testCase name="SpinnerComponent should create" duration="12"/>
</file>
<file path="src/app/coffee/coffee.service.spec.ts">
<testCase name="CoffeeService should be created" duration="3"/>
Expand Down
8 changes: 4 additions & 4 deletions src/app/coffee/coffee-list/coffee-list.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('CoffeeListComponent', () => {
fixture = TestBed.createComponent(CoffeeListComponent);
component = fixture.componentInstance;

for(let i = 0; i < 10; i++) {
for(let i = 0; i < 3; i++) {
const coffee = new Coffee(
faker.number.int(),
faker.person.firstName(),
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('CoffeeListComponent', () => {
});

it('should have 11 <tr> elements', () => {
expect(debug.queryAll(By.css('tr'))).toHaveSize(11)
expect(debug.queryAll(By.css('tr'))).toHaveSize(4)
});

it('should have the corresponding table header elements', () => {
Expand All @@ -66,7 +66,7 @@ describe('CoffeeListComponent', () => {
expect(headerTable.children[3].nativeElement.textContent).toEqual("Región")
});

it('should have the corresponding id, nombre, tipo and region to the 10 coffees elements', () => {
it('should have the corresponding id, nombre, tipo and region to the 3 coffees elements', () => {
let coffeTable = debug.queryAll(By.css('tr'));
coffeTable.forEach((row, i) => {
if(i != 0) {
Expand All @@ -85,7 +85,7 @@ describe('CoffeeListComponent', () => {

it('should have the corresponding total origen coffe types', () => {
expect(debug.queryAll(By.css('#origen'))[0].nativeElement.textContent).
toEqual("Total café de origen: " + component.totalBlend)
toEqual("Total café de origen: " + component.totalOrigen)
});

});

0 comments on commit 353b898

Please sign in to comment.