Skip to content
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

EDSC-4041: Updates actions to use node20 actions #78

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
node-version: ['lts/hydrogen']
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -43,13 +43,13 @@ jobs:
node-version: ['lts/hydrogen']
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -66,7 +66,9 @@ jobs:
- name: Run Jest tests
run: npm run test
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
cypress:
needs: [eslint]
runs-on: ubuntu-latest
Expand All @@ -75,13 +77,13 @@ jobs:
node-version: ['lts/hydrogen']
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -98,16 +100,18 @@ jobs:
- name: Run Cypress tests
run: npm run cypress:ci
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
directory: 'cypress-coverage'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
deploy:
if: success() && github.ref == 'refs/heads/main' # only run on main success
needs: [jest, cypress] # only run after jest and cypress jobs complete
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
Expand All @@ -127,7 +131,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Run predeploy
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/callbacks.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('Callbacks', () => {

cy.window().then((win) => {
expect(win.console.log.getCall(0).args[0]).to.equal('handleTemporalSet called')
expect(win.console.log.getCall(0).args[1]).to.equal('{"center":1609459200000,"temporalEnd":1610766098533,"temporalStart":1608010249884,"timelineEnd":1688169600000,"timelineStart":1530403200000,"zoom":3}')
expect(win.console.log.getCall(0).args[1]).to.equal('{"center":1609459200000,"temporalEnd":1610769677838,"temporalStart":1608006278919,"timelineEnd":1688169600000,"timelineStart":1530403200000,"zoom":3}')
})
})

Expand All @@ -87,7 +87,7 @@ describe('Callbacks', () => {

cy.window().then((win) => {
expect(win.console.log.getCall(0).args[0]).to.equal('handleDragPan called')
expect(win.console.log.getCall(0).args[1]).to.equal('{"center":1608123891892,"timelineEnd":1688169600000,"timelineStart":1530403200000,"zoom":3}')
expect(win.console.log.getCall(0).args[1]).to.equal('{"center":1608120233514,"timelineEnd":1688169600000,"timelineStart":1530403200000,"zoom":3}')
})
})

Expand All @@ -111,7 +111,7 @@ describe('Callbacks', () => {

cy.window().then((win) => {
expect(win.console.log.getCall(0).args[0]).to.equal('handleScrollPan called')
expect(win.console.log.getCall(0).args[1]).to.equal('{"center":1610794508108,"timelineEnd":1688169600000,"timelineStart":1530403200000,"zoom":3}')
expect(win.console.log.getCall(0).args[1]).to.equal('{"center":1610798166486,"timelineEnd":1688169600000,"timelineStart":1530403200000,"zoom":3}')
})
})

Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/resizing.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Window resizing', () => {

getByTestId('center').should('have.text', 'Center: Fri, 01 Jan 2021 00:00:00 GMT')
getByTestId('tooltip').should('have.text', '15 Dec 2020 05:30:49 to 16 Jan 2021 03:01:38')
getByTestId('tooltip').should('have.css', 'left', '552.5px')
getByTestId('tooltip').should('have.css', 'left', '552.507px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')

// Change the window from 1400x1100 to 1000x1100
Expand All @@ -22,7 +22,7 @@ describe('Window resizing', () => {

getByTestId('center').should('have.text', 'Center: Fri, 01 Jan 2021 00:00:00 GMT')
getByTestId('tooltip').should('have.text', '15 Dec 2020 05:30:49 to 16 Jan 2021 03:01:38')
getByTestId('tooltip').should('have.css', 'left', '462.905px')
getByTestId('tooltip').should('have.css', 'left', '462.911px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')

// Drag the timeline a little
Expand All @@ -31,9 +31,9 @@ describe('Window resizing', () => {
.trigger('pointermove', 450, 25, { pointerId: 1 })
.trigger('pointerup', { pointerId: 1 })

getByTestId('center').should('have.text', 'Center: Tue, 19 Jan 2021 10:42:34 GMT')
getByTestId('center').should('have.text', 'Center: Tue, 19 Jan 2021 11:55:21 GMT')
getByTestId('tooltip').should('have.text', '15 Dec 2020 05:30:49 to 16 Jan 2021 03:01:38')
getByTestId('tooltip').should('have.css', 'left', '415.905px')
getByTestId('tooltip').should('have.css', 'left', '415.911px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')

// Reset the window size
Expand All @@ -42,9 +42,9 @@ describe('Window resizing', () => {
// Mouse over the temporal range
getByTestId('timelineList').rightclick()

getByTestId('center').should('have.text', 'Center: Tue, 19 Jan 2021 10:42:34 GMT')
getByTestId('center').should('have.text', 'Center: Tue, 19 Jan 2021 11:55:21 GMT')
getByTestId('tooltip').should('have.text', '15 Dec 2020 05:30:49 to 16 Jan 2021 03:01:38')
getByTestId('tooltip').should('have.css', 'left', '496.403px')
getByTestId('tooltip').should('have.css', 'left', '496.41px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})
})
39 changes: 16 additions & 23 deletions cypress/e2e/temporal_dragging.cy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { getByTestId } from '../support/getByTestId'

const timeAtPx = {
550: '2020-11-13T08:00:01.235Z',
650: '2020-12-15T05:30:49.884Z',
750: '2021-01-16T03:01:38.533Z',
850: '2021-02-18T00:12:59.614Z'
}

describe('Temporal dragging', () => {
describe('creating temporal range', () => {
beforeEach(() => {
Expand Down Expand Up @@ -77,8 +70,8 @@ describe('Temporal dragging', () => {
clientY: 10
})

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[650]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[750]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-12-15T04:24:38.919Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2021-01-16T04:01:17.838Z')
})

it('when mousing out of a temporal marker does not hover the marker ', () => {
Expand Down Expand Up @@ -121,8 +114,8 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[550]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[650]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-11-13T04:48:00.000Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2020-12-15T04:24:38.919Z')
})
})
})
Expand Down Expand Up @@ -155,8 +148,8 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[650]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[750]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-12-15T05:30:49.884Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2021-01-16T03:01:38.533Z')
})
})

Expand All @@ -182,8 +175,8 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[550]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[750]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-11-13T04:48:00.000Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2021-01-16T03:01:38.533Z')
})

it('dragging the start marker past the end marker changes the temporal range', () => {
Expand All @@ -201,8 +194,8 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[750]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[850]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2021-01-16T03:01:38.533Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2021-02-18T03:22:22.703Z')
})

it('dragging the end marker changes the temporal range', () => {
Expand All @@ -220,8 +213,8 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[650]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[850]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-12-15T05:30:49.884Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2021-02-18T03:22:22.703Z')
})

it('dragging the end marker past the start marker changes the temporal range', () => {
Expand All @@ -239,8 +232,8 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[550]}`)
getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[650]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-11-13T04:48:00.000Z')
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2020-12-15T05:30:49.884Z')
})
})

Expand All @@ -264,7 +257,7 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalStart').should('have.text', `Temporal Start: ${timeAtPx[550]}`)
getByTestId('temporalStart').should('have.text', 'Temporal Start: 2020-11-13T04:48:00.000Z')
})

it('dragging the end marker changes the temporal range', () => {
Expand All @@ -286,7 +279,7 @@ describe('Temporal dragging', () => {
})
.trigger('pointerup', { pointerId: 1 })

getByTestId('temporalEnd').should('have.text', `Temporal End: ${timeAtPx[850]}`)
getByTestId('temporalEnd').should('have.text', 'Temporal End: 2021-02-18T03:22:22.703Z')
})
})
})
14 changes: 7 additions & 7 deletions cypress/e2e/temporal_tooltips.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Temporal tooltips', () => {
getByTestId('timelineList').rightclick()

getByTestId('tooltip').should('have.text', '15 Dec 2020 05:30:49 to 16 Jan 2021 03:01:38')
getByTestId('tooltip').should('have.css', 'left', '552.5px')
getByTestId('tooltip').should('have.css', 'left', '552.507px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})

Expand All @@ -25,7 +25,7 @@ describe('Temporal tooltips', () => {
getByTestId('startMarker').rightclick()

getByTestId('tooltip').should('have.text', '15 Dec 2020 05:30:49')
getByTestId('tooltip').should('have.css', 'left', '504px')
getByTestId('tooltip').should('have.css', 'left', '504.139px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})

Expand All @@ -34,7 +34,7 @@ describe('Temporal tooltips', () => {
getByTestId('endMarker').rightclick()

getByTestId('tooltip').should('have.text', '16 Jan 2021 03:01:38')
getByTestId('tooltip').should('have.css', 'left', '601px')
getByTestId('tooltip').should('have.css', 'left', '600.874px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})
})
Expand All @@ -50,7 +50,7 @@ describe('Temporal tooltips', () => {
getByTestId('timelineList').rightclick()

getByTestId('tooltip').should('have.text', '15 Dec 2020 13:24:20 ongoing')
getByTestId('tooltip').should('have.css', 'left', '807.5px')
getByTestId('tooltip').should('have.css', 'left', '807.568px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})

Expand All @@ -59,7 +59,7 @@ describe('Temporal tooltips', () => {
getByTestId('startMarker').rightclick()

getByTestId('tooltip').should('have.text', '15 Dec 2020 13:24:20')
getByTestId('tooltip').should('have.css', 'left', '505px')
getByTestId('tooltip').should('have.css', 'left', '505.137px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})
})
Expand All @@ -75,7 +75,7 @@ describe('Temporal tooltips', () => {
getByTestId('timelineList').rightclick()

getByTestId('tooltip').should('have.text', 'Up to 16 Jan 2021 10:55:09')
getByTestId('tooltip').should('have.css', 'left', '301px')
getByTestId('tooltip').should('have.css', 'left', '300.936px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})

Expand All @@ -84,7 +84,7 @@ describe('Temporal tooltips', () => {
getByTestId('endMarker').rightclick()

getByTestId('tooltip').should('have.text', '16 Jan 2021 10:55:09')
getByTestId('tooltip').should('have.css', 'left', '602px')
getByTestId('tooltip').should('have.css', 'left', '601.872px')
getByTestId('tooltip').should('have.css', 'bottom', '2px')
})
})
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/timeline_dragging.cy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getByTestId } from '../support/getByTestId'

const startCenter = 'Center: Fri, 01 Jan 2021 00:00:00 GMT'
const backwardCenter = 'Center: Wed, 16 Dec 2020 13:04:51 GMT'
const forwardCenter = 'Center: Sat, 16 Jan 2021 10:55:08 GMT'
const backwardCenter = 'Center: Wed, 16 Dec 2020 12:03:53 GMT'
const forwardCenter = 'Center: Sat, 16 Jan 2021 11:56:06 GMT'
const timelineRangeStart = 'Timeline Start: 2018-07-01T00:00:00.000Z'
const timelineRangeEnd = 'Timeline End: 2023-07-01T00:00:00.000Z'

Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/timeline_zooming.cy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { getByTestId } from '../support/getByTestId'

const startCenter = 'Center: Fri, 01 Jan 2021 00:00:00 GMT'
const zoom1Center = 'Center: Tue, 23 Mar 2021 15:41:51 GMT'
const zoom2Center = 'Center: Wed, 17 Mar 2021 03:34:04 GMT'
const zoom1Center = 'Center: Tue, 23 Mar 2021 21:04:51 GMT'
const zoom2Center = 'Center: Wed, 17 Mar 2021 08:57:04 GMT'
const zoom3Center = 'Center: Fri, 01 Jan 2021 00:00:00 GMT'
const zoom4Center = 'Center: Tue, 25 Dec 2018 10:07:13 GMT'
const zoom5Center = 'Center: Mon, 04 Jan 2010 01:02:53 GMT'
const zoom4Center = 'Center: Tue, 25 Dec 2018 15:30:24 GMT'
const zoom5Center = 'Center: Mon, 04 Jan 2010 06:27:34 GMT'

const scrollWheel = (direction) => {
getByTestId('timelineList')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ describe('TimelineDataSection component', () => {
const secondDataChild = intervals[1]

expect(intervals.length).toEqual(2)
expect(firstDataChild.style.left).toEqual('68.4931506849315px')
expect(firstDataChild.style.width).toEqual('12.32876712328767px')
expect(secondDataChild.style.left).toEqual('82.1917808219178px')
expect(secondDataChild.style.width).toEqual('10.95890410958904px')
expect(firstDataChild.style.left).toEqual('68.30601092896175px')
expect(firstDataChild.style.width).toEqual('12.295081967213115px')
expect(secondDataChild.style.left).toEqual('81.96721311475409px')
expect(secondDataChild.style.width).toEqual('10.92896174863388px')
})

test('sets a default color', () => {
Expand Down
Loading