MetaPhase-Consulting/State-TalentMAP

View on GitHub
src/Components/ProfileDashboard/BidList/__snapshots__/BidList.test.jsx.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`BidListComponent matches snapshot 1`] = `
<div
  className="usa-grid-full"
  style={
    Object {
      "position": "relative",
    }
  }
>
  <div>
    <div
      className="usa-grid-full section-padded-inner-container"
    >
      <div
        className="usa-width-one-whole bid-tracker-title--condensed"
      >
        <SkeletonTheme
          color="#0071BB"
          highlightColor="#fff"
        >
          <PositionInformation
            className=""
            icon="clipboard"
            len={3}
            small={false}
            title="Bid List"
          />
          <BidStatusStats
            bidList={
              Array [
                Object {
                  "approved_date": "2017-12-20",
                  "closed_date": "2017-12-20",
                  "create_date": "2017-12-20",
                  "declined_date": "2017-12-20",
                  "draft_date": "2017-12-20",
                  "handshake_accepted_date": "2017-12-20",
                  "handshake_declined_date": "2017-12-20",
                  "handshake_offered_date": "2017-12-20",
                  "id": 3,
                  "in_panel_date": "2017-12-20",
                  "is_priority": false,
                  "position_info": Object {
                    "bid_statistics": Array [
                      Object {
                        "at_skill": 0,
                        "has_handshake_accepted": null,
                        "has_handshake_offered": false,
                        "id": null,
                        "in_grade": 0,
                        "in_grade_at_skill": 0,
                        "total_bids": 0,
                      },
                    ],
                    "bidcycle": Object {
                      "name": "Demo BidCycle 2017-10-31 16:00:51.254762",
                    },
                    "id": 11,
                    "position": Object {
                      "bureau": "(AF) BUREAU OF AFRICAN AFFAIRS",
                      "create_date": "2015-08-05",
                      "grade": "03",
                      "position_number": "10035561",
                      "post": Object {
                        "id": 199,
                        "location": Object {
                          "city": "Freetown",
                          "code": "00A",
                          "country": "Sierra Leone",
                          "id": 103,
                          "state": "",
                        },
                      },
                      "skill": "POLITICAL AND ECONOMIC AFFAIRS (6050)",
                      "title": "POLITICAL/ECONOMIC OFFICER",
                      "update_date": "2017-06-08",
                    },
                  },
                  "reviewer": Object {
                    "email": "woodwardw@state.gov",
                    "first_name": "Wendy",
                    "is_cdo": false,
                    "last_name": "Woodward",
                    "phone_number": "555-555-5555",
                    "username": "woodwardw",
                  },
                  "scheduled_panel_date": "2017-12-20",
                  "status": "approved",
                  "submitted_date": "2017-12-20",
                  "update_date": "2017-12-20",
                  "user": "rehmant",
                },
                Object {
                  "approved_date": "2017-12-20",
                  "closed_date": "2017-12-20",
                  "create_date": "2017-12-20",
                  "declined_date": "2017-12-20",
                  "draft_date": "2017-12-20",
                  "handshake_accepted_date": "2017-12-20",
                  "handshake_declined_date": "2017-12-20",
                  "handshake_offered_date": "2017-12-20",
                  "id": 1,
                  "in_panel_date": "2017-12-20",
                  "is_priority": true,
                  "position_info": Object {
                    "bid_statistics": Array [
                      Object {
                        "at_skill": 0,
                        "has_handshake_accepted": null,
                        "has_handshake_offered": false,
                        "id": null,
                        "in_grade": 0,
                        "in_grade_at_skill": 0,
                        "total_bids": 0,
                      },
                    ],
                    "position": Object {
                      "bidcycle": Object {
                        "name": "Demo BidCycle 2017-10-31 16:00:51.254762",
                      },
                      "bureau": "(AF) BUREAU OF AFRICAN AFFAIRS",
                      "create_date": "2006-09-20",
                      "grade": "05",
                      "id": 1,
                      "position_number": "00003026",
                      "post": Object {
                        "id": 235,
                        "location": Object {
                          "city": "Freetown",
                          "code": "00A",
                          "country": "Sierra Leone",
                          "id": 103,
                          "state": "",
                        },
                      },
                      "skill": "OFFICE MANAGEMENT (9017)",
                      "title": "OMS (COM)",
                      "update_date": "2017-06-08",
                    },
                  },
                  "reviewer": Object {
                    "email": "woodwardw@state.gov",
                    "first_name": "Wendy",
                    "is_cdo": false,
                    "last_name": "Woodward",
                    "phone_number": "555-555-5555",
                    "username": "woodwardw",
                  },
                  "scheduled_panel_date": "2017-12-20",
                  "status": "closed",
                  "submitted_date": "2017-12-20",
                  "update_date": "2017-12-20",
                  "user": "rehmant",
                },
                Object {
                  "approved_date": "2017-12-20",
                  "closed_date": "2017-12-20",
                  "create_date": "2017-12-20",
                  "declined_date": "2017-12-20",
                  "draft_date": "2017-12-20",
                  "handshake_accepted_date": "2017-12-20",
                  "handshake_declined_date": "2017-12-20",
                  "handshake_offered_date": "2017-12-20",
                  "id": 2,
                  "in_panel_date": "2017-12-20",
                  "is_priority": false,
                  "position_info": Object {
                    "bid_statistics": Array [
                      Object {
                        "at_skill": 0,
                        "has_handshake_accepted": null,
                        "has_handshake_offered": false,
                        "id": null,
                        "in_grade": 0,
                        "in_grade_at_skill": 0,
                        "total_bids": 0,
                      },
                    ],
                    "id": 79,
                    "position": Object {
                      "bidcycle": Object {
                        "name": "Demo BidCycle 2017-10-31 16:00:51.254762",
                      },
                      "bureau": "(AF) BUREAU OF AFRICAN AFFAIRS",
                      "create_date": "2006-09-20",
                      "grade": "04",
                      "id": 84,
                      "position_number": "56001600",
                      "post": Object {
                        "id": 195,
                        "location": Object {
                          "city": "Freetown",
                          "code": "00A",
                          "country": "Sierra Leone",
                          "id": 103,
                          "state": "",
                        },
                      },
                      "skill": "SECURITY (2501)",
                      "title": "SPECIAL AGENT",
                      "update_date": "2017-06-08",
                    },
                  },
                  "reviewer": Object {
                    "email": "woodwardw@state.gov",
                    "first_name": "Wendy",
                    "is_cdo": false,
                    "last_name": "Woodward",
                    "phone_number": "555-555-5555",
                    "username": "woodwardw",
                  },
                  "scheduled_panel_date": "2017-12-20",
                  "status": "closed",
                  "submitted_date": "2017-12-20",
                  "update_date": "2017-12-20",
                  "user": "rehmant",
                },
              ]
            }
            condensed={true}
            showTotal={false}
          />
        </SkeletonTheme>
      </div>
    </div>
    <div
      className="bid-list-container"
    >
      <BidTrackerCard
        acceptBid={[Function]}
        bid={
          Object {
            "approved_date": "2017-12-20",
            "closed_date": "2017-12-20",
            "create_date": "2017-12-20",
            "declined_date": "2017-12-20",
            "draft_date": "2017-12-20",
            "handshake_accepted_date": "2017-12-20",
            "handshake_declined_date": "2017-12-20",
            "handshake_offered_date": "2017-12-20",
            "id": 1,
            "in_panel_date": "2017-12-20",
            "is_priority": true,
            "position_info": Object {
              "bid_statistics": Array [
                Object {
                  "at_skill": 0,
                  "has_handshake_accepted": null,
                  "has_handshake_offered": false,
                  "id": null,
                  "in_grade": 0,
                  "in_grade_at_skill": 0,
                  "total_bids": 0,
                },
              ],
              "position": Object {
                "bidcycle": Object {
                  "name": "Demo BidCycle 2017-10-31 16:00:51.254762",
                },
                "bureau": "(AF) BUREAU OF AFRICAN AFFAIRS",
                "create_date": "2006-09-20",
                "grade": "05",
                "id": 1,
                "position_number": "00003026",
                "post": Object {
                  "id": 235,
                  "location": Object {
                    "city": "Freetown",
                    "code": "00A",
                    "country": "Sierra Leone",
                    "id": 103,
                    "state": "",
                  },
                },
                "skill": "OFFICE MANAGEMENT (9017)",
                "title": "OMS (COM)",
                "update_date": "2017-06-08",
              },
            },
            "reviewer": Object {
              "email": "woodwardw@state.gov",
              "first_name": "Wendy",
              "is_cdo": false,
              "last_name": "Woodward",
              "phone_number": "555-555-5555",
              "username": "woodwardw",
            },
            "scheduled_panel_date": "2017-12-20",
            "status": "closed",
            "submitted_date": "2017-12-20",
            "update_date": "2017-12-20",
            "user": "rehmant",
          }
        }
        condensedView={true}
        declineBid={[Function]}
        deleteBid={[Function]}
        isCollapsible={false}
        key="1"
        priorityExists={true}
        readOnly={false}
        registerHandshake={[Function]}
        showBidCount={true}
        showRibbons={false}
        submitBid={[Function]}
        unregisterHandshake={[Function]}
        useCDOView={false}
        userId=""
        userProfile={
          Object {
            "display_name": "...",
            "favorite_positions": Array [],
            "initials": "",
            "user": Object {
              "first_name": "",
              "last_name": "",
              "username": "",
            },
          }
        }
      />
      <BidTrackerCard
        acceptBid={[Function]}
        bid={
          Object {
            "approved_date": "2017-12-20",
            "closed_date": "2017-12-20",
            "create_date": "2017-12-20",
            "declined_date": "2017-12-20",
            "draft_date": "2017-12-20",
            "handshake_accepted_date": "2017-12-20",
            "handshake_declined_date": "2017-12-20",
            "handshake_offered_date": "2017-12-20",
            "id": 3,
            "in_panel_date": "2017-12-20",
            "is_priority": false,
            "position_info": Object {
              "bid_statistics": Array [
                Object {
                  "at_skill": 0,
                  "has_handshake_accepted": null,
                  "has_handshake_offered": false,
                  "id": null,
                  "in_grade": 0,
                  "in_grade_at_skill": 0,
                  "total_bids": 0,
                },
              ],
              "bidcycle": Object {
                "name": "Demo BidCycle 2017-10-31 16:00:51.254762",
              },
              "id": 11,
              "position": Object {
                "bureau": "(AF) BUREAU OF AFRICAN AFFAIRS",
                "create_date": "2015-08-05",
                "grade": "03",
                "position_number": "10035561",
                "post": Object {
                  "id": 199,
                  "location": Object {
                    "city": "Freetown",
                    "code": "00A",
                    "country": "Sierra Leone",
                    "id": 103,
                    "state": "",
                  },
                },
                "skill": "POLITICAL AND ECONOMIC AFFAIRS (6050)",
                "title": "POLITICAL/ECONOMIC OFFICER",
                "update_date": "2017-06-08",
              },
            },
            "reviewer": Object {
              "email": "woodwardw@state.gov",
              "first_name": "Wendy",
              "is_cdo": false,
              "last_name": "Woodward",
              "phone_number": "555-555-5555",
              "username": "woodwardw",
            },
            "scheduled_panel_date": "2017-12-20",
            "status": "approved",
            "submitted_date": "2017-12-20",
            "update_date": "2017-12-20",
            "user": "rehmant",
          }
        }
        condensedView={true}
        declineBid={[Function]}
        deleteBid={[Function]}
        isCollapsible={false}
        key="3"
        priorityExists={true}
        readOnly={false}
        registerHandshake={[Function]}
        showBidCount={true}
        showRibbons={false}
        submitBid={[Function]}
        unregisterHandshake={[Function]}
        useCDOView={false}
        userId=""
        userProfile={
          Object {
            "display_name": "...",
            "favorite_positions": Array [],
            "initials": "",
            "user": Object {
              "first_name": "",
              "last_name": "",
              "username": "",
            },
          }
        }
      />
      <BidTrackerCard
        acceptBid={[Function]}
        bid={
          Object {
            "approved_date": "2017-12-20",
            "closed_date": "2017-12-20",
            "create_date": "2017-12-20",
            "declined_date": "2017-12-20",
            "draft_date": "2017-12-20",
            "handshake_accepted_date": "2017-12-20",
            "handshake_declined_date": "2017-12-20",
            "handshake_offered_date": "2017-12-20",
            "id": 2,
            "in_panel_date": "2017-12-20",
            "is_priority": false,
            "position_info": Object {
              "bid_statistics": Array [
                Object {
                  "at_skill": 0,
                  "has_handshake_accepted": null,
                  "has_handshake_offered": false,
                  "id": null,
                  "in_grade": 0,
                  "in_grade_at_skill": 0,
                  "total_bids": 0,
                },
              ],
              "id": 79,
              "position": Object {
                "bidcycle": Object {
                  "name": "Demo BidCycle 2017-10-31 16:00:51.254762",
                },
                "bureau": "(AF) BUREAU OF AFRICAN AFFAIRS",
                "create_date": "2006-09-20",
                "grade": "04",
                "id": 84,
                "position_number": "56001600",
                "post": Object {
                  "id": 195,
                  "location": Object {
                    "city": "Freetown",
                    "code": "00A",
                    "country": "Sierra Leone",
                    "id": 103,
                    "state": "",
                  },
                },
                "skill": "SECURITY (2501)",
                "title": "SPECIAL AGENT",
                "update_date": "2017-06-08",
              },
            },
            "reviewer": Object {
              "email": "woodwardw@state.gov",
              "first_name": "Wendy",
              "is_cdo": false,
              "last_name": "Woodward",
              "phone_number": "555-555-5555",
              "username": "woodwardw",
            },
            "scheduled_panel_date": "2017-12-20",
            "status": "closed",
            "submitted_date": "2017-12-20",
            "update_date": "2017-12-20",
            "user": "rehmant",
          }
        }
        condensedView={true}
        declineBid={[Function]}
        deleteBid={[Function]}
        isCollapsible={false}
        key="2"
        priorityExists={true}
        readOnly={false}
        registerHandshake={[Function]}
        showBidCount={true}
        showRibbons={false}
        submitBid={[Function]}
        unregisterHandshake={[Function]}
        useCDOView={false}
        userId=""
        userProfile={
          Object {
            "display_name": "...",
            "favorite_positions": Array [],
            "initials": "",
            "user": Object {
              "first_name": "",
              "last_name": "",
              "username": "",
            },
          }
        }
      />
    </div>
    <div
      className="section-padded-inner-container small-link-container view-more-link-centered"
    >
      <Link
        replace={false}
        to="/profile/bidtracker/"
      >
        Go to Bid Tracker
      </Link>
    </div>
  </div>
</div>
`;

exports[`BidListComponent matches snapshot when there are no bids 1`] = `
<div
  className="usa-grid-full"
  style={
    Object {
      "position": "relative",
    }
  }
>
  <div>
    <div
      className="usa-grid-full section-padded-inner-container"
    >
      <div
        className="usa-width-one-whole bid-tracker-title--condensed"
      >
        <SkeletonTheme
          color="#0071BB"
          highlightColor="#fff"
        >
          <PositionInformation
            className=""
            icon="clipboard"
            len={0}
            small={false}
            title="Bid List"
          />
          <BidStatusStats
            bidList={Array []}
            condensed={true}
            showTotal={false}
          />
        </SkeletonTheme>
      </div>
    </div>
    <div
      className="bid-list-container"
    >
      <div
        className="usa-grid-full section-padded-inner-container"
      >
        You have not added any bids to your bid list.
      </div>
    </div>
    <div
      className="section-padded-inner-container small-link-container view-more-link-centered"
    >
      <Link
        replace={false}
        to="/profile/bidtracker/"
      >
        Go to Bid Tracker
      </Link>
    </div>
  </div>
</div>
`;