Skip to content

Commit

Permalink
Merge branch 'main' into ts-notification-props-undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
tay1orjones authored Oct 31, 2023
2 parents 7975c35 + e5b8fc6 commit f37c163
Show file tree
Hide file tree
Showing 63 changed files with 1,647 additions and 948 deletions.
17 changes: 17 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,14 @@
]
},
{
"login": "Nirajsah",
"name": "Niraj Sah",
"avatar_url": "https://avatars.githubusercontent.com/u/51414373?v=4",
"profile": "https://github.com/Nirajsah",
"contributions": [
"code"
]
},
"login": "allisonishida",
"name": "Allison Ishida",
"avatar_url": "https://avatars.githubusercontent.com/u/22247062?v=4",
Expand All @@ -1306,6 +1314,15 @@
"contributions": [
"code"
]
},
{
"login": "Tresau-IBM",
"name": "Tresau-IBM",
"avatar_url": "https://avatars.githubusercontent.com/u/148357638?v=4",
"profile": "https://github.com/Tresau-IBM",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Run yarn dedupe
Expand All @@ -30,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand All @@ -43,7 +43,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand All @@ -58,10 +58,11 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- uses: actions/cache@v3
if: github.event_name != 'merge_group'
id: cache
with:
path: |
Expand All @@ -84,10 +85,11 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- uses: actions/cache@v3
if: github.event_name != 'merge_group'
id: cache
with:
path: |
Expand Down Expand Up @@ -123,10 +125,11 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- uses: actions/cache@v3
if: github.event_name != 'merge_group'
id: cache
with:
path: |
Expand Down Expand Up @@ -182,10 +185,11 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- uses: actions/cache@v3
if: github.event_name != 'merge_group'
id: cache
with:
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
repository: carbon-design-system/design-language-website
ref: master
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
repository: carbon-design-system/gatsby-theme-carbon
ref: main
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-react-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@main
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@main
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/v10-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Run yarn dedupe
Expand All @@ -29,7 +29,7 @@ jobs:
with:
ref: v10
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand All @@ -44,7 +44,7 @@ jobs:
with:
ref: v10
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand All @@ -61,7 +61,7 @@ jobs:
with:
ref: v10
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- uses: actions/cache@v3
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
with:
ref: v10
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/v10-deploy-react-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/v10-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
fetch-depth: '0'
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 #v4.0.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/amanlajpal"><img src="https://avatars.githubusercontent.com/u/42869088?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aman Lajpal</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=amanlajpal" title="Code">💻</a> <a href="https://github.com/carbon-design-system/carbon/commits?author=amanlajpal" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Nirajsah"><img src="https://avatars.githubusercontent.com/u/51414373?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Niraj Sah</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Nirajsah" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/allisonishida"><img src="https://avatars.githubusercontent.com/u/22247062?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Allison Ishida</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=allisonishida" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/alewitt2"><img src="https://avatars.githubusercontent.com/u/48691328?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alex Lewitt</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=alewitt2" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Tresau-IBM"><img src="https://avatars.githubusercontent.com/u/148357638?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tresau-IBM</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=Tresau-IBM" title="Code">💻</a></td>
</tr>
</table>

Expand Down
69 changes: 69 additions & 0 deletions e2e/components/Menu/Menu-test.avt.e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* Copyright IBM Corp. 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';

const { expect, test } = require('@playwright/test');
const { visitStory } = require('../../test-utils/storybook');

test.describe('Menu @avt', () => {
test('@avt-default-state', async ({ page }) => {
await visitStory(page, {
component: 'Menu',
id: 'components-menu--playground',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('Menu @avt-default-state');
});

test('@avt-keyboard-nav Menu', async ({ page }) => {
await visitStory(page, {
component: 'Menu',
id: 'components-menu--playground',
globals: {
theme: 'white',
},
});

const firstItem = page.getByRole('menuitem', { name: 'Share with' });
const LastItem = page.getByRole('menuitem', { name: 'Delete' });
const nestedMenu = page.getByRole('menu', { name: 'Share with' });
const nestedMenuItem = page
.getByRole('menuitemradio', {
name: 'None',
})
.first();

await expect(firstItem).toBeVisible();
await expect(LastItem).toBeVisible();
await expect(nestedMenu).not.toBeVisible();
await expect(firstItem).toBeFocused();

// Should go to last item when focused on the first item and arrow up is pressed
await page.keyboard.press('ArrowUp');
await expect(LastItem).toBeFocused();

// Should open menu with ArrowRight and focus on first item
await page.keyboard.press('ArrowDown');
await expect(firstItem).toBeFocused();
await page.keyboard.press('ArrowRight');
await expect(nestedMenu).toBeVisible();
await expect(nestedMenuItem).toBeVisible();
await expect(nestedMenuItem).toBeFocused();
await expect(nestedMenuItem).not.toBeChecked();

// Should select item with enter key
await page.keyboard.press('Enter');
await expect(nestedMenuItem).toBeChecked();

// Should close menu with ArrowLeft
await page.keyboard.press('ArrowLeft');
await expect(nestedMenu).not.toBeVisible();
});
});
15 changes: 2 additions & 13 deletions e2e/components/Menu/Menu-test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

'use strict';

const { expect, test } = require('@playwright/test');
const { test } = require('@playwright/test');
const { themes } = require('../../test-utils/env');
const { snapshotStory, visitStory } = require('../../test-utils/storybook');
const { snapshotStory } = require('../../test-utils/storybook');

test.describe('Menu', () => {
themes.forEach((theme) => {
Expand All @@ -23,15 +23,4 @@ test.describe('Menu', () => {
});
});
});

test('accessibility-checker @avt', async ({ page }) => {
await visitStory(page, {
component: 'Menu',
id: 'components-menu--playground',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('Menu');
});
});
Loading

0 comments on commit f37c163

Please sign in to comment.