OOP_TeamProfileGenerator

Description

10 Object-Oriented Programming: Team Profile Generator

This is a Node.js command-line application that takes in information about employees on a software engineering team, then generates an HTML webpage that displays summaries for each person. A unit test was written for every part of the code and ensure that it passes each test.

Link to GitHub repository: Team Profile Generator

Link to walkthrough video: TPG demo Video

Table of Contents

User Story

AS A manager
I WANT to generate a webpage that displays my team's basic info
SO THAT I have quick access to their emails and GitHub profiles

Mock Up

The following image shows a mock-up of the generated HTML’s appearance and functionality. HTML webpage titled “My Team” features five boxes listing employee names, titles, and other key info

Demo

Link to walkthrough video demosonstrating the functionality of the Team Profile Generator and all tests passing: Team Profile Generator Demo)

Acceptance Criteria

GIVEN a command-line application that accepts user input
WHEN I am prompted for my team members and their information
THEN an HTML file is generated that displays a nicely formatted team roster based on user input
WHEN I click on an email address in the HTML
THEN my default email program opens and populates the TO field of the email with the address
WHEN I click on the GitHub username
THEN that GitHub profile opens in a new tab
WHEN I start the application
THEN I am prompted to enter the team manager’s name, employee ID, email address, and office number
WHEN I enter the team manager’s name, employee ID, email address, and office number
THEN I am presented with a menu with the option to add an engineer or an intern or to finish building my team
WHEN I select the engineer option
THEN I am prompted to enter the engineer’s name, ID, email, and GitHub username, and I am taken back to the menu
WHEN I select the intern option
THEN I am prompted to enter the intern’s name, ID, email, and school, and I am taken back to the menu
WHEN I decide to finish building my team
THEN I exit the application, and the HTML is generated

Installation

Usage

Directory Structure

__tests__/			// jest tests
  Employee.test.js
  Engineer.test.js
  Intern.test.js
  Manager.test.js
dist/               // rendered output (HTML) and CSS style sheet
lib/				// classes
src/				// template helper code
index.js			// runs the application

The application includes Employee, Manager, Engineer, and Intern classes.

Employee parent class with the following properties and methods:

The other three classes extend Employee.

Employee’s properties and methods, Manager have the following:

Employee’s properties and methods, Engineer have the following:

Employee’s properties and methods, Intern have the following:

Tests

Manager Test:
  test("Set Office Number from constructor", () => {
  const testValue = 0;
  const emp = new Manager("Johnny", 0, "johnny@fmail.com", testValue);
  expect(emp.officeNumber).toBe(testValue);
  });

Engineer Test:
    test("Set GitHub Account from constructor", () => {
    const testValue = "GitHub"
    const emp = new Engineer("Bobby", 4, "https://github.com/fgithubaccount", testValue);
    expect(emp.github).toBe(testValue);
  });

Employee Test:
  test("new Employee created", () => {
  const emp = new Employee();
  expect(typeof(emp)).toBe("object");
  });

Intern Test:
  test("get school from constructor", () => {
  const testValue = "The Ohio State University";
  const emp = new Intern("Ali", 4, "ali@fmail.com", testValue);
  });

Grading Requirements

Submitted for Review

Questions

Email: rdevans87@gmail.com

Github: rdevans87

License

MIT License