Skip to content

Commit

Permalink
Merge branch 'main' into ts-useDisableSelectRows-5186
Browse files Browse the repository at this point in the history
  • Loading branch information
makafsal authored Jul 9, 2024
2 parents ab34879 + ebed350 commit d299516
Show file tree
Hide file tree
Showing 33 changed files with 850 additions and 102 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Deploy production storybook
# This workflow is triggered from the `release-base` workflow when a full release
# has been successfully completed
on:
repository_dispatch:
types: [deploy-latest-storybook]
workflow_dispatch:
workflow_call:

jobs:
deploy-latest-storybook:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: Deploy staging storybook
# Gets triggered every time a change is pushed to the `release/v2*` branch or can be manually triggered
on:
workflow_dispatch:
workflow_call:
push:
branches: [release/v2*]

Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/release-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,14 @@ jobs:
echo "DRY RUN: ${{ env.DRY_RUN }}"
yarn lerna publish --create-release github --preid rc --pre-dist-tag next $(echo "${{ env.DRY_RUN }}")
# After successfully publishing a full release, trigger the production storybook environment deployment workflow.
# Pass in the release branch name to the storybook deployment job so it build off the release branch
- name: Dispatch production storybook deployment workflow
if: ${{ (github.event.inputs.type == 'full minor release') || (github.event.inputs.type == 'full patch release') }}
uses: peter-evans/repository-dispatch@v3
with:
event-type: deploy-latest-storybook
client-payload: '{"branch": "${{ github.ref_name }}"}'
deploy-staging:
needs: release
# Trigger staging storybook enviroment deployment workflow
if: ${{ github.event.inputs.dry-run == 'false' }}
uses: ./.github/workflows/deploy-staging.yml

deploy-latest:
needs: release
# If full release has been published, trigger the production storybook environment deployment workflow.
if: ${{ (github.event.inputs.dry-run == 'false') && ((github.event.inputs.type == 'full minor release') || (github.event.inputs.type == 'full patch release')) }}
uses: ./.github/workflows/deploy-latest.yml
16 changes: 16 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,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

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

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





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

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





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


Expand Down
2 changes: 1 addition & 1 deletion 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.3.0-rc.0",
"version": "1.4.0-rc.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down
40 changes: 40 additions & 0 deletions e2e/components/CreateFlows/CreateFullPage-test.avt.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import { expect, test } from '@playwright/test';
import { visitStory } from '../../test-utils/storybook';

test.describe.configure({ mode: 'parallel' });

test.describe('CreateFullPage @avt', () => {
test('@avt-default-state', async ({ page }) => {
await visitStory(page, {
Expand All @@ -25,4 +27,42 @@ test.describe('CreateFullPage @avt', () => {
'CreateFullPage @avt-default-state'
);
});

test('@avt-error-disabled-state', async ({ page }) => {
await visitStory(page, {
component: 'CreateFullPage',
id: 'ibm-products-patterns-create-flows-createfullpage--create-full-page',
globals: {
carbonTheme: 'white',
},
});
const inputElement = await page.locator('#test-1');
await inputElement.click();
await page.mouse.click(0, 0);
const dataInvalid = await inputElement.getAttribute('data-invalid');
const nextButtonElement = page.locator('button:has-text("Next")');
const backButtonElement = page.locator('button:has-text("Back")');
const isNextDisabled = await nextButtonElement.evaluate((button) =>
button.hasAttribute('disabled')
);
const isBackDisabled = await backButtonElement.evaluate((button) =>
button.hasAttribute('disabled')
);
await expect(dataInvalid).toBe('true');
await expect(isBackDisabled).toBe(true);
await expect(isNextDisabled).toBe(true);
await inputElement.click();
await inputElement.fill('test');
await expect(inputElement).toHaveValue('test');
const isNextDisabledNow = await nextButtonElement.evaluate((button) =>
button.hasAttribute('disabled')
);
const isBackDisabledNow = await backButtonElement.evaluate((button) =>
button.hasAttribute('disabled')
);
await expect(isNextDisabledNow).toBe(false);
await expect(isBackDisabledNow).toBe(true);
const dataInvalidNow = await inputElement.getAttribute('data-invalid');
await expect(dataInvalidNow).toBe(null);
});
});
Loading

0 comments on commit d299516

Please sign in to comment.