Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent blank order history page when using new tab component #19543

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sdrozdsap
Copy link
Contributor

No description provided.

@sdrozdsap sdrozdsap requested a review from a team as a code owner November 13, 2024 22:39
@github-actions github-actions bot marked this pull request as draft November 13, 2024 22:39
this.tabs$ = combineLatest([this.components$, this.tabRefs.changes]).pipe(
this.tabs$ = combineLatest([
this.components$,
this.tabRefs.changes.pipe(startWith(this.tabRefs)),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After navigating to different route and back the tabRefs are already initialised with values and this.tabRefs.changes does not emit any value. This change ensures that at least the initial value will be taken into account. This solves the problem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! Are we able to add an e2e test for the empty order history case just to make sure we have coverage?

@sdrozdsap sdrozdsap marked this pull request as ready for review November 13, 2024 22:42
Copy link
Contributor

Merge Checks Failed

Please push a commit to re-trigger the build. 
To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`

@github-actions github-actions bot marked this pull request as draft November 13, 2024 22:44
if (this.featureConfigService.isEnabled('a11yPickupOptionsTabs')) {
if (
this.featureConfigService.isEnabled('a11yPickupOptionsTabs') &&
this.pickupOptionCompRef instanceof ComponentRef
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not directly related to the issue, but still its better to have this fix as soon as possible, since there is an error in console for b2b

@sdrozdsap sdrozdsap marked this pull request as ready for review November 13, 2024 22:45
Copy link

cypress bot commented Nov 13, 2024

spartacus    Run #45753

Run Properties:  status check passed Passed #45753  •  git commit b0e061012a ℹ️: Merge 687acad07dec9e58b2bc41f8dc029851f2959f23 into ff6ce9f1dc7fd6f73de012ecc9d7...
Project spartacus
Branch Review bugfix/CXSPA-8712
Run status status check passed Passed #45753
Run duration 04m 50s
Commit git commit b0e061012a ℹ️: Merge 687acad07dec9e58b2bc41f8dc029851f2959f23 into ff6ce9f1dc7fd6f73de012ecc9d7...
Committer sdrozdsap
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125
View all changes introduced in this branch ↗︎

this.tabs$ = combineLatest([this.components$, this.tabRefs.changes]).pipe(
this.tabs$ = combineLatest([
this.components$,
this.tabRefs.changes.pipe(startWith(this.tabRefs)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! Are we able to add an e2e test for the empty order history case just to make sure we have coverage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants