Skip to content

Commit

Permalink
Merge branch master into bilalqamar95/react-upgrade-to-v17
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 committed Jul 5, 2023
2 parents f872c2b + a1436c3 commit d88182b
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 49 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ file in this repo.
Reporting Security Issues
*************************

Please do not report security issues in public. Please email security@tcril.org.
Please do not report security issues in public. Please email security@openedx.org.

.. |ci-badge| image:: https://github.com/openedx/frontend-app-ora-grading/actions/workflows/ci.yml/badge.svg
:target: https://github.com/openedx/frontend-app-ora-grading/actions/workflows/ci.yml
Expand Down
131 changes: 99 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@edx/brand": "npm:@edx/brand-edx.org@^2.0.3",
"@edx/frontend-component-footer": "^12.0.0",
"@edx/frontend-component-header": "^4.0.4",
"@edx/frontend-component-header": "^4.2.2",
"@edx/frontend-platform": "^4.1.0",
"@edx/paragon": "^20.44.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
Expand Down
33 changes: 33 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"extends": [
"config:base",
"schedule:weekly",
":automergeLinters",
":automergeMinor",
":automergeTesters",
":enableVulnerabilityAlerts",
":rebaseStalePrs",
":semanticCommits",
":updateNotScheduled"
],
"packageRules": [
{
"matchDepTypes": [
"devDependencies"
],
"matchUpdateTypes": [
"lockFileMaintenance",
"minor",
"patch",
"pin"
],
"automerge": true
},
{
"matchPackagePatterns": ["@edx", "@openedx"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
],
"timezone": "America/New_York"
}
2 changes: 1 addition & 1 deletion src/components/FilePreview/FileInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const FileInfo = ({ onClick, children }) => (
)}
>
<Button
size="small"
size="sm"
variant="tertiary"
onClick={onClick}
iconAfter={InfoOutline}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`File Preview Card component snapshot 1`] = `
<Button
iconAfter={[MockFunction icons.InfoOutline]}
onClick={[MockFunction this.props.onClick]}
size="small"
size="sm"
variant="tertiary"
>
<FormattedMessage
Expand Down
25 changes: 12 additions & 13 deletions src/test/app.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jest.mock('@edx/frontend-platform/auth', () => ({
getLoginRedirectUrl: jest.fn(),
}));

jest.mock('@edx/frontend-component-header', () => ({
LearningHeader: () => 'Header',
}));
// jest.mock('@edx/frontend-component-footer', () => () => 'Footer');

jest.mock('react-pdf', () => ({
Document: () => <div>Document</div>,
Image: () => <div>Image</div>,
Expand Down Expand Up @@ -213,7 +218,7 @@ describe('ESG app integration tests', () => {
inspector = new Inspector(el);
});

test('initialization', async (done) => {
test('initialization', async () => {
const verifyInitialState = async () => {
await waitForRequestStatus(RequestKeys.initialize, RequestStates.pending);
const testInitialState = (key) => expect(
Expand Down Expand Up @@ -275,7 +280,6 @@ describe('ESG app integration tests', () => {

await makeTableSelections();
await waitForRequestStatus(RequestKeys.fetchSubmission, RequestStates.pending);
done();
});

describe('initialized', () => {
Expand All @@ -286,7 +290,7 @@ describe('ESG app integration tests', () => {
await waitForRequestStatus(RequestKeys.fetchSubmission, RequestStates.pending);
});

test('initial review state', async (done) => {
test('initial review state', async () => {
// Make table selection and load Review pane
expect(
state.grading.selection,
Expand All @@ -304,10 +308,9 @@ describe('ESG app integration tests', () => {
inspector.review.loadingResponse(),
'Loading Responses pending state text should be displayed in the ReviewModal',
).toBeVisible();
done();
});

test('fetch network error and retry', async (done) => {
test('fetch network error and retry', async () => {
await resolveFns.fetch.networkError();
await waitForRequestStatus(RequestKeys.fetchSubmission, RequestStates.failed);
expect(
Expand All @@ -317,10 +320,9 @@ describe('ESG app integration tests', () => {
// fetch: retry and succeed
await userEvent.click(inspector.review.retryFetchLink());
await waitForRequestStatus(RequestKeys.fetchSubmission, RequestStates.pending);
done()
});

test('fetch success and nav chain', async (done) => {
test('fetch success and nav chain', async () => {
let showRubric = false;
// fetch: success with chained navigation
const verifyFetchSuccess = async (submissionIndex) => {
Expand Down Expand Up @@ -396,7 +398,6 @@ describe('ESG app integration tests', () => {
await userEvent.click(inspector.review.prevNav());
await verifyFetchSuccess(i);
}
done();
});

describe('grading (basic)', () => {
Expand All @@ -416,7 +417,7 @@ describe('ESG app integration tests', () => {
const overallFeedback = 'some overall feedback';

// Set basic grade and feedback
const setGrade = async (done) => {
const setGrade = async () => {
const {
criterionOption,
criterionFeedback,
Expand Down Expand Up @@ -487,18 +488,17 @@ describe('ESG app integration tests', () => {
});
*/
test('grade and submit',
async (done) => {
async () => {
expect(await inspector.find.review.submitGradeBtn()).toBeVisible();
await setGrade();
checkGradingState();
await userEvent.click(inspector.review.rubric.submitGradeBtn());
await resolveFns.updateGrade.success();
checkGradeSuccess();
done();
},
);
test('grade, navigate, and return, maintaining gradingState',
async (done) => {
async () => {
expect(await inspector.find.review.submitGradeBtn()).toBeVisible();
await setGrade();
checkGradingState();
Expand All @@ -507,7 +507,6 @@ describe('ESG app integration tests', () => {
await loadPrev();
await waitForEqual(() => getState().grading.activeIndex, 0, 'activeIndex');
checkGradingState();
done();
},
);
});
Expand Down

0 comments on commit d88182b

Please sign in to comment.