Sha256: ccbe20f00a8dd817d2ccf78ed5f9fddf9f576ab0c2658261ab6bfad754f7abfd

Contents?: true

Size: 1.83 KB

Versions: 520

Compression:

Stored size: 1.83 KB

Contents

import React from 'react'
import { render, screen, cleanup } from "../utilities/test-utils";

import { HomeAddressStreet } from "..";


const testId = "primary-test"
const address = "70 Prospect Ave"
const city = "West Chester"
const homeId = "8250263"

function HomeAdressStreetTest(props) {
    return (
        <HomeAddressStreet
            address={address}
            addressCont="Apt M18"
            city={city}
            data={{ testid: testId }}
            homeId={homeId}
            homeUrl="https://powerhrg.com/"
            houseStyle="Colonial"
            state="PA"
            territory="PHL"
            zipcode="19382"
            {...props}
    />
    );
  }
  
  test("renders the component", () => {
    render(<HomeAdressStreetTest />);
    const kit = screen.getByTestId("primary-test");
    expect(kit).toBeInTheDocument();
    expect(kit).toHaveClass("pb_home_address_street");

    cleanup()
  });

  test("emphasize street by not setting a prop", () => {
    const { container } = render(<HomeAdressStreetTest />);
    expect(container.getElementsByClassName("pb_title_kit_size_4 pb_home_address_street_address")[0]).toHaveTextContent(address);

    cleanup()
  });

  test("emphasize city", () => {
    const { container } = render(<HomeAdressStreetTest emphasis="city" />);
    expect(container.getElementsByClassName("pb_title_kit_size_4 pb_home_address_street_address")[0]).toHaveTextContent(city);

    cleanup()
  });

  test("renders the hashtag kit", () => {
    const { container } = render(<HomeAdressStreetTest />);
    expect(container.getElementsByClassName("pb_hashtag_kit")[0]).toBeInTheDocument;
    expect(container.getElementsByClassName("pb_hashtag_kit")[0].firstChild).toHaveAttribute("href");
    expect(container.getElementsByClassName("pb_hashtag_kit")[0].firstChild).toHaveTextContent(homeId);

    cleanup()
  });

Version data entries

520 entries across 520 versions & 1 rubygems

Version Path
playbook_ui-13.28.0.pre.alpha.PBNTR297gradientoverlay3029 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.28.0.pre.alpha.dialogturbostreameventlistener3017 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.28.0.pre.alpha.PLAY1338alpha3001 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2987 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2986 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2984 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.27.0 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.26.0.pre.alpha.PBNTR291Dropdownrailsv22840 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12816 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0.pre.alpha.PBNTR291Dropdownrailsv22812 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.26.0 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0.pre.alpha.PLAY1249fixTooltipswrappingformelementscausingmisalignment2785 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0.pre.alpha.PLAY1249fixTooltipswrappingformelementscausingmisalignment2783 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0.pre.alpha.PBNTR272Dropdownkitv42769 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0.pre.alpha.barchartfix2766 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0.pre.alpha.PLAY761globalpaddingpropsbuttons2713 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.25.0 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js
playbook_ui-13.24.0.pre.alpha.play1305drycontenttag2689 app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js