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: Different aria-labels for un-/selected values for radio-buttons #19015

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

steinsebastian
Copy link
Contributor

No description provided.

@steinsebastian steinsebastian marked this pull request as ready for review June 28, 2024 13:43
@steinsebastian steinsebastian requested review from a team as code owners June 28, 2024 13:43
Copy link

cypress bot commented Jun 28, 2024

4 flaky tests on run #44173 ↗︎

0 119 2 0 Flakiness 4

Details:

Merge 6bfaf5b into 2c46b37...
Project: spartacus Commit: 013ae6cd9c ℹ️
Status: Passed Duration: 03:49 💡
Started: Jun 28, 2024 1:53 PM Ended: Jun 28, 2024 1:57 PM
Flakiness  regression/variants/apparel-checkout-as-guest.core-e2e.cy.ts • 1 flaky test • B2C

View Output Video

Test Artifacts
Apparel - checkout as guest > Desktop > should perform checkout as guest, create an account and verify guest data Test Replay Screenshots Video
Flakiness  ssr/pages.core-e2e.cy.ts • 3 flaky tests • SSR

View Output Video

Test Artifacts
SSR > should render homepage Test Replay Screenshots Video
SSR > should render PLP Test Replay Screenshots Video
SSR > should render PDP Test Replay Screenshots Video

Review all test suite changes for PR #19015 ↗︎

Comment on lines 263 to 268
this.translation
.translate(
'configurator.a11y.selectedValueOfAttributeFullWithPrice',
{
value: value.valueDisplay,
attribute: attribute.label,
price: value.valuePrice.formattedValue,
}
)
.translate(translationKey, {
value: value.valueDisplay,
attribute: attribute.label,
price: value.valuePrice.formattedValue,
})
Copy link
Contributor

@Uli-Tiger Uli-Tiger Jul 2, 2024

Choose a reason for hiding this comment

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

@steinsebastian can you do me a favor to refactor the method,

  • so there is only one call to the translation service.
  • that multi level if can be replacded by a simple if - else if - else

psydo code

if(totalprice != 0) {
key = ...
params = ...
} else if (valueprice != 0){
key = ...
params = ...
} else{
key = ...
params = ...
}
transService.translate.....
return

i believe this makes it easier to understand what the method does and that there are exactly 3 paths.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

None yet

3 participants