Results 1 to 3 of 3

Thread: Testing a greyed out menu option

  1. #1
    Sencha User
    Join Date
    Mar 2020
    Posts
    15
    Answers
    1

    Default Answered: Testing a greyed out menu option

    I am sure there is a fairly simple answer to this but how do I check to see if a menu option is greyed out and unclickable? The test should pass if the menu option is grayed out.

    I have selected the menu option via the following test:

    Code:
    it("should check that the Create Rendition menu option is grayed out", function() {
            ST.component('menuitem[iconCls="x-fa fa-file-o"]');
        });
    Annotation 2020-05-01 163306.png

    What method should I use to check that it is grayed out and unclickable?

    Thanks.

  2. The "disabled" API can check if the menu item is disabled (grayed out):

    Code:
    ST.component('menuitem[iconCls="x-fa fa-file-o"]').disabled();

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    396
    Answers
    75

    Default

    The "disabled" API can check if the menu item is disabled (grayed out):

    Code:
    ST.component('menuitem[iconCls="x-fa fa-file-o"]').disabled();
    Daniel Gallo
    Sales Engineer
    Sencha

  4. #3
    Sencha User
    Join Date
    Mar 2020
    Posts
    15
    Answers
    1

    Default

    Thanks Daniel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •