From 8ec5818b939c2f66936570a6ded3e87610e0cf18 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Wed, 11 Mar 2020 10:52:37 -0400 Subject: [PATCH 1/3] feat(Alert): change default alert variant to default --- .../components/Alert/__tests__/Alert.test.tsx | 4 +- .../__snapshots__/AlertGroup.test.tsx.snap | 154 +++++++++++++++++- 2 files changed, 148 insertions(+), 10 deletions(-) diff --git a/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx b/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx index 7b26cfebb25..1806b400726 100644 --- a/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx +++ b/packages/react-core/src/components/Alert/__tests__/Alert.test.tsx @@ -5,14 +5,14 @@ import { Alert, AlertVariant } from '../Alert'; import { AlertActionLink } from '../AlertActionLink'; import { AlertActionCloseButton } from '../AlertActionCloseButton'; -test('default Alert variant is info', () => { +test('default Alert variant is default', () => { const view = mount(Alert testing); expect( view .find('Alert') .childAt(0) .prop('className') - ).toContain('pf-m-info'); + ).toContain('pf-c-alert'); }); Object.values(AlertVariant).forEach(variant => { diff --git a/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap b/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap index 09b1cd2551f..63b21a2c7ce 100644 --- a/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap +++ b/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap @@ -263,12 +263,16 @@ exports[`alertgroup closes when alerts are closed 1`] = `
  • >>>>>> feat(Alert): change default alert variant to default >
  • >>>>>> feat(Alert): change default alert variant to default > +======= + viewBox="0 0 448 512" + width="1em" + > + + + +
    + +

    + + Default alert: + + Test Alert +

    +
    + + + , + "onClick": [MockFunction], + "variant": "plain", + } + } + consumerContext={ + Object { + "isOuia": false, + "ouiaId": null, + } + } + > + + + + + +
    + + + + +>>>>>>> feat(Alert): change default alert variant to default
  • From 114e6ff75b7c677d8914ba3975675900bcf073e0 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Mon, 23 Mar 2020 14:08:18 -0400 Subject: [PATCH 2/3] feat(Alert): rebase conflicts, update demo app --- packages/react-core/src/components/Alert/Alert.tsx | 2 +- .../demo-app-ts/src/components/demos/AlertDemo/AlertDemo.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-core/src/components/Alert/Alert.tsx b/packages/react-core/src/components/Alert/Alert.tsx index 601230fa71d..ff61eda17bc 100644 --- a/packages/react-core/src/components/Alert/Alert.tsx +++ b/packages/react-core/src/components/Alert/Alert.tsx @@ -36,7 +36,7 @@ export interface AlertProps extends Omit, 'actio } export const Alert: React.FunctionComponent = ({ - variant = AlertVariant.info, + variant = AlertVariant.default, isInline = false, isLiveRegion = false, variantLabel = `${capitalize(variant)} alert:`, diff --git a/packages/react-integration/demo-app-ts/src/components/demos/AlertDemo/AlertDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/AlertDemo/AlertDemo.tsx index 79c61c79ce9..841799d877c 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/AlertDemo/AlertDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/AlertDemo/AlertDemo.tsx @@ -44,7 +44,7 @@ export class AlertDemo extends React.Component { Info alert description. This is a link. )} - + Info alert description From 50d8b2ea69a3a2b93886a7773ab815c37b9df84d Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Mon, 23 Mar 2020 14:35:26 -0400 Subject: [PATCH 3/3] feat(Alert): update snapshots --- .../__snapshots__/AlertGroup.test.tsx.snap | 160 ++---------------- 1 file changed, 11 insertions(+), 149 deletions(-) diff --git a/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap b/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap index 63b21a2c7ce..edbde41f7c0 100644 --- a/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap +++ b/packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap @@ -265,14 +265,10 @@ exports[`alertgroup closes when alerts are closed 1`] = ` aria-atomic="false" aria-label="Default Alert" aria-live="polite" -<<<<<<< HEAD - class="pf-c-alert pf-m-info" + class="pf-c-alert" data-ouia-component-id="2" data-ouia-component-type="PF4/Alert" data-ouia-safe="true" -======= - class="pf-c-alert" ->>>>>>> feat(Alert): change default alert variant to default >
    >>>>>> feat(Alert): change default alert variant to default >
    - - +

    - Info alert: + Default alert: Test Alert

    @@ -499,21 +490,12 @@ exports[`alertgroup closes when alerts are closed 1`] = ` aria-label="Close" onClose={[MockFunction]} title="Test Alert" - variantLabel="Info alert:" + variantLabel="Default alert:" >
    -======= - viewBox="0 0 448 512" - width="1em" - > - - - -
    - -

    - - Default alert: - - Test Alert -

    -
    - - - , - "onClick": [MockFunction], - "variant": "plain", - } - } - consumerContext={ - Object { - "isOuia": false, - "ouiaId": null, - } - } - > - - - - - -
    - -
    - - ->>>>>>> feat(Alert): change default alert variant to default