diff --git a/src/components/Gradebook/index.jsx b/src/components/Gradebook/index.jsx
index 694b7e0..6e3cede 100644
--- a/src/components/Gradebook/index.jsx
+++ b/src/components/Gradebook/index.jsx
@@ -10,6 +10,7 @@ import {
} from '@edx/paragon';
import queryString from 'query-string';
import { configuration } from '../../config';
+import PageButtons from '../PageButtons';
const DECIMAL_PRECISION = 2;
@@ -329,21 +330,6 @@ export default class Gradebook extends React.Component {
onClear={() => this.props.getUserGrades(this.props.match.params.courseId, this.props.selectedCohort, this.props.selectedTrack)}
value={this.state.filterValue}
/>
-
-
@@ -353,6 +339,7 @@ export default class Gradebook extends React.Component {
onClose={() => this.props.updateBanner(false)}
open={this.props.showSuccess}
/>
+ {PageButtons(this.props)}
+ {PageButtons(this.props)}
{
+ const assertPageButtonsSnapshot = function assertPageButtonsSnapshot(input) {
+ const pb = renderer.create(PageButtons(input));
+ const tree = pb.toJSON();
+ expect(tree).toMatchSnapshot();
+ };
+
+ it('prev null, next null', () => {
+ assertPageButtonsSnapshot(createInput(null, null));
+ });
+
+ it('prev null, next not null', () => {
+ assertPageButtonsSnapshot(createInput(null, 'np'));
+ });
+
+ it('prev not null, next null', () => {
+ assertPageButtonsSnapshot(createInput('pp', null));
+ });
+
+ it('prev not null, next not null', () => {
+ assertPageButtonsSnapshot(createInput('pp', 'np'));
+ });
+});
diff --git a/src/components/PageButtons/__snapshots__/PageButtons.test.jsx.snap b/src/components/PageButtons/__snapshots__/PageButtons.test.jsx.snap
new file mode 100644
index 0000000..61637ea
--- /dev/null
+++ b/src/components/PageButtons/__snapshots__/PageButtons.test.jsx.snap
@@ -0,0 +1,169 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`PageButtons prev not null, next not null 1`] = `
+
+
+ Previous Page
+
+
+ Next Page
+
+
+`;
+
+exports[`PageButtons prev not null, next null 1`] = `
+
+
+ Previous Page
+
+
+ Next Page
+
+
+`;
+
+exports[`PageButtons prev null, next not null 1`] = `
+
+
+ Previous Page
+
+
+ Next Page
+
+
+`;
+
+exports[`PageButtons prev null, next null 1`] = `
+
+
+ Previous Page
+
+
+ Next Page
+
+
+`;
diff --git a/src/components/PageButtons/index.jsx b/src/components/PageButtons/index.jsx
new file mode 100644
index 0000000..e74fdee
--- /dev/null
+++ b/src/components/PageButtons/index.jsx
@@ -0,0 +1,30 @@
+import React from 'react';
+import {
+ Button,
+} from '@edx/paragon';
+
+
+export default function PageButtons({prevPage, nextPage, selectedTrack, selectedCohort, getPrevNextGrades}) {
+ return (
+
+ getPrevNextGrades(prevPage, selectedCohort, selectedTrack)}
+ />
+ getPrevNextGrades(nextPage, selectedCohort, selectedTrack)}
+ />
+
+ );
+}
+