Skip to content

Commit

Permalink
P2Fancy: SourceAcademy GitHub Classroom with central repository (#1771)
Browse files Browse the repository at this point in the history
* test: Fixed tests for FileExplorerDialog

* test: wrote tests for GitHubMissionDataUtils

* test: wrote tests for GitHubMissionBrowserDialog and GitHubSaveDialog

* feat: removed unnecessary console log

* feat: increased code coverage for GitHubMissionDataUtils

* style: run format

* refactor: removed unused files

* feat: Added back apparently used files

* feat: Improved the default text for Task and Mission briefings

* feat: added GitHubAssessmentsNavigationBar

Shifted working GitHubLogin to the navbar

* Revert "feat: added GitHubAssessmentsNavigationBar"

This reverts commit f44eb77.

* Refactor GitHub missions to use navbar

* Yarn run format and test

* feat: Added time-based sorting for mission browser

* feat: Added due date display

* style: fixed imports for GitHubMisisons

* refactor: removed outdated code

* Updated props for Application and Navbar tests

* fixed typo in NavigationBar test

* refactor: changed MissionData to use a typescript declaration

* refactor: changed MissionMetadata to use a typescript declaration

* style: ran yarn format

* feat: Made MissionRepoData a typescript type

* refactor: changed TaskData to use a typescript declaration

* refactor: fixed imports for some files

* feat: removed the popover from GitHubLoginButton for better UX

* test: Added snapshot test for GitHubAssessmentsNavigationBar

* style: ran format

* style: used relative imports

* removed unused props

* Added GitHubMission navlink to mobile

* fixed editorvalue in applicationtypes

* removed popover for GitHubLoginButton

* refactor: used the old buttons for next and previous task

* Changed MissionData and MissionMetadata to use TypeScript type declaration.

* yarn run format

* yarn run format

* fixed GitHubmissionDataUtil test

* fixed import for GitHubMissionDataUtils

* refactor: removed the TaskView button from the control bar

* feat: Added error-handling to getContentAsString in GitHubMissionDataUtils

* refactor: made the GH Assessments datatypes to be export defaults

* refactor: fixed imports

* refactor: removed redundant missionTask and missionBriefing types

* refactor: renamed _mission.scss for more clarity

* test: Fixed test import for GitHubMissionDataUtils

* refactor: moved references to store out of FileExplorerDialog

* refactor: renamed GitHubMissions to GitHubMissionListing

* test: updated tests

* refactor: Fixed imports in Application

* feat: fixed the case check for mission repos

* feat: the mission listing only lists mission repositories that have a METADATA file

* feat: Added more user feedback for when loading mission repos

* style: ran format

* refactor: GitHubAssessment(Workspace) refactored

* style: fixed styling in GitHubAssessmentWorkspace

* refactor: removed files unused in current phase of project

* Added briefing and reset overlay to GitHubAssessmentWorkspace

* feat: Added toggle variable to constants for GitHubAssessments

* fix: fix for previous commit

* fix: display correct task descriptions

* feat: Added unsaved changes warning to the save button

* fixed GitHubAssessmentWorkspace editCode to use setTaskList

* feat: Added re-routing to mission listing if user is not logged in

* fix: made correct task descriptions show

* feat: changed the filename of the metadata file

* style: ran format

* feat: Added loading state to GitHubAssessmentWorkspace page

* docs: removed unnecessary comments from ControlBarGitHubButtons

* docs: removed unnecessary comments

* docs: Added comments for ControlBarGitHubButtons

* docs: Added comments to GitHubMissionDataUtils

* docs: Added documentation for GitHub-related components

* style: run yarn format

* docs: Added comments to GitHubAssessmentsNavigationBar

* docs: Added more documentation to GitHubUtils

* docs: Added documentation to GitHubMissionListing

* test: updated snapshot for navbar

* removed githuboctokitinstance from Application

* fixed Playground test props

* fix: updated Constants to pass CI

* Added: filter for GitHubMissionListing page

* let getGitHubOctokitInstance be any type for test

* Yarn run format and test

* updated GitHubMissionListingFilter

Filter is now && for all tags (meaning that mission must contain all tags to be shown.
Filter is case insensitive now.

* fix: updated .env.example file

* fix: force 404 on githubassessments page according to .env variables

* fix: removed unused prop, fixed props types in ControlBarGitHubButtons

* fix: used explicit prop type in RepositoryDialog and FileExplorerDialog

* refactor: slight refactor in FileExplorerDialog

* fix: add error pop-up to GitHubMissionDataUtils

* fix: fix typo, numProps should be dateProps

* fix: moved github mission types into a single file

* fix: removed unused props from GitHubAssessmentWorkspace

* fix: revert the previous changes that removed props

* fix: editCode function no longer mutates original array

* fix: removed unnecessary array copying

* fix: used properly updated large spinner size

* fix: Added explicit typing for GitHubRepositoryInformation retrieved through octokit

* fix: removed unused side content type for current phase

* fix: Added tracking for unsaved changes after resetting

* fix: removed unused Debugger functions from GitHubAssessmentWorksapce

* style: yarn run format

* fix: removed handleInterruptEval from GitHubAssessmentWorkspace

* fix: removed more unused callbacks from GitHubAssessmentWorkspace

* fix: renamed SourceChapter

* feat: made showOverlay in the same re-render as loading missions

* fix: use same onChangeTabs for mobile workspace

* Added GitHubCourseListing page

* Updated to show mission links

* Updated snapshot

* Fixed GitHubCourseListing filter

* feat: Added explicit typing for Octokit return values

* feat: explicitly typed listForAuthenticatedUser

* fix: removed unnecessary console log

* fix: made GitHubMissionDataUtils octokit param explicitly typed

* test: rewrote FileExplorerDialog test

* test: rewrote tests for GitHubTreeNodeCreator

* refactor: rewrote GitHubMissionListing for better readability

* refactor: rewrote GitHubMissionListing to use Promise.all

* reactor: rewrote GitHubMissionListing for better clarity

* feat: tags are now case-agnostic in GitHubMissionListing

* Added feature to filter missions by org and show unaccepted missions

* fix: solved compile error due to possible null or undefined

* fix: Added handling of case where there are no mission repos

* fix: removed currently unused style for missionEditor

* fix: Fix style naming for GitHubAssessmentWorkspace

* fix: temporarily removed sideContentMissionEditor style

* Removed white navbar from mobile GitHubMissionListing

* Fixed missing props in NavigationBarMobileSideMenu test

* fix: Removed refresh calls in FileExplorerDialog

* Replaced deprecated ITreeNode with TreeNodeInfo

* fix: Fixed GitHubMissionListing which would sometimes display wrong non-ideal state message

* fix: Added login button to GitHubMissionListing in mobile version

* test: fixed OctokitTypes to pass CI

* test: fixed OctokitTypes to pass CI

* test: fixed OctokitTypes to pass CI

* test: fixed OctokitTypes to pass CI

* fix: reinstated 404 when githubassessments should not be shown

* fix: Fixed prop types for ControlBarGitHubButtons

* feat: Added onClickReturn callback to next button in GitHubAssessmentWorkspace

* fix: Fix issue with save button lighting up

* fix: made the save button stop highlighting after save

* fix: Made MissionListing asynchronous

* fix: Made prompt appear when attempting to navigate away from GitHubAssessmentWorkspace

* fix: unexported getTasksData

* fix: setCachedTaskList to the original task list

* fix: removed OctokitTypes and imported octokit types instead

* Updated .env.example file

* Add asynchronous fetching of tasks when loading GithubAssessmentWorkspace

* updated .env.example

* Fixed GitHubMissions Login Logout button visibility

* fix: Use store variables for unsaved changes, prevent github logout if there are unsaved changes

* test: fix logout github to work for test

* fix: added prompt for user when attempting to navigate away from current question with unsaved changes

* Fix workspace width issue

* feat: Reset to previously saved code when navigating away

* GitHub Mission now processes new .CourseInformation.json correctly.

* Yarn run format

* Added filter for specific named orgs

* Updated feature to process course-info.json

.metadata file is no longer needed to retrieve mission data from GitHub.

orgs without course-info repo will no longer show up.

* Update props for GitHubAssessmentsNavigationBar Test

* Updated failing snapshots

* GitHub Classroom now properly separated into different assessment groups.

* fixed typing for store in useSelector

* Merged from upstream

* Added temporary navbar for mobile GitHubClassroom

The page is unusable without at least a navbar

* fix: disable teacher mode if student is member of organization

* style: yarn run format

* Added tests for GitHubClassroom

* Merge branch 'P2Fancy' of https://github.com/chekjun/cadet-frontend into P2Fancy

* A default course is selected if found

* Yarn run format

* Refactored GitHubClassroom, Navbar and added AssessmentListing

* Updated routing

* Remove comments

* Update snapshots

* Remove outdated css

* Added refreshButton, shorter courseNames and sorting by dueDate/published

* fix: Prevent saving if assessment is overdue

* fix: Removed save dialog for learners in assessment workspace

* Fix course selection issue

* fix: removed unnecessary variables from MissionMetadata

* Added welcome page for no course

* Yarn test

* Fixed bug with redirecting to GitHub Classrooms

* Fix routing location state issue

* Fixed bug where non-accepted assessment has "Review Answers" button.

* Fix github navbar..

* Update welcome page css

Co-authored-by: ChengGeng97 <47176493+ChengGeng97@users.noreply.github.com>
Co-authored-by: Martin Henz <henz@comp.nus.edu.sg>
Co-authored-by: Chow En Rong <53928333+chownces@users.noreply.github.com>
  • Loading branch information
4 people committed Jun 21, 2021
1 parent 434513f commit 65db52c
Show file tree
Hide file tree
Showing 30 changed files with 881 additions and 1,032 deletions.
13 changes: 3 additions & 10 deletions src/commons/application/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import Academy from '../../pages/academy/AcademyContainer';
import Achievement from '../../pages/achievement/AchievementContainer';
import Contributors from '../../pages/contributors/Contributors';
import Disabled from '../../pages/disabled/Disabled';
import GitHubAssessmentWorkspaceContainer from '../../pages/githubAssessments/GitHubAssessmentWorkspaceContainer';
import GitHubMissionListing from '../../pages/githubAssessments/GitHubMissionListing';
import GitHubClassroom from '../../pages/githubAssessments/GitHubClassroom';
import GitHubCallback from '../../pages/githubCallback/GitHubCallback';
import Login from '../../pages/login/LoginContainer';
import MissionControlContainer from '../../pages/missionControl/MissionControlContainer';
Expand Down Expand Up @@ -149,21 +148,15 @@ const Application: React.FC<ApplicationProps> = props => {
<Route path="/sourcecast/:sourcecastId?" component={SourcecastContainer} />
{Constants.enableGitHubAssessments && (
<Route
path="/githubassessments/missions"
path="/githubassessments"
component={() => (
<GitHubMissionListing
<GitHubClassroom
handleGitHubLogIn={props.handleGitHubLogIn}
handleGitHubLogOut={props.handleGitHubLogOut}
/>
)}
/>
)}
{Constants.enableGitHubAssessments && (
<Route
path="/githubassessments/editor"
component={GitHubAssessmentWorkspaceContainer}
/>
)}
<Route path="/callback/github" component={GitHubCallback} />
<Route exact path="/interactive-sicp" render={redirectToSicp} />
<Route path="/interactive-sicp/:section" component={Sicp} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ exports[`Application renders correctly 1`] = `
<Route path=\\"/playground\\" component={[Function: C] { displayName: 'withRouter(Connect(Playground))', WrappedComponent: [Function: Playground], propTypes: { wrappedComponentRef: [Function: bound checkType] { isRequired: [Function: bound checkType] } } }} />
<Route path=\\"/contributors\\" component={[function]} />
<Route path=\\"/sourcecast/:sourcecastId?\\" component={[Function: C] { displayName: 'withRouter(Connect(Sourcecast))', WrappedComponent: [Function: Sourcecast], propTypes: { wrappedComponentRef: [Function: bound checkType] { isRequired: [Function: bound checkType] } } }} />
<Route path=\\"/githubassessments/missions\\" component={[Function: component]} />
<Route path=\\"/githubassessments/editor\\" component={[Function: C] { displayName: 'withRouter(Connect(GitHubAssessmentWorkspace))', WrappedComponent: [Function: GitHubAssessmentWorkspace], propTypes: { wrappedComponentRef: [Function: bound checkType] { isRequired: [Function: bound checkType] } } }} />
<Route path=\\"/githubassessments\\" component={[Function: component]} />
<Route path=\\"/callback/github\\" component={[Function: GitHubCallback]} />
<Route exact={true} path=\\"/interactive-sicp\\" render={[Function: redirectToSicp]} />
<Route path=\\"/interactive-sicp/:section\\" component={[Function: Sicp]} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as React from 'react';
import { useSelector } from 'react-redux';
import { useMediaQuery } from 'react-responsive';

import { OverallState } from '../../application/ApplicationTypes';
import controlButton from '../../ControlButton';
import Constants from '../../utils/Constants';

Expand All @@ -20,7 +21,7 @@ export type ControlBarGitHubLoginButtonProps = {
export const ControlBarGitHubLoginButton: React.FC<ControlBarGitHubLoginButtonProps> = props => {
const isMobileBreakpoint = useMediaQuery({ maxWidth: Constants.mobileBreakpoint });
const isLoggedIn =
useSelector((store: any) => store.session.githubOctokitObject).octokit !== undefined;
useSelector((store: OverallState) => store.session.githubOctokitObject).octokit !== undefined;

const loginButton = isLoggedIn
? controlButton('Log Out', IconNames.GIT_BRANCH, props.onClickLogOut)
Expand Down
91 changes: 9 additions & 82 deletions src/commons/githubAssessments/GitHubMissionDataUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,91 +265,18 @@ export async function getContentAsString(
* @param metadataString The file contents of the '.metadata' file of a mission repository
*/
function convertMetadataStringToMissionMetadata(metadataString: string) {
const missionMetadata: MissionMetadata = {
coverImage: '',
type: '',
id: '',
title: '',
sourceVersion: 1,
dueDate: new Date(8640000000000000),
reading: '',
webSummary: ''
};
const stringPropsToExtract = ['coverImage', 'type', 'id', 'title', 'reading', 'webSummary'];
const numPropsToExtract = ['sourceVersion'];
const datePropsToExtract = ['dueDate'];

const retVal = parseMetadataProperties<MissionMetadata>(
missionMetadata,
stringPropsToExtract,
numPropsToExtract,
datePropsToExtract,
metadataString
);

return retVal;
try {
return JSON.parse(metadataString) as MissionMetadata;
} catch (err) {
console.error(err);
return {
sourceVersion: 4
} as MissionMetadata;
}
}

function convertMissionMetadataToMetadataString(missionMetadata: MissionMetadata) {
const properties: string[] = [
'title',
'coverImage',
'webSummary',
'dueDate',
'type',
'id',
'sourceVersion',
'reading'
];
const propertyValuePairs = properties.map(property => property + '=' + missionMetadata[property]);
return propertyValuePairs.join('\n');
}

/**
* Converts the contents of a '.metadata' file into an object of type R.
*
* @param propertyContainer The object of which properties will be set
* @param stringProps An array containing the names of properties with string values
* @param numProps An array containing the names of properties with numerical values
* @param dateProps An array containing the names of properties with date values
* @param metadataString The content of the '.metadata' file to be parsed
*/
export function parseMetadataProperties<R>(
propertyContainer: R,
stringProps: string[],
numProps: string[],
dateProps: string[],
metadataString: string
) {
const lines = metadataString.replace(/\r/g, '').split(/\n/);

lines.forEach(line => {
for (let i = 0; i < stringProps.length; i++) {
const propName = stringProps[i];
if (line.startsWith(propName)) {
propertyContainer[propName] = line.substr(propName.length + 1);
return;
}
}

for (let i = 0; i < numProps.length; i++) {
const propName = numProps[i];
if (line.startsWith(propName)) {
propertyContainer[propName] = parseInt(line.substr(propName.length + 1), 10);
return;
}
}

for (let i = 0; i < dateProps.length; i++) {
const propName = dateProps[i];
if (line.startsWith(propName)) {
propertyContainer[propName] = new Date(line.substr(propName.length + 1));
return;
}
}
});

return propertyContainer;
return jsonStringify(missionMetadata);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as React from 'react';
import { useSelector } from 'react-redux';
import { useMediaQuery } from 'react-responsive';

import { OverallState } from '../application/ApplicationTypes';
import controlButton from '../ControlButton';
import Constants from '../utils/Constants';

Expand All @@ -21,7 +22,7 @@ export const ControlBarGitHubMobileLoginButton: React.FC<ControlBarGitHubMobileL
props => {
const isMobileBreakpoint = useMediaQuery({ maxWidth: Constants.mobileBreakpoint });
const isLoggedIn =
useSelector((store: any) => store.session.githubOctokitObject).octokit !== undefined;
useSelector((store: OverallState) => store.session.githubOctokitObject).octokit !== undefined;

const loginButton = isLoggedIn
? controlButton('Log Out', IconNames.GIT_BRANCH, props.onClickLogOut)
Expand Down
8 changes: 0 additions & 8 deletions src/commons/githubAssessments/GitHubMissionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@ export type TaskData = {
* An code representation of a GitHub-hosted mission's '.metadata' file.
*/
export type MissionMetadata = {
coverImage: string;
type: string;
id: string;
title: string;
sourceVersion: number;
dueDate: Date;

reading: string;
webSummary: string;
};

/**
Expand Down
62 changes: 5 additions & 57 deletions src/commons/githubAssessments/__tests__/GitHubMissionDataUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Octokit } from '@octokit/rest';

import { IMCQQuestion } from '../../assessment/AssessmentTypes';
import * as GitHubMissionDataUtils from '../GitHubMissionDataUtils';
import { MissionMetadata, MissionRepoData } from '../GitHubMissionTypes';
import { MissionRepoData } from '../GitHubMissionTypes';

test('getContentAsString correctly gets content and translates from Base64 to utf-8', async () => {
const octokit = new Octokit();
Expand All @@ -23,40 +23,6 @@ test('getContentAsString correctly gets content and translates from Base64 to ut
expect(content).toBe('Hello World!');
});

test('parseMetadataProperties correctly discovers properties', () => {
const missionMetadata = Object.assign({}, dummyMissionMetadata);
const stringPropsToExtract = ['coverImage', 'type', 'id', 'title', 'reading', 'webSummary'];
const numPropsToExtract = ['sourceVersion'];
const datePropsToExtract = ['dueDate'];

const metadataString =
'coverImage=www.somelink.com\n' +
'type=Mission\n' +
'id=M3\n' +
'title=Dummy Mission\n' +
'reading=Textbook Pages 1 to 234763\n' +
'dueDate=December 17, 1995 03:24:00\n' +
'webSummary=no\n' +
'sourceVersion=3';

const retVal = GitHubMissionDataUtils.parseMetadataProperties<MissionMetadata>(
missionMetadata,
stringPropsToExtract,
numPropsToExtract,
datePropsToExtract,
metadataString
);

expect(retVal.coverImage).toBe('www.somelink.com');
expect(retVal.type).toBe('Mission');
expect(retVal.id).toBe('M3');
expect(retVal.title).toBe('Dummy Mission');
expect(retVal.reading).toBe('Textbook Pages 1 to 234763');
expect(retVal.webSummary).toBe('no');
expect(retVal.sourceVersion).toBe(3);
expect(retVal.dueDate).toStrictEqual(new Date('December 17, 1995 03:24:00'));
});

test('getMissionData works properly', async () => {
const missionRepoData: MissionRepoData = {
repoOwner: 'Pain',
Expand All @@ -79,13 +45,9 @@ test('getMissionData works properly', async () => {
// Metadata String
const contentResponse = generateGetContentResponse();
(contentResponse.data as any).content = Buffer.from(
'coverImage=www.somelink.com\n' +
'type=Mission\n' +
'id=M3\n' +
'title=Dummy Mission\n' +
'reading=Textbook Pages 1 to 234763\n' +
'webSummary=no\n' +
'sourceVersion=3',
`{
"sourceVersion": 3
}`,
'utf-8'
).toString('base64');
return contentResponse;
Expand Down Expand Up @@ -183,13 +145,6 @@ test('getMissionData works properly', async () => {
expect(missionData.missionRepoData.repoName).toBe('Peko');

expect(missionData.missionBriefing).toBe('Briefing Content');

expect(missionData.missionMetadata.coverImage).toBe('www.somelink.com');
expect(missionData.missionMetadata.type).toBe('Mission');
expect(missionData.missionMetadata.id).toBe('M3');
expect(missionData.missionMetadata.title).toBe('Dummy Mission');
expect(missionData.missionMetadata.reading).toBe('Textbook Pages 1 to 234763');
expect(missionData.missionMetadata.webSummary).toBe('no');
expect(missionData.missionMetadata.sourceVersion).toBe(3);

expect(missionData.tasksData.length).toBe(2);
Expand Down Expand Up @@ -932,14 +887,7 @@ function generateGetContentResponse() {
}

const dummyMissionMetadata = {
coverImage: 'www.eh',
type: 'mission',
id: 'M2',
title: 'Dummy',
sourceVersion: 1,
dueDate: new Date('December 17, 1996 03:24:00'),
reading: 'none',
webSummary: 'no'
sourceVersion: 1
};

const defaultMissionMetadata = {
Expand Down
14 changes: 4 additions & 10 deletions src/commons/navigationBar/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ import classNames from 'classnames';
import * as React from 'react';
import { useMediaQuery } from 'react-responsive';
import { NavLink, Route, Switch } from 'react-router-dom';
import SicpNavigationBar from 'src/commons/navigationBar/subcomponents/SicpNavigationBar';

import SicpNavigationBar from '../../commons/navigationBar/subcomponents/SicpNavigationBar';
import { Role } from '../application/ApplicationTypes';
import Dropdown from '../dropdown/Dropdown';
import Constants from '../utils/Constants';
import AcademyNavigationBar from './subcomponents/AcademyNavigationBar';
import GitHubAssessmentsNavigationBar from './subcomponents/GitHubAssessmentsNavigationBar';
import NavigationBarMobileSideMenu from './subcomponents/NavigationBarMobileSideMenu';

type NavigationBarProps = DispatchProps & StateProps;
Expand Down Expand Up @@ -129,7 +128,7 @@ const NavigationBar: React.FC<NavigationBarProps> = props => {
<NavLink
activeClassName={Classes.ACTIVE}
className={classNames('NavigationBar__link__mobile', Classes.BUTTON, Classes.MINIMAL)}
to="/githubassessments/missions"
to="/githubassessments"
>
<Icon icon={IconNames.BRIEFCASE} />
<div>GitHub Assessments</div>
Expand Down Expand Up @@ -225,10 +224,10 @@ const NavigationBar: React.FC<NavigationBarProps> = props => {
<NavLink
activeClassName={Classes.ACTIVE}
className={classNames('NavigationBar__link', Classes.BUTTON, Classes.MINIMAL)}
to="/githubassessments/missions"
to="/githubassessments"
>
<Icon icon={IconNames.BRIEFCASE} />
<div className="navbar-button-text">GitHub Assessments</div>
<div className="navbar-button-text">Classroom</div>
</NavLink>
)}

Expand Down Expand Up @@ -302,11 +301,6 @@ const NavigationBar: React.FC<NavigationBarProps> = props => {
</Navbar>

<Switch>
<Route path="/githubassessments">
{Constants.enableGitHubAssessments && !isMobileBreakpoint && desktopMenuOpen && (
<GitHubAssessmentsNavigationBar {...props} />
)}
</Route>
<Route path="/interactive-sicp/:section?">
<SicpNavigationBar />
</Route>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ exports[`NavigationBar renders "Not logged in" correctly 1`] = `
Playground
</div>
</NavLink>
<NavLink activeClassName=\\"bp3-active\\" className=\\"NavigationBar__link bp3-button bp3-minimal\\" to=\\"/githubassessments/missions\\">
<NavLink activeClassName=\\"bp3-active\\" className=\\"NavigationBar__link bp3-button bp3-minimal\\" to=\\"/githubassessments\\">
<Blueprint3.Icon icon=\\"briefcase\\" />
<div className=\\"navbar-button-text\\">
GitHub Assessments
Classroom
</div>
</NavLink>
<NavLink activeClassName=\\"bp3-active\\" className=\\"NavigationBar__link bp3-button bp3-minimal\\" to=\\"/interactive-sicp/index\\">
Expand All @@ -52,9 +52,6 @@ exports[`NavigationBar renders "Not logged in" correctly 1`] = `
</Blueprint3.NavbarGroup>
</Blueprint3.Navbar>
<Switch>
<Route path=\\"/githubassessments\\">
<GitHubAssessmentsNavigationBar handleLogOut={[Function: handleLogOut]} handleGitHubLogIn={[Function: handleGitHubLogIn]} handleGitHubLogOut={[Function: handleGitHubLogOut]} title=\\"Source Academy\\" />
</Route>
<Route path=\\"/interactive-sicp/:section?\\">
<SicpNavigationBar />
</Route>
Expand Down Expand Up @@ -85,10 +82,10 @@ exports[`NavigationBar renders correctly with student role 1`] = `
Playground
</div>
</NavLink>
<NavLink activeClassName=\\"bp3-active\\" className=\\"NavigationBar__link bp3-button bp3-minimal\\" to=\\"/githubassessments/missions\\">
<NavLink activeClassName=\\"bp3-active\\" className=\\"NavigationBar__link bp3-button bp3-minimal\\" to=\\"/githubassessments\\">
<Blueprint3.Icon icon=\\"briefcase\\" />
<div className=\\"navbar-button-text\\">
GitHub Assessments
Classroom
</div>
</NavLink>
<NavLink activeClassName=\\"bp3-active\\" className=\\"NavigationBar__link bp3-button bp3-minimal\\" to=\\"/interactive-sicp/index\\">
Expand Down Expand Up @@ -125,9 +122,6 @@ exports[`NavigationBar renders correctly with student role 1`] = `
</Blueprint3.NavbarGroup>
</Blueprint3.Navbar>
<Switch>
<Route path=\\"/githubassessments\\">
<GitHubAssessmentsNavigationBar handleLogOut={[Function: handleLogOut]} handleGitHubLogIn={[Function: handleGitHubLogIn]} handleGitHubLogOut={[Function: handleGitHubLogOut]} role=\\"student\\" title=\\"Source Academy\\" />
</Route>
<Route path=\\"/interactive-sicp/:section?\\">
<SicpNavigationBar />
</Route>
Expand Down
Loading

0 comments on commit 65db52c

Please sign in to comment.