Skip to content

Commit

Permalink
Merge branch 'main' into 6361--deprecate-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMelox authored Dec 18, 2024
2 parents 9cd5e19 + dcf4364 commit fdd2acc
Show file tree
Hide file tree
Showing 233 changed files with 6,083 additions and 4,971 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,28 +182,6 @@ jobs:
name: playwright-avt-report
path: .playwright

vrt-runner:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'
cache: yarn
- name: Install
run: yarn
- name: Install browsers
run: yarn playwright install --with-deps
- name: Build project
run: yarn build
- name: Run VRT
working-directory: packages/core
env:
PERCY_TOKEN: web_d04495b0b413d61c2ea6b9118d1748b43f4fdd58d17ebe453ef8e0016b5766e4
run: yarn percy storybook storybook-static

avt:
if: ${{ always() }}
runs-on: ubuntu-latest
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/process-pr-review-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ jobs:
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20.x'
cache: yarn
- uses: ./actions/add-review-labels
with:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_INSTALLATION_ID: ${{ secrets.APP_INSTALLATION_ID }}
7 changes: 7 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ jobs:
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Generate token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create PR
id: create-pr
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
Expand Down
7 changes: 7 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
module.exports = {
extends: ['stylelint-config-carbon'],
plugins: ['stylelint-plugin-carbon-tokens'],
rules: {
'max-nesting-depth': null,
'scss/no-global-function-names': null,
'csstools/use-logical': null,
'scss/load-no-partial-leading-underscore': null,
'scss/double-slash-comment-inline': null,
'no-duplicate-selectors': null,

'carbon/layout-use': true,
'carbon/motion-duration-use': [true, { severity: 'warning' }],
'carbon/motion-easing-use': true,
'carbon/theme-use': true,
'carbon/type-use': true,
},
};
6 changes: 3 additions & 3 deletions .vscode/carbon-snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"prefix": [
"//la"
],
"body": "// stylelint-disable-next-line carbon/layout-token-use"
"body": "// stylelint-disable-next-line carbon/layout-use"
},
"Stylelint disable next line Carbon Duraion": {
"scope": "scss",
Expand All @@ -49,14 +49,14 @@
"prefix": [
"//ty"
],
"body": "// stylelint-disable-next-line carbon/type-token-use"
"body": "// stylelint-disable-next-line carbon/type-use"
},
"Stylelint disable next line Carbon Theme": {
"scope": "scss",
"prefix": [
"//th"
],
"body": "// stylelint-disable-next-line carbon/theme-token-use"
"body": "// stylelint-disable-next-line carbon/theme-use"
},
// spacing tokens
"spacing-01 (0.125rem 2px)": { "scope": "scss", "prefix": ["$sp", "$car"], "body": "$$spacing-01", "description": "Carbon spacing token" },
Expand Down
3 changes: 3 additions & 0 deletions actions/add-review-labels/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
APP_PRIVATE_KEY:
description: GitHub app private key
required: true
APP_INSTALLATION_ID:
description: Carbon automation GitHub app installation id
required: true
runs:
using: 'docker'
image: 'Dockerfile'
7 changes: 5 additions & 2 deletions actions/add-review-labels/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ async function run() {
const privateKey = core.getInput('APP_PRIVATE_KEY', {
required: true,
});
const installId = core.getInput('APP_INSTALLATION_ID', {
required: true,
});
const app = new App({ appId, privateKey });
const octokit = await app.getInstallationOctokit(52238220);
const octokit = await app.getInstallationOctokit(installId);

const { workflow_run, repository, organization } = context.payload;
const workflowRunId = workflow_run.id;
Expand Down Expand Up @@ -98,7 +101,7 @@ async function run() {
// Get reviewer team data
const { data } = await octokit.request('GET /orgs/{org}/teams/{team_slug}', {
org: organization.login,
team_slug: 'reviewing-team', // Should be only hardcoded value (outside of the labels) needed within this action. Replace with the appropriate reviewing team that is assigned to review PRs.
team_slug: 'carbon-for-ibm-products-reviewers', // Should be only hardcoded value (outside of the labels) needed within this action.
headers: {
'X-GitHub-Api-Version': '2022-11-28',
},
Expand Down
2 changes: 1 addition & 1 deletion config/babel-preset-ibm-cloud-cognitive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon)/'"
},
"devDependencies": {
"npm-check-updates": "^16.14.12"
"npm-check-updates": "^17.1.11"
},
"dependencies": {
"@babel/core": "^7.23.9",
Expand Down
19 changes: 19 additions & 0 deletions config/jest-config-ibm-cloud-cognitive/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [1.15.0-rc.0](https://github.com/carbon-design-system/ibm-products/compare/jest-config-ibm-cloud-cognitive@[email protected]) (2024-12-09)


### Bug Fixes

* update accessibility-checker version ([#6525](https://github.com/carbon-design-system/ibm-products/issues/6525)) ([d8c7051](https://github.com/carbon-design-system/ibm-products/commit/d8c70518087e7e41fdf1aa45cbbf692389058d56))





# [1.14.0](https://github.com/carbon-design-system/ibm-products/compare/jest-config-ibm-cloud-cognitive@[email protected]) (2024-12-04)

**Note:** Version bump only for package jest-config-ibm-cloud-cognitive





# [1.14.0-rc.0](https://github.com/carbon-design-system/ibm-products/compare/jest-config-ibm-cloud-cognitive@[email protected]) (2024-11-25)

**Note:** Version bump only for package jest-config-ibm-cloud-cognitive
Expand Down
6 changes: 3 additions & 3 deletions config/jest-config-ibm-cloud-cognitive/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jest-config-ibm-cloud-cognitive",
"private": true,
"version": "1.14.0-rc.0",
"version": "1.15.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand All @@ -22,7 +22,7 @@
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^chalk$)/'"
},
"devDependencies": {
"npm-check-updates": "^16.14.12"
"npm-check-updates": "^17.1.11"
},
"peerDependencies": {
"jest": "^29.7.0"
Expand All @@ -36,7 +36,7 @@
"@babel/preset-env": "^7.18.2",
"@babel/preset-react": "^7.17.12",
"@testing-library/jest-dom": "^6.3.0",
"accessibility-checker": "^3.1.65",
"accessibility-checker": "^3.1.78",
"axe-core": "^4.8.3",
"babel-jest": "^29.7.0",
"babel-preset-ibm-cloud-cognitive": "^0.14.40",
Expand Down
16 changes: 16 additions & 0 deletions config/storybook-addon-carbon-theme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [2.5.0-rc.0](https://github.com/carbon-design-system/ibm-products/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-12-09)

**Note:** Version bump only for package @carbon/storybook-addon-theme





# [2.4.0](https://github.com/carbon-design-system/ibm-products/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-12-04)

**Note:** Version bump only for package @carbon/storybook-addon-theme





# [2.4.0-rc.0](https://github.com/carbon-design-system/ibm-products/compare/@carbon/[email protected]...@carbon/[email protected]) (2024-11-25)

**Note:** Version bump only for package @carbon/storybook-addon-theme
Expand Down
4 changes: 2 additions & 2 deletions config/storybook-addon-carbon-theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@carbon/storybook-addon-theme",
"description": "Carbon theme switcher for Storybook",
"version": "2.4.0-rc.0",
"version": "2.5.0-rc.0",
"license": "Apache-2.0",
"main": "dist/react.js",
"repository": {
Expand Down Expand Up @@ -60,7 +60,7 @@
"@babel/cli": "^7.23.9",
"@babel/core": "^7.23.9",
"@babel/preset-react": "^7.23.3",
"npm-check-updates": "^16.14.12",
"npm-check-updates": "^17.1.11",
"npm-run-all": "^4.1.5",
"rimraf": "^5.0.5"
}
Expand Down
51 changes: 51 additions & 0 deletions e2e/components/Checklist/Checklist-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,56 @@ test.describe('Checklist @avt', () => {
},
});
await expect(page).toHaveNoACViolations('Checklist @avt-default-state');

const buttonEle = page.locator('[aria-label="Checklist toggle"]');
const viewButton = page.getByRole('button', { name: 'View all (10)' });
const tooltipContent = await page.getByText('Toggle');
const taskButtons = page.locator('[title="Task name"]');
//press tab to move focus to buttonELement
await page.keyboard.press('Tab');
await expect(buttonEle).toBeInViewport();
await expect(buttonEle).toBeFocused();

//check the checklist is expanded
await expect(buttonEle).toHaveAttribute('aria-expanded', 'true');
await expect(viewButton).toBeVisible();
//Press enter to collapse the checklist
await page.keyboard.press('Enter');
await expect(buttonEle).toHaveAttribute('aria-expanded', 'false');

//Press escape to hide tooltip
await page.keyboard.press('Escape');
await expect(tooltipContent).not.toBeVisible();

//Press tab to move focus to 1st Task name
await page.keyboard.press('Tab');
await expect(taskButtons.nth(0)).toBeFocused();

//Press tab to move focus to 2nd Task name
await page.keyboard.press('Tab');
await expect(taskButtons.nth(1)).toBeFocused();

//Press tab to move focus to 3rd Task name
await page.keyboard.press('Tab');
await expect(taskButtons.nth(2)).toBeFocused();

//Press tab to move focus to View all(10) button
await page.keyboard.press('Tab');
await expect(viewButton).toBeFocused();

//check button element is showing Toggle tooltip while hovering
await buttonEle.hover();
await expect(tooltipContent).toBeVisible();
});

test('@avt-task-state', async ({ page }) => {
await visitStory(page, {
component: 'Checklist',
id: 'ibm-products-onboarding-checklist--task-states',
globals: {
carbonTheme: 'white',
},
});
await expect(page).toHaveNoACViolations('Checklist @avt-task-state');
});
});
Loading

0 comments on commit fdd2acc

Please sign in to comment.