Skip to content

Commit

Permalink
Fix tags in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
atmgrifter00 committed Oct 23, 2024
1 parent 959e9db commit 107a24e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ describe('AnchorTabs', () => {
describe('scroll buttons', () => {
async function setup(): Promise<Fixture<AnchorTabs>> {
return await fixture<AnchorTabs>(
html`<nimble-anchor-tabs activeid="tab-two">
<nimble-anchor-tab>Tab 1</nimble-anchor-tab>
<nimble-anchor-tab id="tab-two">Tab 2</nimble-anchor-tab>
<nimble-anchor-tab id="tab-three">Tab 3</nimble-anchor-tab>
<nimble-anchor-tab id="tab-four">Tab 4</nimble-anchor-tab>
<nimble-anchor-tab id="tab-five">Tab 5</nimble-anchor-tab>
<nimble-anchor-tab id="tab-six">Tab 6</nimble-anchor-tab>
</nimble-anchor-tabs>`
html`<${anchorTabsTag} activeid="tab-two">
<${anchorTabTag}>Tab 1</${anchorTabTag}>
<${anchorTabTag} id="tab-two">Tab 2</${anchorTabTag}>
<${anchorTabTag} id="tab-three">Tab 3</${anchorTabTag}>
<${anchorTabTag} id="tab-four">Tab 4</${anchorTabTag}>
<${anchorTabTag} id="tab-five">Tab 5</${anchorTabTag}>
<${anchorTabTag} id="tab-six">Tab 6</${anchorTabTag}>
</${anchorTabsTag}>`
);
}

Expand Down
29 changes: 15 additions & 14 deletions packages/nimble-components/src/tabs/tests/tabs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ import { Tabs, tabsTag } from '..';
import { fixture, Fixture } from '../../utilities/tests/fixture';
import { waitForUpdatesAsync } from '../../testing/async-helpers';
import { TabsPageObject } from '../testing/tabs.pageobject';
import { tabTag } from '../../tab';

async function setup(): Promise<Fixture<Tabs>> {
const viewTemplate = html`
<nimble-tabs>
<nimble-tab id="1">Tab 1</nimble-tab>
<nimble-tab id="2">Tab 2</nimble-tab>
<nimble-tab id="3">Tab 3</nimble-tab>
<nimble-tab id="4">Tab 4</nimble-tab>
<nimble-tab id="5">Tab 5</nimble-tab>
<nimble-tab id="6">Tab 6</nimble-tab>
<nimble-tab-panel>Panel 1</nimble-tab-panel>
<nimble-tab-panel>Panel 2</nimble-tab-panel>
<nimble-tab-panel>Panel 3</nimble-tab-panel>
<nimble-tab-panel>Panel 4</nimble-tab-panel>
<nimble-tab-panel>Panel 5</nimble-tab-panel>
<nimble-tab-panel>Panel 6</nimble-tab-panel>
</nimble-tabs>
<${tabsTag}>
<${tabTag} id="1">Tab 1</${tabTag}>
<${tabTag} id="2">Tab 2</${tabTag}>
<${tabTag} id="3">Tab 3</${tabTag}>
<${tabTag} id="4">Tab 4</${tabTag}>
<${tabTag} id="5">Tab 5</${tabTag}>
<${tabTag} id="6">Tab 6</${tabTag}>
<${tabTag}-panel>Panel 1</${tabTag}-panel>
<${tabTag}-panel>Panel 2</${tabTag}-panel>
<${tabTag}-panel>Panel 3</${tabTag}-panel>
<${tabTag}-panel>Panel 4</${tabTag}-panel>
<${tabTag}-panel>Panel 5</${tabTag}-panel>
<${tabTag}-panel>Panel 6</${tabTag}-panel>
</${tabsTag}>
`;

return await fixture<Tabs>(viewTemplate);
Expand Down

0 comments on commit 107a24e

Please sign in to comment.