web/adding tests: added comments and cleaned up some administrative features.

This commit is contained in:
Ken Sternberg 2023-09-22 13:02:24 -07:00
parent 4c6f84e522
commit d8d9890a41
3 changed files with 11 additions and 13 deletions

View File

@ -1,8 +1,4 @@
# don't ever lint node_modules # don't ever lint node_modules
node_modules node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output # don't lint nyc coverage output
coverage coverage
src/locale-codes.ts
storybook-static/

View File

@ -1,11 +1,4 @@
# don't ever lint node_modules # don't ever lint node_modules
node_modules node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output # don't lint nyc coverage output
coverage coverage
# Import order matters
poly.ts
src/locale-codes.ts
src/locales/
storybook-static/

View File

@ -3,8 +3,8 @@ import { browser } from "@wdio/globals";
const CLICK_TIME_DELAY = 250; const CLICK_TIME_DELAY = 250;
/** /**
* main page object containing all methods, selectors and functionality * Main page object containing all methods, selectors and functionality that is shared across all
* that is shared across all page objects * page objects
*/ */
export default class Page { export default class Page {
/** /**
@ -22,6 +22,15 @@ export default class Page {
return browser.pause(CLICK_TIME_DELAY); return browser.pause(CLICK_TIME_DELAY);
} }
/**
* Target a specific entry in SearchSelect. Requires that the SearchSelect have the `name`
* attribute set, so that the managed selector can find the *right* SearchSelect if there are
* multiple open SearchSelects on the board. See `./ldap-form.view:LdapForm.setBindFlow` for an
* example, and see `./oauth-form.view:OauthForm:setAuthorizationFlow` for a further example of
* why it would be hard to simplify this further (`flow` vs `tentanted-flow` vs a straight-up
* SearchSelect each have different a `searchSelector`).
*/
async searchSelect(searchSelector: string, managedSelector: string, buttonSelector: string) { async searchSelect(searchSelector: string, managedSelector: string, buttonSelector: string) {
const inputBind = await $(searchSelector); const inputBind = await $(searchSelector);
await inputBind.click(); await inputBind.click();