How to use the ariatemplates/utils/String.endsWith function in ariatemplates

To help you get started, we’ve selected a few ariatemplates examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },
github ariatemplates / ariatemplates / test / aria / widgets / wai / datePicker / DatePickerRobotTestCase.js View on Github external
assertSelectedAttributeHasLabel: function (attributes, expectedLabel) {
            var selected = findAttribute(attributes, "aria-selected", "true");
            this.assertEquals(selected.length, 1);
            this.assertEquals(selected[0].ownerElement.getAttribute("aria-label"), expectedLabel);
            var focusedElement = this.testDocument.activeElement;
            var activeDescendant = focusedElement.getAttribute("aria-activedescendant");
            if (activeDescendant) {
                focusedElement = ariaUtilsDom.getElementById(activeDescendant) || focusedElement;
            }
            this.assertTrue(ariaUtilsString.endsWith(focusedElement.getAttribute("aria-label"), expectedLabel));
        },
github ariatemplates / ariatemplates / test / aria / utils / StringTestCase.js View on Github external
testEndsWith : function () {
            this.assertTrue(ariaUtilsString.endsWith("", ""));
            this.assertFalse(ariaUtilsString.endsWith("", "a"));
            this.assertTrue(ariaUtilsString.endsWith("a", "a"));
            this.assertFalse(ariaUtilsString.endsWith("ab", "a"));
            this.assertTrue(ariaUtilsString.endsWith("aba", "a"));
            this.assertFalse(ariaUtilsString.endsWith("aba", "b"));
            this.assertTrue(ariaUtilsString.endsWith("abc", ""));
            this.assertTrue(ariaUtilsString.endsWith("abc", "bc"));
            this.assertTrue(ariaUtilsString.endsWith("a b", " b"));
            this.assertFalse(ariaUtilsString.endsWith("a b", "a"));
        },