Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement WorkflowCardBody Component #319

Merged

Conversation

ektaghag-eaton
Copy link
Contributor

@ektaghag-eaton ektaghag-eaton commented Jan 23, 2024

Fixes 5099 .

Changes proposed in this Pull Request:

Screenshots / Screen Recording (if applicable)

Screenshot 2024-01-18 at 12 32 08 PM Screenshot 2024-01-23 at 5 53 48 PM Screenshot 2024-01-23 at 5 56 27 PM

To Test:

  • Go to the homepage click on workflowCardBody Example button

Any specific feedback you are looking for?

@github-actions github-actions bot added the brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering label Jan 23, 2024
@ektaghag-eaton ektaghag-eaton changed the base branch from dev to release/R31 January 23, 2024 12:27
@JeffGreiner-eaton
Copy link
Collaborator

JeffGreiner-eaton commented Jan 23, 2024

This looks good on Android phone, unable to verify the hook & styles for tablet if

  • someone else would please verify that and I will approve this PR

Also we need to figure out if we want to continue to use react-test-renderer or just use { render } from '@testing-library/react-native'

This would remove the setup stuff thats required from the renderer.

  • From this
describe('WorkflowCardBody Test', () => {
    afterEach(cleanup);
    it('WorkflowCardBody renders correctly', () => {
        const rendered = renderer
            .create(
                <WorkflowCardBody>
                    <Text>This is workflow card body content.</Text>
                </WorkflowCardBody>
            )
            .toJSON();
        expect(rendered).toBeTruthy();
    });
});
  • To this
describe('WorkflowCardBody Test', () => {
    afterEach(cleanup);
    it('WorkflowCardBody renders correctly', () => {
        render(
                <WorkflowCardBody>
                    <Text>This is workflow card body content.</Text>
                </WorkflowCardBody>
        )
            .toJSON();
        expect(render).toBeTruthy();
    });
});

we also need to remove enzyme items from package

@JeffGreiner-eaton
Copy link
Collaborator

refer to my comment above, was able to verify tablet iPad working with style

image
image

@@ -0,0 +1,24 @@
/**
Copy link
Collaborator

@JeffGreiner-eaton JeffGreiner-eaton Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe something like this..

/**
 * @format
 */

import React from 'react';
import { cleanup, render, screen } from '@testing-library/react-native';
import { WorkflowCardBody } from 'src/components/WorkflowCard';
import { Text } from 'react-native-paper';

describe('WorkflowCardBody Test', () => {
    afterEach(cleanup);
    it('WorkflowCardBody renders correctly', () => {
        render(
                <WorkflowCardBody>
                    <Text>This is workflow card body content.</Text>
                </WorkflowCardBody>
        )
            .toJSON();
        expect(render).toBeTruthy();
        expect(screen.getByText('This is workflow card body content.')).toBeTruthy();
    });
});

Copy link
Contributor

@surajeaton surajeaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulator Screenshot - iphone 12 pro - 2024-01-24 at 12 28 37
Looks good and works fine on ios.

Just the small changes @JeffGreiner-eaton suggested.

@ektaghag-eaton ektaghag-eaton merged commit 73ca283 into release/R31 Jan 24, 2024
1 check passed
@ektaghag-eaton ektaghag-eaton deleted the feature/blui-5099-workflowcardBodyCompoenent branch January 24, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering
Development

Successfully merging this pull request may close these issues.

3 participants