@comicrelief/component-library 8.38.0 → 8.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,6 +89,7 @@ const Select = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
89
89
  error: errorMsg,
90
90
  defaultValue: defaultValue,
91
91
  required: optional === false,
92
+ "aria-required": optional === false,
92
93
  hasValue: !!value,
93
94
  greyDescription: greyDescription,
94
95
  ref: ref,
@@ -75,6 +75,7 @@ exports[`renders correctly 1`] = `
75
75
  size="s"
76
76
  />
77
77
  <select
78
+ aria-required={true}
78
79
  className="c3"
79
80
  defaultValue=""
80
81
  onChange={[Function]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "8.38.0",
4
+ "version": "8.40.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -57,7 +57,8 @@
57
57
  "test:e2e:ci": "NODE_ENV=development; start-server-and-test styleguide http://localhost:6060 test:e2e",
58
58
  "test:e2e:local": "export NODE_ENV=development; start-server-and-test styleguide http://localhost:6060 test:e2e",
59
59
  "lint": "eslint src",
60
- "lint-fix": "yarn lint --fix"
60
+ "lint-fix": "yarn lint --fix",
61
+ "build-pr": "rm -rf dist && NODE_ENV=development babel src --out-dir dist --copy-files --ignore __tests__,spec.js,test.js"
61
62
  },
62
63
  "browserslist": {
63
64
  "production": [
@@ -17,7 +17,9 @@ test.describe('typeahead component', () => {
17
17
  expect(placeholderAttribute).toBe('Start searching...');
18
18
 
19
19
  // type a word and typeahead should give options
20
- await page.locator('input#typeahead-test').type('red nos');
20
+ await page.locator('input#typeahead-test').type('red nose');
21
+ await page.waitForTimeout(2000);
22
+ await page.locator('label[for="typeahead-test"] ~ div > ul[role="listbox"]').waitFor({ state: 'visible' });
21
23
  await expect(page.locator('label[for="typeahead-test"] ~ div > ul[role="listbox"]')).toBeVisible();
22
24
  await expect(page.locator('label[for="typeahead-test"] ~ div > ul[role="listbox"] > li[id="option-0"]')).toContainText('red nose');
23
25
 
@@ -78,6 +78,7 @@ const Select = React.forwardRef(
78
78
  error={errorMsg}
79
79
  defaultValue={defaultValue}
80
80
  required={optional === false}
81
+ aria-required={optional === false}
81
82
  hasValue={!!value}
82
83
  greyDescription={greyDescription}
83
84
  ref={ref}
@@ -75,6 +75,7 @@ exports[`renders correctly 1`] = `
75
75
  size="s"
76
76
  />
77
77
  <select
78
+ aria-required={true}
78
79
  className="c3"
79
80
  defaultValue=""
80
81
  onChange={[Function]}