Skip to content

Commit

Permalink
fix: open product description tab by default when navigating between …
Browse files Browse the repository at this point in the history
…product detail pages (#1263)
  • Loading branch information
shauke committed Aug 31, 2022
1 parent b8cb49d commit b75974f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ describe('Product Reviews', () => {

it('user should be able to write a review', () => {
at(ProductDetailPage, page => {
page.infoNav('Reviews').should('be.visible');
page.infoNav('Reviews').click();
page.reviewTab.reviewOpenDialogLink.click();
page.reviewTab.reviewCreationForm.should('be.visible');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { Observable, map } from 'rxjs';
import { Observable, map, tap } from 'rxjs';

import { ProductContextDisplayProperties, ProductContextFacade } from 'ish-core/facades/product-context.facade';
import { ProductView } from 'ish-core/models/product-view/product-view.model';
Expand All @@ -17,7 +17,7 @@ export class ProductDetailInfoComponent implements OnInit {
constructor(private context: ProductContextFacade) {}

ngOnInit() {
this.product$ = this.context.select('product');
this.product$ = this.context.select('product').pipe(tap(() => (this.active = 'DESCRIPTION')));
this.isVariationMaster$ = this.context.select('variationCount').pipe(map(variationCount => !!variationCount));
}

Expand Down

0 comments on commit b75974f

Please sign in to comment.