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

Storybook test for AboutProjectDisplay.jsx #1113

Open
ddfridley opened this issue Aug 29, 2024 · 0 comments
Open

Storybook test for AboutProjectDisplay.jsx #1113

ddfridley opened this issue Aug 29, 2024 · 0 comments
Assignees

Comments

@ddfridley
Copy link
Collaborator

Create a test using storybook for common/components/common/projects/AboutProjectDisplay.jsx

I got this data buy running the development server and capturing it out. Use this as the data to pass as args in the story. From http://localhost:8000/projects/1

const project= {
  "project_id": 1,
  "project_name": "DemocracyLab Test",
  "project_creator": 2,
  "project_claimed": true,
  "project_created": true,
  "project_approved": true,
  "project_description": "DemocracyLab is building online infrastructure to empower the technology for good movement. We are creating an online hub for civic innovation that uses marketplace dynamics to allocate effort, resources, and attention.",
  "project_description_solution": "Our initial product seeks to optimize the connection between skilled volunteers and technology for good projects. Later offerings will focus on the needs of donors, citizens, and institutions.",
  "project_description_actions": "The result of our work will be an increase in transparency, participation and collaboration within the tech for good movement. We believe this will spur the evolution of new social innovations capable of addressing society’s most significant challenges.  DemocracyLab is a 501(c)(3) nonprofit organization. Our work is rooted in the values of transparency, inclusivity, collaboration, civility and meritocracy. Our platform is built using the MIT Open Source license.",
  "project_short_description": "We build online infrastructure to empower the tech for good movement. Our initial iteration connects volunteers to tech for good projects.",
  "project_url": "http://www.democracylab.org",
  "project_location": "NT_CbPeqdRa32sVQMUTQ08D9C",
  "project_country": "US",
  "project_state": "WA",
  "project_city": "Seattle",
  "project_organization": [
    {
      "display_name": "Hacky New Year 2020",
      "tag_name": "hacky-new-year-2020",
      "caption": "",
      "category": "Organization",
      "subcategory": "",
      "parent": ""
    },
    {
      "display_name": "Hack for Your Mother 2019",
      "tag_name": "hack-for-your-mother-2019",
      "caption": "",
      "category": "Organization",
      "subcategory": "",
      "parent": ""
    },
    {
      "display_name": "Baltimore Civic Hack",
      "tag_name": "baltimore-civic-hack",
      "caption": "",
      "category": "Organization",
      "subcategory": "",
      "parent": ""
    }
  ],
  "project_organization_type": [
    {
      "display_name": "501(c)(3) Nonprofit",
      "tag_name": "nonprofit",
      "caption": "",
      "category": "Organization Type",
      "subcategory": "",
      "parent": ""
    }
  ],
  "project_issue_area": [
    {
      "display_name": "Civic Infrastructure",
      "tag_name": "civic-infrastructure",
      "caption": "",
      "category": "Issue(s) Addressed",
      "subcategory": "",
      "parent": ""
    }
  ],
  "project_stage": [
    {
      "display_name": "6 - Active",
      "tag_name": "active-stage",
      "caption": "",
      "category": "Project Stage",
      "subcategory": "",
      "parent": ""
    }
  ],
  "project_technologies": [
    {
      "display_name": "PostgreSQL",
      "tag_name": "postgre-sql",
      "caption": "",
      "category": "Technologies Used",
      "subcategory": "Database",
      "parent": ""
    },
    {
      "display_name": "JavaScript",
      "tag_name": "javascript",
      "caption": "",
      "category": "Technologies Used",
      "subcategory": "Programming Language",
      "parent": ""
    },
    {
      "display_name": "Figma",
      "tag_name": "figma",
      "caption": "",
      "category": "Technologies Used",
      "subcategory": "Design",
      "parent": ""
    },
    {
      "display_name": "React",
      "tag_name": "react",
      "caption": "",
      "category": "Technologies Used",
      "subcategory": "Web Framework",
      "parent": ""
    },
    {
      "display_name": "Python",
      "tag_name": "python",
      "caption": "",
      "category": "Technologies Used",
      "subcategory": "Programming Language",
      "parent": ""
    }
  ],
  "project_positions": [
    {
      "id": 1,
      "description": "HACKATHON EVENT MANAGER: DemocrayLab's hackathons are an important driver of participation in our platform. We need help to keep them running smoothly.",
      "descriptionUrl": "https://docs.google.com/document/d/1Skfutwl9tI3xDcAGESmJlJGIAHAKu4Czpo-CjwSxqc8/edit?usp=sharing",
      "roleTag": {
        "display_name": "General Operations",
        "tag_name": "business-operations",
        "caption": "",
        "category": "Role",
        "subcategory": "Operations",
        "parent": ""
      },
      "orderNumber": 0,
      "isHidden": false
    }
  ],
  "project_files": [
    {
      "key": "thumbnails/[email protected]/2019.03.22 DemocracyLab Business Plan.pdf_1583955959.407775.pdf",
      "fileName": "20190322 DemocracyLab Business Plan.pdf",
      "fileCategory": "ETC",
      "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btest%40gmail.com%2F2019.03.22+DemocracyLab+Business+Plan.pdf_1583955959.407775.pdf",
      "visibility": "PUBLIC"
    },
    {
      "key": "thumbnails/[email protected]/2019.03.22 DemocracyLab Business Plan.pdf_1583955959.407775.pdf",
      "fileName": "20190322 DemocracyLab Business Plan.pdf",
      "fileCategory": "ETC",
      "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btest%40gmail.com%2F2019.03.22+DemocracyLab+Business+Plan.pdf_1583955959.407775.pdf",
      "visibility": "PUBLIC"
    },
    {
      "key": "thumbnails/[email protected]/2019.03.22 DemocracyLab Business Plan.pdf_1583955959.407775.pdf",
      "fileName": "20190322 DemocracyLab Business Plan.pdf",
      "fileCategory": "ETC",
      "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btest%40gmail.com%2F2019.03.22+DemocracyLab+Business+Plan.pdf_1583955959.407775.pdf",
      "visibility": "PUBLIC"
    },
    {
      "key": "thumbnails/[email protected]/2019.03.22 DemocracyLab Business Plan.pdf_1583955959.407775.pdf",
      "fileName": "20190322 DemocracyLab Business Plan.pdf",
      "fileCategory": "ETC",
      "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btest%40gmail.com%2F2019.03.22+DemocracyLab+Business+Plan.pdf_1583955959.407775.pdf",
      "visibility": "PUBLIC"
    }
  ],
  "project_links": [
    {
      "id": 1,
      "linkName": "Geekwire Article",
      "linkUrl": "https://www.geekwire.com/2018/can-tech-government-innovate-together-social-good-inside-new-effort-change-tide/",
      "visibility": "PUBLIC"
    },
    {
      "id": 6,
      "linkName": "link_coderepo",
      "linkUrl": "https://github.com/DemocracyLab/CivicTechExchange",
      "visibility": "PUBLIC"
    },
    {
      "id": 7,
      "linkName": "link_messaging",
      "linkUrl": "https://join.slack.com/t/democracylab-org/shared_invite/enQtMjY3OTQ1NDI2NzU1LTQzNDBkYTVjNmY1MTU3ZDNjMjI5YzRkNjY0MTRjZDc1ZTZlYTlhODlmMjhjM2QyOGE4ZTRmNjljMTIwMzc3NTA",
      "visibility": "PUBLIC"
    },
    {
      "id": 8,
      "linkName": "link_filerepo",
      "linkUrl": "https://drive.google.com/drive/folders/0B8OO_wbhGTnBMkhaeDVVdHVJX1E",
      "visibility": "PUBLIC"
    },
    {
      "id": 9,
      "linkName": "link_projmanage",
      "linkUrl": "https://trello.com/democracylab1",
      "visibility": "PUBLIC"
    },
    {
      "id": 28,
      "linkName": "link_coderepo",
      "linkUrl": "https://github.com/DemocracyLab/CivicTechExchange",
      "visibility": "PUBLIC"
    },
    {
      "id": 29,
      "linkName": "link_messaging",
      "linkUrl": "https://join.slack.com/t/democracylab-org/shared_invite/enQtMjY3OTQ1NDI2NzU1LTQzNDBkYTVjNmY1MTU3ZDNjMjI5YzRkNjY0MTRjZDc1ZTZlYTlhODlmMjhjM2QyOGE4ZTRmNjljMTIwMzc3NTA",
      "visibility": "PUBLIC"
    },
    {
      "id": 30,
      "linkName": "link_filerepo",
      "linkUrl": "https://drive.google.com/drive/folders/0B8OO_wbhGTnBMkhaeDVVdHVJX1E",
      "visibility": "PUBLIC"
    },
    {
      "id": 31,
      "linkName": "link_projmanage",
      "linkUrl": "https://trello.com/democracylab1",
      "visibility": "PUBLIC"
    },
    {
      "id": 280,
      "linkName": "link_design",
      "linkUrl": "http://www.figma.com",
      "visibility": "PUBLIC"
    }
  ],
  "project_actions": [],
  "project_groups": [],
  "project_events": [
    {
      "event_date_end": "2020-05-22T10:00:00+00:00",
      "event_date_start": "2020-05-22T01:00:00+00:00",
      "event_id": 15,
      "event_slug": "",
      "event_location": "Some Venue\r\n12345 Sixth st\r\nSomeplace, WA, 90210",
      "event_name": "Test Event",
      "event_organizers_text": "DemocracyLab",
      "event_short_description": "Join us online on May 9th to celebrate Mother's Day with a convening of our tech-for-good community.",
      "event_thumbnail": {
        "key": "thumbnails/[email protected]/newFile.jpeg_1590178239.175707.jpeg",
        "fileName": "newFile.jpeg",
        "fileCategory": "THUMBNAIL",
        "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btestadmin%40gmail.com%2FnewFile.jpeg_1590178239.175707.jpeg",
        "visibility": "PUBLIC"
      }
    },
    {
      "event_date_end": "2023-03-02T00:30:00+00:00",
      "event_date_start": "2023-03-01T16:00:00+00:00",
      "event_id": 16,
      "event_slug": "a-better-tech-a-thon",
      "event_location": "Online",
      "event_name": "A Better Tech-a-thon",
      "event_organizers_text": "New York University, Code for America, DemocracyLab",
      "event_short_description": "A single day test event with slug",
      "event_thumbnail": {
        "key": "thumbnails/[email protected]/newFile.jpeg_1647272161.8024857.jpeg",
        "fileName": "newFile.jpeg",
        "fileCategory": "THUMBNAIL",
        "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btestadmin%40gmail.com%2FnewFile.jpeg_1647272161.8024857.jpeg",
        "visibility": "PUBLIC"
      }
    }
  ],
  "project_owners": [
    {
      "id": 2,
      "first_name": "Test",
      "last_name": "User",
      "about_me": "I am just a test user.",
      "user_thumbnail": {
        "key": "thumbnails/[email protected]/newFile.jpeg_1646421990.3714218.jpeg",
        "fileName": "newFile.jpeg",
        "fileCategory": "THUMBNAIL",
        "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btest%40gmail.com%2FnewFile.jpeg_1646421990.3714218.jpeg",
        "visibility": "PUBLIC"
      }
    }
  ],
  "project_date_modified": "2022-03-04 19:36:48.187000+00:00",
  "project_slug": "",
  "is_private": false,
  "project_latitude": -122.32945,
  "project_longitude": 47.60358,
  "project_thumbnail": {
    "key": "thumbnails/[email protected]/newFile.jpeg_1583955645.95397.jpeg",
    "fileName": "newFile.jpeg",
    "fileCategory": "THUMBNAIL",
    "publicUrl": "https://democracylab-marlok.s3.amazonaws.com/thumbnails%2Fmarlonakeating%2Btest%40gmail.com%2FnewFile.jpeg_1583955645.95397.jpeg",
    "visibility": "PUBLIC"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Recent Activity
Development

No branches or pull requests

1 participant