MCPcopy
hub / github.com/angular/components / updateTabs

Function updateTabs

src/aria/tabs/tabs.spec.ts:83–106  ·  view source on GitHub ↗
(
    options: {
      initialTabs?: TestTabDefinition[];
      selectedTab?: string | undefined;
      orientation?: 'horizontal' | 'vertical';
      disabled?: boolean;
      wrap?: boolean;
      softDisabled?: boolean;
      focusMode?: 'roving' | 'activedescendant';
      selectionMode?: 'follow' | 'explicit';
    } = {},
  )

Source from the content-addressed store, hash-verified

81 }
82
83 async function updateTabs(
84 options: {
85 initialTabs?: TestTabDefinition[];
86 selectedTab?: string | undefined;
87 orientation?: 'horizontal' | 'vertical';
88 disabled?: boolean;
89 wrap?: boolean;
90 softDisabled?: boolean;
91 focusMode?: 'roving' | 'activedescendant';
92 selectionMode?: 'follow' | 'explicit';
93 } = {},
94 ) {
95 if (options.initialTabs !== undefined) testComponent.tabsData.set(options.initialTabs);
96 if (options.selectedTab !== undefined) testComponent.selectedTab.set(options.selectedTab);
97 if (options.orientation !== undefined) testComponent.orientation.set(options.orientation);
98 if (options.disabled !== undefined) testComponent.disabled.set(options.disabled);
99 if (options.wrap !== undefined) testComponent.wrap.set(options.wrap);
100 if (options.softDisabled !== undefined) testComponent.softDisabled.set(options.softDisabled);
101 if (options.focusMode !== undefined) testComponent.focusMode.set(options.focusMode);
102 if (options.selectionMode !== undefined) testComponent.selectionMode.set(options.selectionMode);
103
104 await fixture.whenStable();
105 defineTestVariables();
106 }
107
108 function defineTestVariables() {
109 tabListDebugElement = fixture.debugElement.query(By.directive(TabList));

Callers 1

tabs.spec.tsFile · 0.85

Calls 2

setMethod · 0.80
defineTestVariablesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…