-
Notifications
You must be signed in to change notification settings - Fork 5
Exam specification directory page #1024
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import React from "react"; | ||
import {Button, Card, CardBody, CardFooter, CardText, CardTitle, Col, Container, Row} from "reactstrap"; | ||
import {TitleAndBreadcrumb} from "../elements/TitleAndBreadcrumb"; | ||
import {MetaDescription} from "../elements/MetaDescription"; | ||
import {Link} from "react-router-dom"; | ||
|
||
|
||
export const ExamSpecificationsDirectory = () => { | ||
return <Container className="mb-5"> | ||
<TitleAndBreadcrumb currentPageTitle={"Exam specifications"}/> | ||
<MetaDescription description="Discover our free A level computer science topics and questions."/> | ||
<Row className={"justify-content-center d-flex flex-row card-deck row-cols-1 row-cols-md-2 row-cols-xl-4 my-3"}> | ||
<Col className={"my-3"}> | ||
<Card className={"cs-card w-100"}> | ||
<CardBody> | ||
<CardTitle> | ||
<h3>Ada CS</h3> | ||
</CardTitle> | ||
<CardText> | ||
<ul> | ||
<li>Core</li> | ||
<li>Advanced</li> | ||
</ul> | ||
</CardText> | ||
</CardBody> | ||
<CardFooter className={"border-top-0 pb-3"}> | ||
<Button className="justify-content-end" color='secondary' disabled outline tag={Link} to="/"> | ||
Coming soon | ||
</Button> | ||
</CardFooter> | ||
</Card> | ||
</Col> | ||
<Col className={"my-3"}> | ||
<Card className={"cs-card w-100"}> | ||
<CardBody> | ||
<CardTitle> | ||
<h3>England</h3> | ||
</CardTitle> | ||
<CardText> | ||
<ul> | ||
<li>GCSE</li> | ||
<li>A Level</li> | ||
</ul> | ||
</CardText> | ||
</CardBody> | ||
<CardFooter className={"border-top-0 pb-3"}> | ||
<Button className="justify-content-end" color='secondary' outline tag={Link} | ||
to="/exam_specifications_england">Show me</Button> | ||
</CardFooter> | ||
</Card> | ||
</Col> | ||
<Col className={"my-3"}> | ||
<Card className={"cs-card w-100"}> | ||
<CardBody> | ||
<CardTitle> | ||
<h3>Scotland</h3> | ||
</CardTitle> | ||
<CardText> | ||
<ul> | ||
<li>National 5</li> | ||
<li>Higher</li> | ||
<li>Advanced Higher</li> | ||
</ul> | ||
</CardText> | ||
</CardBody> | ||
<CardFooter className={"border-top-0 pb-3"}> | ||
<Button color='secondary' outline tag={Link} to="/concepts/sqa_computing_science"> | ||
Show me | ||
</Button> | ||
</CardFooter> | ||
</Card> | ||
</Col> | ||
<Col className={"my-3"}> | ||
<Card className={"cs-card w-100"}> | ||
<CardBody> | ||
<CardTitle> | ||
<h3>Wales</h3> | ||
</CardTitle> | ||
<CardText> | ||
<ul> | ||
<li>GCSE</li> | ||
<li>A Level</li> | ||
</ul> | ||
</CardText> | ||
</CardBody> | ||
<CardFooter className={"border-top-0 pb-3"}> | ||
<Button color='secondary' outline tag={Link} to="/exam_specifications_wales">Show me</Button> | ||
</CardFooter> | ||
</Card> | ||
</Col> | ||
</Row> | ||
</Container>; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import {getFilteredExamBoardsByStage} from "../app/components/pages/ExamSpecifications"; | ||
import {EXAM_BOARD, STAGE} from "../app/services"; | ||
|
||
|
||
describe("ExamSpecifications", () => { | ||
it('should filter the available stage and exam board when a single stage/board pair is provided', async () => { | ||
// Arrange | ||
const stageFilter = [STAGE.GCSE]; | ||
const examBoardFilter = [EXAM_BOARD.WJEC]; | ||
|
||
const expected = { | ||
"gcse": [EXAM_BOARD.WJEC] | ||
}; | ||
|
||
// Act | ||
const actual = getFilteredExamBoardsByStage(stageFilter, examBoardFilter); | ||
|
||
// Assert | ||
expect(actual).toEqual(expected); | ||
}); | ||
|
||
it('should filter the available stage and exam board when multiple stage/board pairs are provided', async () => { | ||
// Arrange | ||
const stageFilter = [STAGE.GCSE, STAGE.A_LEVEL]; | ||
const examBoardFilter = [EXAM_BOARD.WJEC, EXAM_BOARD.AQA]; | ||
|
||
const expected = { | ||
"gcse": [EXAM_BOARD.AQA, EXAM_BOARD.WJEC], | ||
"a_level": [EXAM_BOARD.AQA, EXAM_BOARD.WJEC] | ||
}; | ||
|
||
// Act | ||
const actual = getFilteredExamBoardsByStage(stageFilter, examBoardFilter); | ||
|
||
// Assert | ||
expect(actual).toEqual(expected); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to add a
<Redirect key={key++} from="/exam_specifications_scotland" to="/concepts/sqa_computing_science" />
if you don't want to feel left out!