Skip to content

Commit

Permalink
Merge main.
Browse files Browse the repository at this point in the history
  • Loading branch information
tealefristoe committed Nov 16, 2024
2 parents 79a63b2 + 0a69e9b commit 92adb98
Show file tree
Hide file tree
Showing 43 changed files with 806 additions and 620 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/v3-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ jobs:
fail-fast: false
matrix:
# run multiple copies of the current job in parallel [1, ..., n]
containers: [1, 2, 3, 4, 5]
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9]
steps:
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- name: Checkout
uses: actions/checkout@v4
- name: Restore Webpack Cache
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ jobs:
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
steps:
- uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- uses: snow-actions/[email protected]
with:
patterns: v3
Expand Down
40 changes: 40 additions & 0 deletions v3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## Version 3.0.0-pre.2009 - November 15, 2024

### ✨ Features & Improvements:
- **PT-181910061:** **Legend colors** can be changed in the brush (for graphs) inspector menu
- **PT-181889643:** Attribute menu **Fit width to content**
- **PT-188497532:** Graph/map filter function use new formula editor
- **PT-188545557:** dropping a codap file onto a dirty document should ask for confirmation
- **PT-187014862:** When color attributes are used as legends points are colored accordingly (*Delivered*)
- **PT-188459268:** Remaining Bivariate Statistical Functions (*Delivered*)
- **PT-181869876:** The case *table* has a **"rescale"** icon that causes columns to resize (*Delivered*)
- **PT-188497528:** Case table/card filter function use new formula editor (*Delivered*)
- **PT-187967988:** Edit Attribute Properties dialog should support date-time precision for date types (*Delivered*)
- **PT-182991523:** User has control over display of numbers (*Delivered*)

### 🐞 Bug Fixes:
- **PT-188323297:** Autoscale Fails When Multiple Points Are Selected and Hidden from the Graph
- **PT-188539637:** Dragging dot plot points doesn't affect case table values if dataset is hierarchical
- **PT-188234640:** Attribute Menu Doesn't Dismiss When Resizing **Case Table** and **Case Card**
- **PT-188524711:** Case table doesn't display correct value on release of dragged point
- **PT-188514843:** Maps do not open at correct zoom level
- **PT-188539688:** Dot plot messed up response to adding parent collection
- **PT-188415967:** CODAP document name is not restoring on open
- **PT-188305544:** Hidden attributes show in graph attribute menu list
- **PT-188411147:** Unable to Dismiss **Rename Attribute** Dialog in **case table** after a single click away
- **PT-188524747:** Graph: Clicking on selected points deselects other points preventing multiple point drag (*Delivered*)
- **PT-188411287:** **Case Card with Hierarchy** becomes stuck in Tool-shelf in CODAP v3 (*Delivered*)
- **PT-188036951:** Inability to select/scroll to individual cases in child level of hierarchy (*Delivered*)
- **PT-188514748:** Point slide incorrect representation in hierarchical case table with crash (*Delivered*)

### 🛠️ Under the Hood:
- **PT-188402995:** Automation for Slider components with new date handling implemented
- **PT-188575672:** Run Cypress in a fixed version of Chrome on GitHub
- **PT-188554616:** Crash in usePixiPointerDown

### Asset Sizes
| File | Size | % Increase from Previous Release |
|-----------|---------------|----------------------------------|
| main.css | 183913 bytes | 0.41% |
| index.js | 6321511 bytes | 0.34% |

## Version 3.0.0-pre.1976 - November 6, 2024

### ✨ Features & Improvements:
Expand Down
2 changes: 1 addition & 1 deletion v3/build_number.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildNumber":2000}
{"buildNumber":2012}
31 changes: 19 additions & 12 deletions v3/cypress/e2e/axis.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ context("Test graph axes with various attribute types", () => {
ah.verifyDefaultAxisLabel("bottom")
ah.verifyDefaultAxisLabel("left")
})
// This test has become flaky (tick mark count is off)
// Skipping for now (PT-#188534232)
it.skip("will add categorical attribute to x axis with undo/redo", () => {
it("will add categorical attribute to x axis with undo/redo", () => {
// Adding the attribute
cy.dragAttributeToTarget("table", arrayOfAttributes[7], "bottom") // Habitat => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Habitat", "bottom") // Habitat => x-axis
ah.verifyTickMarksDoNotExist("left")
ah.verifyGridLinesDoNotExist("left")
ah.verifyXAxisTickMarksDisplayed(true)
Expand All @@ -58,7 +57,8 @@ context("Test graph axes with various attribute types", () => {
})
it("will add numeric attribute to x axis with undo/redo", () => {
// Adding the attribute
cy.dragAttributeToTarget("table", arrayOfAttributes[2], "bottom") // LifeSpan => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("LifeSpan", "bottom") // LifeSpan => x-axis
ah.verifyTickMarksDoNotExist("left")
ah.verifyGridLinesDoNotExist("left")
ah.verifyXAxisTickMarksDisplayed()
Expand Down Expand Up @@ -124,7 +124,8 @@ context("Test graph axes with various attribute types", () => {
ah.verifyGridLinesDoNotExist("left")
})
it("will add categorical attribute to x axis and categorical attribute to y axis with undo/redo", () => {
cy.dragAttributeToTarget("table", arrayOfAttributes[7], "bottom") // Habitat => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Habitat", "bottom") // Habitat => x-axis
cy.dragAttributeToTarget("table", arrayOfAttributes[8], "left") // Diet => y-axis
ah.verifyXAxisTickMarksDisplayed(true)
ah.verifyXAxisGridLinesDisplayed(true)
Expand Down Expand Up @@ -159,7 +160,8 @@ context("Test graph axes with various attribute types", () => {
ah.verifyGridLinesDoNotExist("left")
})
it("will add categorical attribute to x axis and numeric attribute to y axis with undo/redo", () => {
cy.dragAttributeToTarget("table", arrayOfAttributes[7], "bottom") // Habitat => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Habitat", "bottom") // Habitat => x-axis
cy.dragAttributeToTarget("table", arrayOfAttributes[5], "left") // Sleep => y-axis
ah.verifyXAxisTickMarksDisplayed(true)
ah.verifyXAxisGridLinesDisplayed(true)
Expand Down Expand Up @@ -193,7 +195,8 @@ context("Test graph axes with various attribute types", () => {
ah.verifyGridLinesDoNotExist("left")
})
it("will add numeric attribute to x axis and categorical attribute to y axis with undo/redo", () => {
cy.dragAttributeToTarget("table", arrayOfAttributes[3], "bottom") // Height => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Height", "bottom") // Height => x-axis
cy.dragAttributeToTarget("table", arrayOfAttributes[7], "left") // Habitat => y-axis
ah.verifyXAxisTickMarksDisplayed()
ah.verifyXAxisGridLinesNotDisplayed()
Expand Down Expand Up @@ -228,7 +231,8 @@ context("Test graph axes with various attribute types", () => {
ah.verifyGridLinesDoNotExist("left")
})
it("will add numeric attribute to x axis and numeric attribute to y axis with undo/redo", () => {
cy.dragAttributeToTarget("table", arrayOfAttributes[3], "bottom") // Height => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Height", "bottom") // Height => x-axis
cy.dragAttributeToTarget("table", arrayOfAttributes[4], "left") // Mass => y-axis
ah.verifyXAxisTickMarksDisplayed()
ah.verifyYAxisTickMarksDisplayed()
Expand Down Expand Up @@ -258,7 +262,8 @@ context("Test graph axes with various attribute types", () => {
ah.verifyGridLinesDoNotExist("left")
})
it("will split an axis into identical sub axes when categorical attribute is on opposite split", () => {
cy.dragAttributeToTarget("table", arrayOfAttributes[4], "bottom") // Mass => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Mass", "bottom") // Mass => x-axis
cy.get("[data-testid=graph]").find("[data-testid=axis-bottom]").find(".sub-axis-wrapper").should("have.length", 1)
cy.dragAttributeToTarget("table", arrayOfAttributes[7], "top") // Habitat => top split
cy.get("[data-testid=graph]").find("[data-testid=axis-bottom]").find(".sub-axis-wrapper").should("have.length", 3)
Expand All @@ -276,7 +281,8 @@ context("Test graph axes with various attribute types", () => {
cy.get("[data-testid=graph]").find("[data-testid=axis-bottom]").find(".sub-axis-wrapper").should("have.length", 1)
})
it("will test graph with numeric x-axis and two numeric y-attributes", () => {
cy.dragAttributeToTarget("table", arrayOfAttributes[2], "bottom") // Lifespan => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("LifeSpan", "bottom") // LifeSpan => x-axis
cy.get("[data-testid=graph]").find("[data-testid=axis-bottom]").find(".sub-axis-wrapper").should("have.length", 1)
cy.dragAttributeToTarget("table", arrayOfAttributes[3], "left") // Height => left split
cy.dragAttributeToTarget("table", arrayOfAttributes[5], "yplus") // Sleep => left split
Expand Down Expand Up @@ -311,7 +317,8 @@ context("Test graph axes with various attribute types", () => {
it("will adjust axis domain when points are changed to bars with undo/redo", () => {
// When there are no negative numeric values, such as in the case of Height, the domain for the primary
// axis of a univariate plot showing bars should start at zero.
cy.dragAttributeToTarget("table", arrayOfAttributes[3], "bottom") // Height => x-axis
ah.openAxisAttributeMenu("bottom")
ah.selectMenuAttribute("Height", "bottom") // Height => x-axis
ah.verifyXAxisTickMarksDisplayed()
ah.verifyAxisTickLabel("bottom", "−0.5", 0)

Expand Down
114 changes: 58 additions & 56 deletions v3/cypress/e2e/formula/formula-component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,80 +1,81 @@
import { FormulaHelper as fh } from "../../support/helpers/formula-helper"
import { TableTileElements as table } from "../../support/elements/table-tile"
import { SliderTileElements as slider } from "../../support/elements/slider-tile"

context("Formula Engine", () => {
describe("Component Formula Tests", () => {
it("Add and edit formula for a new attribute", () => {
fh.visitURL("?sample=four&dashboard")
fh.addNewAttribute()
fh.renameAttribute("newAttr", "Formula")
fh.addFormula("Formula", "a+1")
fh.verifyValues("Formula", [2, 3, 4, 4, 1])
fh.checkFormulaExists("Formula", "a+1")
fh.editFormula("Formula", "a+2")
fh.verifyValues("Formula", [3, 4, 5, 5, 2])
table.addNewAttribute()
table.renameAttribute("newAttr", "Formula")
table.addFormula("Formula", "a+1")
table.verifyFormulaValues("Formula", [2, 3, 4, 4, 1])
table.checkFormulaExists("Formula", "a+1")
table.editFormula("Formula", "a+2")
table.verifyFormulaValues("Formula", [3, 4, 5, 5, 2])
})
it("Add and edit formula for an existing attribute", () => {
fh.visitURL("?sample=four&dashboard")
fh.addFormula("b", "count(a)")
fh.verifyValues("b", [4, 4, 4, 4, 4])
fh.checkFormulaExists("b", "count(a)")
fh.editFormula("b", "mean(a)")
fh.verifyValues("b", [2.25, 2.25, 2.25, 2.25, 2.25])
table.addFormula("b", "count(a)")
table.verifyFormulaValues("b", [4, 4, 4, 4, 4])
table.checkFormulaExists("b", "count(a)")
table.editFormula("b", "mean(a)")
table.verifyFormulaValues("b", [2.25, 2.25, 2.25, 2.25, 2.25])
})
it("Rename attribute and make sure formula updates", () => {
fh.visitURL("?sample=four&dashboard")
fh.addNewAttribute()
fh.renameAttribute("newAttr", "Formula")
fh.addFormula("Formula", "count(a)")
fh.verifyValues("Formula", [4, 4, 4, 4, 4])
fh.renameAttribute("a", "x")
fh.checkFormulaExists("Formula", "count(x)")
fh.verifyValues("Formula", [4, 4, 4, 4, 4])
fh.editFormula("Formula", "mean(x)")
fh.verifyValues("Formula", [2.25, 2.25, 2.25, 2.25, 2.25])
table.addNewAttribute()
table.renameAttribute("newAttr", "Formula")
table.addFormula("Formula", "count(a)")
table.verifyFormulaValues("Formula", [4, 4, 4, 4, 4])
table.renameAttribute("a", "x")
table.checkFormulaExists("Formula", "count(x)")
table.verifyFormulaValues("Formula", [4, 4, 4, 4, 4])
table.editFormula("Formula", "mean(x)")
table.verifyFormulaValues("Formula", [2.25, 2.25, 2.25, 2.25, 2.25])
})
it("Delete attribute that a formula uses", () => {
fh.visitURL("?sample=four&dashboard")
fh.addFormula("b", "count(a)")
fh.deleteAttribute("a")
fh.checkFormulaExists("b", "count(a)")
fh.verifyValues("b", [
table.addFormula("b", "count(a)")
table.deleteAttribute("a")
table.checkFormulaExists("b", "count(a)")
table.verifyFormulaValues("b", [
"❌ Undefined symbol a",
"❌ Undefined symbol a",
"❌ Undefined symbol a",
"❌ Undefined symbol a",
"❌ Undefined symbol a"
])
fh.editFormula("b", "5")
fh.verifyValues("b", [5, 5, 5, 5, 5])
table.editFormula("b", "5")
table.verifyFormulaValues("b", [5, 5, 5, 5, 5])
})
it("Use slider variable with formula", () => {
fh.visitURL("?sample=four&dashboard")
fh.addFormula("b", "count(a) + v1")
fh.verifyValues("b", [4.5, 4.5, 4.5, 4.5, 4.5])
fh.changeSliderVariableName("v2")
fh.checkFormulaExists("b", "count(a) + v2")
fh.verifyValues("b", [4.5, 4.5, 4.5, 4.5, 4.5])
fh.changeSliderValue("10")
fh.verifyValues("b", [14, 14, 14, 14, 14])
fh.deleteSlider()
fh.checkFormulaExists("b", "count(a) + v2")
table.addFormula("b", "count(a) + v1")
table.verifyFormulaValues("b", [4.5, 4.5, 4.5, 4.5, 4.5])
slider.changeVariableName("v2")
table.checkFormulaExists("b", "count(a) + v2")
table.verifyFormulaValues("b", [4.5, 4.5, 4.5, 4.5, 4.5])
slider.changeVariableValue("10")
table.verifyFormulaValues("b", [14, 14, 14, 14, 14])
slider.deleteSlider()
table.checkFormulaExists("b", "count(a) + v2")
})
it("Add slider after using it in formula", () => {
fh.visitURL("?sample=four")
fh.addFormula("b", "count(a) + v1")
fh.verifyValues("b", [
table.addFormula("b", "count(a) + v1")
table.verifyFormulaValues("b", [
"❌ Undefined symbol v1",
"❌ Undefined symbol v1",
"❌ Undefined symbol v1",
"❌ Undefined symbol v1",
"❌ Undefined symbol v1"
])
fh.addSlider()
fh.checkFormulaExists("b", "count(a) + v1")
fh.verifyValues("b", [4.5, 4.5, 4.5, 4.5, 4.5])
fh.deleteSlider()
fh.verifyValues("b", [
slider.addSlider()
table.checkFormulaExists("b", "count(a) + v1")
table.verifyFormulaValues("b", [4.5, 4.5, 4.5, 4.5, 4.5])
slider.deleteSlider()
table.verifyFormulaValues("b", [
"❌ Undefined symbol v1",
"❌ Undefined symbol v1",
"❌ Undefined symbol v1",
Expand All @@ -84,22 +85,23 @@ context("Formula Engine", () => {
})
it("Formula in a new dataset", () => {
fh.visitURL("")
fh.createNewDataset()
fh.insertCases(2, 4)
fh.addFormula("AttributeName", "10*10")
fh.verifyValues("AttributeName", [100, 100, 100, 100, 100])
fh.addNewAttribute()
fh.addFormula("newAttr", "AttributeName+2")
fh.verifyValues("newAttr", [102, 102, 102, 102, 102])
table.createNewTableFromToolShelf()
table.openIndexMenuForRow(2)
table.insertCases(4, "after")
table.addFormula("AttributeName", "10*10")
table.verifyFormulaValues("AttributeName", [100, 100, 100, 100, 100])
table.addNewAttribute()
table.addFormula("newAttr", "AttributeName+2")
table.verifyFormulaValues("newAttr", [102, 102, 102, 102, 102])
})
})
describe("Add functions and values from Insert buttons", () => {
it("Navigate functions browser", () => {
const func = "abs"
const funcCategory = "Arithmetic"
fh.visitURL("?sample=four&dashboard")
fh.addNewAttribute()
fh.renameAttribute("newAttr", "Formula")
table.addNewAttribute()
table.renameAttribute("newAttr", "Formula")
table.openAttributeMenu("Formula")
table.selectMenuItemFromAttributeMenu("Edit Formula...")
cy.get("[data-testid=formula-insert-function-button]").click()
Expand All @@ -121,8 +123,8 @@ context("Formula Engine", () => {
const func = "abs"
const funcCategory = "Arithmetic"
fh.visitURL("?sample=four&dashboard")
fh.addNewAttribute()
fh.renameAttribute("newAttr", "Formula")
table.addNewAttribute()
table.renameAttribute("newAttr", "Formula")
table.openAttributeMenu("Formula")
table.selectMenuItemFromAttributeMenu("Edit Formula...")
cy.get("[data-testid=formula-insert-function-button]").click()
Expand All @@ -139,8 +141,8 @@ context("Formula Engine", () => {
it("Insert value into formula", () => {
const value = "b"
fh.visitURL("?sample=four&dashboard")
fh.addNewAttribute()
fh.renameAttribute("newAttr", "Formula")
table.addNewAttribute()
table.renameAttribute("newAttr", "Formula")
table.openAttributeMenu("Formula")
table.selectMenuItemFromAttributeMenu("Edit Formula...")
cy.get("[data-testid=formula-insert-value-button]").click()
Expand Down
21 changes: 11 additions & 10 deletions v3/cypress/e2e/formula/formula-errors.spec.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
import { FormulaHelper as fh } from "../../support/helpers/formula-helper"
import { TableTileElements as table } from "../../support/elements/table-tile"

context("Formula Engine", () => {
describe("Errors Formula Tests", () => {
it("Check invalid functions", () => {
fh.visitURL("?sample=four")
fh.addNewAttribute()
fh.renameAttribute("newAttr", "Formula")
fh.addFormula("Formula", "count(aaa)")
fh.verifyValues("Formula", [
table.addNewAttribute()
table.renameAttribute("newAttr", "Formula")
table.addFormula("Formula", "count(aaa)")
table.verifyFormulaValues("Formula", [
"❌ Undefined symbol aaa",
"❌ Undefined symbol aaa",
"❌ Undefined symbol aaa",
"❌ Undefined symbol aaa",
"❌ Undefined symbol aaa"
])
fh.editFormula("Formula", "c(aaa)")
fh.verifyValues("Formula", [
table.editFormula("Formula", "c(aaa)")
table.verifyFormulaValues("Formula", [
"❌ Undefined function c",
"❌ Undefined function c",
"❌ Undefined function c",
"❌ Undefined function c",
"❌ Undefined function c"
])
// need to add {del} because CodeMirror auto-matches parentheses
fh.editFormula("Formula", "count(a{del}")
fh.verifyValues("Formula", [
table.editFormula("Formula", "count(a{del}")
table.verifyFormulaValues("Formula", [
"❌ Syntax error: 'Parenthesis ) expected (char 8)'",
"❌ Syntax error: 'Parenthesis ) expected (char 8)'",
"❌ Syntax error: 'Parenthesis ) expected (char 8)'",
"❌ Syntax error: 'Parenthesis ) expected (char 8)'",
"❌ Syntax error: 'Parenthesis ) expected (char 8)'"
])
fh.editFormula("Formula", "count(a)")
fh.verifyValues("Formula", [4, 4, 4, 4, 4])
table.editFormula("Formula", "count(a)")
table.verifyFormulaValues("Formula", [4, 4, 4, 4, 4])
})
})
})
Loading

0 comments on commit 92adb98

Please sign in to comment.