-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor test design to allow commands.json file in each pattern directory #73
Conversation
@@ -0,0 +1 @@ | |||
{"navigate to menuitemcheckbox in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"], ["DOWN"]]}}, "close submenu of menubar using reading mode": {"reading": {"jaws": [["ESC"]]}}, "open submenu of menubar using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"], ["UP_AND_DOWN"]]}}, "read menu item in menubar using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "read disabled menuitem in a submenu using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "tab to menubar in reading mode": {"reading": {"jaws": [["TAB_AND_SHIFT_TAB"]]}}, "change state of menuitemcheckbox in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"]]}}, "navigate to menubar in reading mode": {"reading": {"jaws": [["UP_AND_DOWN"], ["F_AND_SHIFT_F"]]}}, "read menuitemcheckbox in a submenu using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "navigate to menuitemcheckbox in submenu using reading mode": {"reading": {"jaws": [["UP_AND_DOWN"]]}}, "change state of menuitemradio in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"]]}}, "close submenu of menubar using interaction mode": {"interaction": {"jaws": [["ESC"]]}}, "read disabled menuitem in a submenu using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "navigate to menuitem in menubar using interaction mode": {"interaction": {"jaws": [["TAB_AND_SHIFT_TAB"]]}}, "read menuitemradio in a group in submenu using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "read menuitemradio in a group in a submenu using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "read menuitemcheckbox in a submenu using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "change state of menuitemcheckbox in submenu using reading mode": {"reading": {"jaws": [["ENTER"], ["SPACE"]]}}, "read menu item in menubar using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "navigate to menuitemradio in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"], ["DOWN"]]}}, "navigate to menuitem in menubar using reading mode": {"reading": {"jaws": [["LEFT_AND_RIGHT", " (with Smart Navigation on)"]]}}, "change state of menuitemradio in submenu using reading mode": {"reading": {"jaws": [["ENTER"], ["SPACE"]]}}, "navigate to menuitemradio in submenu using reading mode": {"reading": {"jaws": [["UP_AND_DOWN"]]}}, "open submenu of menubar using reading mode": {"reading": {"jaws": [["ENTER"], ["SPACE"]]}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this file be edited so that it spans more than one line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could, but I did have the suggestion/thought from Mike that if it is printed like this then people might realize it is generated and not for manual editing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't clear to me. Is there a way for us to note this difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very soon all of these files will be generated, so there won't be a need for the distinction!
// Get the commands for this test file ("commands.json" in the same directory) | ||
// and initialize the commands API. | ||
var xobj = new XMLHttpRequest(); | ||
xobj.overrideMimeType("application/json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is XMLHttpRequest
used to explicitly invoke xobj.overrideMimeType
?
tests/resources/at-commands.mjs
Outdated
nvda: 'NVDA', | ||
voiceover: 'VoiceOver' | ||
} | ||
export class commandsAPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the commandsAPI
the pattern we are going to use in the production system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, this file is part of the test suite, it's for rendering the test files. So only indirectly, because the production system consumes the tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, can we use a more descriptive class name or have a JSDoc about what this class does? commandsAPI
wasn't clear enough for me to understand until I saw it in use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. There should be documentation. I'll add it right now!
@@ -0,0 +1 @@ | |||
{"navigate to menuitemcheckbox in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"], ["DOWN"]]}}, "close submenu of menubar using reading mode": {"reading": {"jaws": [["ESC"]]}}, "open submenu of menubar using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"], ["UP_AND_DOWN"]]}}, "read menu item in menubar using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "read disabled menuitem in a submenu using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "tab to menubar in reading mode": {"reading": {"jaws": [["TAB_AND_SHIFT_TAB"]]}}, "change state of menuitemcheckbox in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"]]}}, "navigate to menubar in reading mode": {"reading": {"jaws": [["UP_AND_DOWN"], ["F_AND_SHIFT_F"]]}}, "read menuitemcheckbox in a submenu using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "navigate to menuitemcheckbox in submenu using reading mode": {"reading": {"jaws": [["UP_AND_DOWN"]]}}, "change state of menuitemradio in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"]]}}, "close submenu of menubar using interaction mode": {"interaction": {"jaws": [["ESC"]]}}, "read disabled menuitem in a submenu using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "navigate to menuitem in menubar using interaction mode": {"interaction": {"jaws": [["TAB_AND_SHIFT_TAB"]]}}, "read menuitemradio in a group in submenu using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "read menuitemradio in a group in a submenu using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "read menuitemcheckbox in a submenu using interaction mode": {"interaction": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "change state of menuitemcheckbox in submenu using reading mode": {"reading": {"jaws": [["ENTER"], ["SPACE"]]}}, "read menu item in menubar using reading mode": {"reading": {"jaws": [["INS_TAB"], ["INS_UP"]]}}, "navigate to menuitemradio in submenu using interaction mode": {"interaction": {"jaws": [["ENTER"], ["SPACE"], ["DOWN"]]}}, "navigate to menuitem in menubar using reading mode": {"reading": {"jaws": [["LEFT_AND_RIGHT", " (with Smart Navigation on)"]]}}, "change state of menuitemradio in submenu using reading mode": {"reading": {"jaws": [["ENTER"], ["SPACE"]]}}, "navigate to menuitemradio in submenu using reading mode": {"reading": {"jaws": [["UP_AND_DOWN"]]}}, "open submenu of menubar using reading mode": {"reading": {"jaws": [["ENTER"], ["SPACE"]]}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't clear to me. Is there a way for us to note this difference?
tests/resources/at-commands.mjs
Outdated
nvda: 'NVDA', | ||
voiceover: 'VoiceOver' | ||
} | ||
export class commandsAPI { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, can we use a more descriptive class name or have a JSDoc about what this class does? commandsAPI
wasn't clear enough for me to understand until I saw it in use.
After discussion with @spectranaut, in the future, the |
} | ||
import * as keys from './keys.mjs'; | ||
|
||
/** Class for getting AT-specific instructions for a test against a design pattern. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comments @evmiguel thanks for that nudge
From now on, we will simply add a
commands.json
file with the tasks/mode/assistive technology to command list data structure.