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

Add stepped class in wizard/tabs #1489

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

Add stepped class in wizard/tabs #1489

wants to merge 1 commit into from

Conversation

pavi41
Copy link
Contributor

@pavi41 pavi41 commented Dec 2, 2024

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

2 similar comments
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

2 similar comments
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 96 96 75

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

2 similar comments
@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

@adobe-bot
Copy link

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.33%. Comparing base (07639b3) to head (628c889).

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #1489   +/-   ##
=========================================
  Coverage     82.33%   82.33%           
  Complexity      963      963           
=========================================
  Files           107      107           
  Lines          2485     2485           
  Branches        339      339           
=========================================
  Hits           2046     2046           
  Misses          264      264           
  Partials        175      175           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -116,6 +116,11 @@ class FormTabs extends FormPanel {
tabs[i].setAttribute(Constants.TABINDEX, "0");
tabs[i].setAttribute(Constants.ARIA_CURRENT, "true");
} else {
// If the panel/tab was previously active, mark it as stepped
if (tabpanels[i].classList.contains(this.#_selectors.active.tabpanel)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you validate the following use-cases,

  1. If tabs are dynamically added/removed (via repeatable settings), this indexing might break. Please add test cases for this use-case

for all layout types

Copy link
Contributor

Choose a reason for hiding this comment

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

since it is being directly added to HTML, and is not something which is repopulated, so this might work.
Whenever we introduce lazy loading, at that time this will break.
Nevertheless, we should have a repeatable test cases.

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

check comment

@@ -232,7 +269,7 @@ describe('visibility of navigation buttons', function () {
// check when new instance of repeatable panel is added
// and that new instance gets active & prev and next nav buttons are visible
cy.get(`#${textInputId}`).find(driverTextInput).focus().clear().type('a').blur().then(() => {
getWizardPanelAtIndex(2).should('have.class', wizardPanelActive);
getWizardPanelAtIndex(11).should('have.class', wizardPanelActive);
Copy link
Collaborator

Choose a reason for hiding this comment

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

When there is no change in collateral, why is this test case changed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was failing on my local, because the panel at index 11 was active, and it was checking at index 2.

Copy link
Collaborator

@rismehta rismehta Dec 5, 2024

Choose a reason for hiding this comment

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

The test case was working earlier, ideally if an old test case is changed, it is most likely due to collateral change else this could be a regression. please investigate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, reverted to old scenario!


it("After clicking on every tab, if tab-1 is repeated, the repeated instance should not have stepped class", () => {
getTabs().should('have.length', 4);
getWizardPanels().should('have.length', 4);
Copy link
Collaborator

@rismehta rismehta Dec 5, 2024

Choose a reason for hiding this comment

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

I don't see code to add/remove instances in between the tabs/wizard, which was asked as per last review comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added the instances in tabs/wizards, you can check it in the test case as well.

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

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

check comments

getWizardPanelAtIndex(1).should('have.class', 'cmp-adaptiveform-wizard__wizardpanel--stepped');
getTabAtIndex(0).should('have.class', 'cmp-adaptiveform-wizard__tab--stepped');
getWizardPanelAtIndex(0).should('have.class', 'cmp-adaptiveform-wizard__wizardpanel--stepped');
cy.get("button").contains("+R1").click().then(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rismehta I have added the instance, you can check it here!

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.

4 participants