Skip to content

Commit

Permalink
Merge pull request #472 from concord-consortium/notebook
Browse files Browse the repository at this point in the history
Merge Notebook feature branch
  • Loading branch information
dougmartin authored Jul 10, 2023
2 parents eaa2603 + c840653 commit df00720
Show file tree
Hide file tree
Showing 45 changed files with 31,559 additions and 549 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
node-version: '16'
- name: Install Dependencies
run: npm ci
run: npm ci --force
- name: Build
run: npm run build
- name: Run Tests
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '14'
- name: Install Dependencies
run: npm ci
env:
Expand Down
32 changes: 16 additions & 16 deletions cypress/e2e/activity-page-font-size-large.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ context("Test the overall app", () => {
activityPage.getPagesHeader().should('have.css', 'font-size', largeFont.size5);
activityPage.getPageItemNo().should('have.css', 'font-size', largeFont.size5);
activityPage.getPageItemLink().should('have.css', 'font-size', largeFont.size5);

});
});
describe("Bar Graph",() => {
Expand All @@ -51,7 +51,7 @@ context("Test the overall app", () => {
getInIframe("body", ".runtime--runtime--question-int p").should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=legend]').should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=response-textarea]').should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".iframe-runtime--hint--question-int p").should('have.css', 'font-size', largeFont.size3);
getInIframe("body", ".iframe-runtime--hint--question-int p").should('have.css', 'font-size', largeFont.size3);
});
});
describe("Drag & Drop",() => {
Expand All @@ -71,8 +71,8 @@ context("Test the overall app", () => {
cy.wait(5000);
fontSize.verifyHeaderHintLargeFont("Drawing Tool", "Drawing Tool");
getInIframe("body", ".base-app--runtime--question-int p").should('have.css', 'font-size', largeFont.size4);
getInIframe("body", "[data-test=upload-btn]").should('have.css', 'font-size', largeFont.size6);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 1).should('have.css', 'font-size', largeFont.size6);
getInIframe("body", "[data-test=upload-btn]").should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 1).should('have.css', 'font-size', largeFont.size4);
});
});
describe("FIB",() => {
Expand Down Expand Up @@ -101,20 +101,20 @@ context("Test the overall app", () => {
fontSize.verifyHeaderHintLargeFont("Image Question", "Image Question");
getInIframe("body", ".base-app--runtime--question-int p").eq(0).should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".base-app--runtime--question-int p").eq(1).should('have.css', 'font-size', largeFont.size4);
getInIframe("body", "[data-test=edit-btn]").should('have.css', 'font-size', largeFont.size6);
getInIframe("body", "[data-test=edit-btn]").should('have.css', 'font-size', largeFont.size4);
getInIframe("body", "[data-test=edit-btn]").click();
cy.wait(5000);
getInIframeWithIndex("body", ".runtime--dialogContent--question-int", 2).should("be.visible");
getInIframeWithIndex("body", ".runtime--dialogRightPanel--question-int div p", 2).eq(0).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", ".runtime--answerPrompt--question-int p", 2).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", ".runtime--dialogRightPanel--question-int textarea", 2).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", "[data-test=close-dialog-btn]", 2).should('have.css', 'font-size', largeFont.size6);
getInIframeWithIndex("body", ".drawing-tool-dialog--dialogContent--question-int", 2).should("be.visible");
getInIframeWithIndex("body", ".drawing-tool-dialog--dialogRightPanel--question-int div p", 2).eq(0).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", ".drawing-tool-dialog--answerPrompt--question-int p", 2).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", ".drawing-tool-dialog--dialogRightPanel--question-int textarea", 2).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", "[data-test=close-dialog-btn]", 2).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", "[data-test=close-dialog-btn]", 2).click();
getInIframeWithIndex("body", ".runtime--closeDialogSection--question-int div", 2).should('have.css', 'font-size', largeFont.size4);
getInIframeWithIndex("body", ".drawing-tool-dialog--closeDialogSection--question-int div", 2).should('have.css', 'font-size', largeFont.size4);
cy.wait(20000);
getInIframeWithIndex("body", "[data-test=upload-btn]", 1).should('have.css', 'font-size', largeFont.size6);
getInIframeWithIndex("body", "[data-test=upload-btn]", 1).should('have.css', 'font-size', largeFont.size4);
cy.wait(5000);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 2).should('have.css', 'font-size', largeFont.size6);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 2).should('have.css', 'font-size', largeFont.size4);
});
});
describe("Labbook",() => {
Expand Down Expand Up @@ -194,7 +194,7 @@ context("Test the overall app", () => {
cy.wait(2000);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=legend]').should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=response-textarea]').should('have.css', 'font-size', largeFont.size4);

});
});
describe("ScoreBot",() => {
Expand All @@ -208,8 +208,8 @@ context("Test the overall app", () => {
getInIframe("body", "[data-cy=scorebot-feedback-button]").click();
cy.wait(5000);
getInIframe("body", ".feedback--header--question-int").should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".feedback--score--question-int .sc-gswNZR.iYycqy").should('have.css', 'font-size', largeFont.size2);
getInIframe("body", ".feedback--score--question-int .sc-jSUZER.diMGbe .scale-to-4").eq(0).should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".feedback--score--question-int .sc-gEvEer").should('have.css', 'font-size', largeFont.size2);
getInIframe("body", ".feedback--score--question-int .sc-eqUAAy .scale-to-4").eq(0).should('have.css', 'font-size', largeFont.size4);
getInIframe("body", ".feedback--feedback--question-int").should('have.css', 'font-size', largeFont.size4);
getInIframe("body", "[data-testid=response-textarea]").type("Text Response");
getInIframe("body", ".feedback--outdatedMsg--question-int").should('have.css', 'font-size', largeFont.size4);
Expand Down
32 changes: 16 additions & 16 deletions cypress/e2e/activity-page-font-size-normal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ context("Test the overall app", () => {
activityPage.getPagesHeader().should('have.css', 'font-size', normalFont.size5);
activityPage.getPageItemNo().should('have.css', 'font-size', normalFont.size5);
activityPage.getPageItemLink().should('have.css', 'font-size', normalFont.size5);

});
});
describe("Bar Graph",() => {
Expand All @@ -51,7 +51,7 @@ context("Test the overall app", () => {
getInIframe("body", ".runtime--runtime--question-int p").should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=legend]').should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=response-textarea]').should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".iframe-runtime--hint--question-int p").should('have.css', 'font-size', normalFont.size3);
getInIframe("body", ".iframe-runtime--hint--question-int p").should('have.css', 'font-size', normalFont.size3);
});
});
describe("Drag & Drop",() => {
Expand All @@ -71,8 +71,8 @@ context("Test the overall app", () => {
cy.wait(5000);
fontSize.verifyHeaderHintNormalFont("Drawing Tool", "Drawing Tool");
getInIframe("body", ".base-app--runtime--question-int p").should('have.css', 'font-size', normalFont.size4);
getInIframe("body", "[data-test=upload-btn]").should('have.css', 'font-size', normalFont.size6);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 1).should('have.css', 'font-size', normalFont.size6);
getInIframe("body", "[data-test=upload-btn]").should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 1).should('have.css', 'font-size', normalFont.size4);
});
});
describe("FIB",() => {
Expand Down Expand Up @@ -101,20 +101,20 @@ context("Test the overall app", () => {
fontSize.verifyHeaderHintNormalFont("Image Question", "Image Question");
getInIframe("body", ".base-app--runtime--question-int p").eq(0).should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".base-app--runtime--question-int p").eq(1).should('have.css', 'font-size', normalFont.size4);
getInIframe("body", "[data-test=edit-btn]").should('have.css', 'font-size', normalFont.size6);
getInIframe("body", "[data-test=edit-btn]").should('have.css', 'font-size', normalFont.size4);
getInIframe("body", "[data-test=edit-btn]").click();
cy.wait(5000);
getInIframeWithIndex("body", ".runtime--dialogContent--question-int", 2).should("be.visible");
getInIframeWithIndex("body", ".runtime--dialogRightPanel--question-int div p", 2).eq(0).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", ".runtime--answerPrompt--question-int p", 2).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", ".runtime--dialogRightPanel--question-int textarea", 2).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", "[data-test=close-dialog-btn]", 2).should('have.css', 'font-size', normalFont.size6);
getInIframeWithIndex("body", ".drawing-tool-dialog--dialogContent--question-int", 2).should("be.visible");
getInIframeWithIndex("body", ".drawing-tool-dialog--dialogContent--question-int div p", 2).eq(0).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", ".drawing-tool-dialog--answerPrompt--question-int p", 2).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", ".drawing-tool-dialog--dialogContent--question-int textarea", 2).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", "[data-test=close-dialog-btn]", 2).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", "[data-test=close-dialog-btn]", 2).click();
getInIframeWithIndex("body", ".runtime--closeDialogSection--question-int div", 2).should('have.css', 'font-size', normalFont.size4);
getInIframeWithIndex("body", ".drawing-tool-dialog--closeDialogSection--question-int div", 2).should('have.css', 'font-size', normalFont.size4);
cy.wait(20000);
getInIframeWithIndex("body", "[data-test=upload-btn]", 1).should('have.css', 'font-size', normalFont.size6);
getInIframeWithIndex("body", "[data-test=upload-btn]", 1).should('have.css', 'font-size', normalFont.size4);
cy.wait(5000);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 2).should('have.css', 'font-size', normalFont.size6);
getInIframeWithIndex("body", "[data-testid=snapshot-btn]", 2).should('have.css', 'font-size', normalFont.size4);
});
});
describe("Labbook",() => {
Expand Down Expand Up @@ -194,7 +194,7 @@ context("Test the overall app", () => {
cy.wait(2000);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=legend]').should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=response-textarea]').should('have.css', 'font-size', normalFont.size4);

});
});
describe("ScoreBot",() => {
Expand All @@ -208,8 +208,8 @@ context("Test the overall app", () => {
getInIframe("body", "[data-cy=scorebot-feedback-button]").click();
cy.wait(5000);
getInIframe("body", ".feedback--header--question-int").should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".feedback--score--question-int .sc-gswNZR.iYycqy").should('have.css', 'font-size', normalFont.size2);
getInIframe("body", ".feedback--score--question-int .sc-jSUZER.diMGbe .scale-to-4").eq(0).should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".feedback--score--question-int .sc-gEvEer").should('have.css', 'font-size', normalFont.size2);
getInIframe("body", ".feedback--score--question-int .sc-eqUAAy .scale-to-4").eq(0).should('have.css', 'font-size', normalFont.size4);
getInIframe("body", ".feedback--feedback--question-int").should('have.css', 'font-size', normalFont.size4);
getInIframe("body", "[data-testid=response-textarea]").type("Text Response");
getInIframe("body", ".feedback--outdatedMsg--question-int").should('have.css', 'font-size', normalFont.size4);
Expand Down
14 changes: 7 additions & 7 deletions cypress/e2e/activity-page-read-aloud.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ context("Test the overall app", () => {
readAloud.verifyHeaderHintReadAloud();
getInIframe("body", ".runtime--runtime--question-int p").eq(0).parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=legend]').parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".iframe-runtime--hint--question-int p").eq(0).parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".iframe-runtime--hint--question-int p").eq(0).parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
});
});
describe("Drag & Drop",() => {
Expand Down Expand Up @@ -87,9 +87,9 @@ context("Test the overall app", () => {
getInIframe("body", ".base-app--runtime--question-int p").eq(1).parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", "[data-test=edit-btn]").click();
cy.wait(5000);
getInIframe("body", ".runtime--dialogContent--question-int").should("be.visible");
getInIframe("body", ".runtime--dialogRightPanel--question-int div p").eq(0).parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".runtime--answerPrompt--question-int p").parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".drawing-tool-dialog--dialogContent--question-int").should("be.visible");
getInIframe("body", ".drawing-tool-dialog--dialogRightPanel--question-int div p").eq(0).parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".drawing-tool-dialog--answerPrompt--question-int p").parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", "[data-test=close-dialog-btn]").click();
cy.wait(20000);
});
Expand Down Expand Up @@ -134,7 +134,7 @@ context("Test the overall app", () => {
getInIframe("body", ".runtime--runtime--question-int").find("iframe").its("0.contentDocument.body").find('[data-testid=response-textarea]').type("Scaffolded Open Response");
cy.wait(2000);
getInIframe("body", "[data-cy=lock-answer-button]").click();
cy.wait(2000);
cy.wait(2000);
getInIframe("body", ".iframe-runtime--hint--question-int p").parent().click().should('have.css', 'background-color', readAlound.backgroundColor);
});
});
Expand All @@ -148,8 +148,8 @@ context("Test the overall app", () => {
getInIframe("body", "[data-cy=scorebot-feedback-button]").click();
cy.wait(5000);
getInIframe("body", ".feedback--header--question-int").children().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".feedback--score--question-int .sc-gswNZR.iYycqy").children().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".feedback--score--question-int .sc-jSUZER.diMGbe .scale-to-4").eq(0).children().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".feedback--score--question-int .sc-gEvEer").children().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".feedback--score--question-int .sc-iGgWBj .scale-to-4").eq(0).children().click().should('have.css', 'background-color', readAlound.backgroundColor);
getInIframe("body", ".feedback--feedback--question-int").children().click().should('have.css', 'background-color', readAlound.backgroundColor);
});
});
Expand Down
Loading

0 comments on commit df00720

Please sign in to comment.