Skip to content

Commit

Permalink
Initial rough out of a Tabs widget.
Browse files Browse the repository at this point in the history
Issue #258.

␄
  • Loading branch information
Mike Castle committed Feb 24, 2024
1 parent d9bd3d2 commit bfb7044
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions lib/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -1951,6 +1951,58 @@ window.NexusHoratio.widget = (function widget() {

NH.xunit.testing.testCases.push(GridTestCase);

/** Tab for the {@link Tabs} widget. */
class TabEntry {
}

/* eslint-disable no-new */
/* eslint-disable no-unused-vars */
/* eslint-disable require-jsdoc */
class TabEntryTestCase extends NH.xunit.TestCase {

testBasic() {
this.assertNoRaises(
() => {
new TabEntry();
}
);
}

}
/* eslint-enable */

NH.xunit.testing.testCases.push(TabEntryTestCase);

/**
* Implements the Tabs pattern.
*
* Tabs widgets will need `aria-*` attributes, TBD.
*/
class Tabs extends Widget {

/** @param {string} name - Name for this instance. */
constructor(name) {
super(name, 'tabs');
}

}

/* eslint-disable require-jsdoc */
class TabsTestCase extends NH.xunit.TestCase {

testDefaults() {
// Assemble
const w = new Tabs(this.id);

// Assert
this.assertEqual(w.container.tagName, 'TABS', 'correct element');
}

}
/* eslint-enable */

NH.xunit.testing.testCases.push(TabsTestCase);

/**
* Implements the Modal pattern.
*
Expand Down

0 comments on commit bfb7044

Please sign in to comment.