Skip to content

Commit

Permalink
Merge b2b2558 into 4de1357
Browse files Browse the repository at this point in the history
  • Loading branch information
petarmarkov9449 authored Jan 23, 2025
2 parents 4de1357 + b2b2558 commit 766f257
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div
[attr.role]="mode === TAB_MODE.ACCORDIAN ? 'region' : 'tabpanel'"
[tabindex]="tab.disableBorderFocus ? -1 : 0"
[attr.aria-labelledby]="tab.id ?? null"
[attr.id]="
tab.id !== null && tab.id !== undefined ? 'section-' + tab.id : null
"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, TemplateRef, ViewChild } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { Tab, TAB_MODE } from '../tab.model';
import { TabPanelComponent } from './tab-panel.component';
import { KeyboardFocusTestingModule } from '@spartacus/storefront';
import { TAB_MODE, Tab } from '../tab.model';
import { TabPanelComponent } from './tab-panel.component';

const mockTab: Tab | any = {
id: 1,
Expand Down Expand Up @@ -46,7 +46,6 @@ describe('TabPanelComponent', () => {
expect(tabPanel?.getAttribute('tabindex')).toEqual('0');
expect(tabPanel?.getAttribute('role')).toEqual('tabpanel');
expect(tabPanel?.getAttribute('class')).toEqual('active');
expect(tabPanel?.getAttribute('aria-labelledby')).toEqual('1');
});

it('should have correct attribues when is open in ACCORDIAN mode', () => {
Expand All @@ -58,7 +57,6 @@ describe('TabPanelComponent', () => {
expect(tabPanel?.getAttribute('tabindex')).toEqual('0');
expect(tabPanel?.getAttribute('role')).toEqual('region');
expect(tabPanel?.getAttribute('class')).toEqual('active');
expect(tabPanel?.getAttribute('aria-labelledby')).toEqual('1');
});

it('should have correct attribues when disableBorderFocus is active', () => {
Expand Down

0 comments on commit 766f257

Please sign in to comment.