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

[Release] v0.9.0 beta.0 #185

Merged
merged 71 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4a48ef2
fix: upgrade typescript from 5.0.4 to 5.1.3
snyk-bot Jul 1, 2023
5a8dbdc
github-actions[bot] Jul 7, 2023
f3cc95a
Remove node-sass, add sass
gsreynolds Jul 7, 2023
07a7fdb
Merge pull request #147 from PagerDuty/dart-sass
gsreynolds Jul 7, 2023
0421310
Bump yarn-audit-fix from 9.3.10 to 9.3.12
dependabot[bot] Jul 7, 2023
bf3e8b4
Node 18.16.1
gsreynolds Jul 7, 2023
45e002c
Output node version at start
gsreynolds Jul 7, 2023
f363dd1
Merge pull request #151 from PagerDuty/node18
gsreynolds Jul 7, 2023
9bd8cde
fix: upgrade web-vitals from 3.3.1 to 3.3.2
snyk-bot Jul 8, 2023
6e678ce
Add relative dates setting
gsreynolds Jul 10, 2023
c47648b
Add i18n for moment relative dates
gsreynolds Jul 10, 2023
906499e
Add Cypress test for relative dates
gsreynolds Jul 10, 2023
e5e0467
Add date value sort function
gsreynolds Jul 10, 2023
516e48b
Add Age column
gsreynolds Jul 10, 2023
abd1975
Remove ago suffix from Age column
gsreynolds Jul 10, 2023
33fe661
Merge pull request #154 from PagerDuty/relative_dates
gsreynolds Jul 11, 2023
e73f569
Add react-linkify for URLs in notes
gsreynolds Jul 11, 2023
367be28
Add e2e test for URLs in notes
gsreynolds Jul 11, 2023
f4a5017
Add rel noopener noreferrer
gsreynolds Jul 11, 2023
d6186ee
linkifyjs also supports emails
gsreynolds Jul 11, 2023
949d6eb
Merge pull request #159 from PagerDuty/linkify_urls_in_notes
gsreynolds Jul 12, 2023
f3c81ed
Merge pull request #140 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 13, 2023
bfba16b
Bump react-intersection-observer from 9.5.1 to 9.5.2
dependabot[bot] Jul 13, 2023
5ad8290
Add a column for incident responders
gsreynolds Jul 11, 2023
e618f73
Add Responders column to Add Responders e2e test
gsreynolds Jul 11, 2023
33d6376
Add responders to Fuse config
gsreynolds Jul 11, 2023
e91a3af
Merge pull request #143 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 13, 2023
e2fc74e
Bump semver from 5.7.1 to 5.7.2
dependabot[bot] Jul 13, 2023
2042737
Merge pull request #162 from PagerDuty/dependabot/npm_and_yarn/semver…
gsreynolds Jul 13, 2023
c13b440
Bump gh-pages from 4.0.0 to 5.0.0
dependabot[bot] Jul 13, 2023
90bb107
Bump framer-motion from 10.12.7 to 10.12.20
dependabot[bot] Jul 13, 2023
9228e31
Use AvatarGroup to stack Avatars in excess of 3 together
gsreynolds Jul 13, 2023
b4ca7de
actions for large numbers of incidents
martindstone Jul 14, 2023
e722a58
Update .tool-versions
gsreynolds Jul 14, 2023
3469bb9
Merge pull request #158 from PagerDuty/incidents_responders
gsreynolds Jul 14, 2023
e87edda
Add dependabot config for GitHub Actions
gsreynolds Jul 14, 2023
e7314fe
Merge pull request #170 from PagerDuty/gha_dependabot
gsreynolds Jul 14, 2023
b4f3fe3
Merge pull request #166 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 14, 2023
23194df
Bump @emotion/react from 11.10.8 to 11.11.1
dependabot[bot] Jul 13, 2023
aec7c24
fix: upgrade @emotion/styled from 11.10.8 to 11.11.0
snyk-bot Jul 8, 2023
9bb702f
Merge pull request #167 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 14, 2023
fd23d48
Merge pull request #165 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 14, 2023
5ebd548
Merge pull request #152 from PagerDuty/snyk-upgrade-568f16831e93e1943…
gsreynolds Jul 14, 2023
de41d54
Merge pull request #133 from PagerDuty/snyk-upgrade-b884c1d6223a9e5b1…
gsreynolds Jul 14, 2023
0612ea9
fix: upgrade react-icons from 4.8.0 to 4.9.0
snyk-bot Jul 1, 2023
ce544bf
Merge pull request #135 from PagerDuty/snyk-upgrade-6866ebc12697934e4…
gsreynolds Jul 14, 2023
8bc049a
Bump @types/jest from 29.5.2 to 29.5.3
dependabot[bot] Jul 14, 2023
4911194
Bump react-select from 5.7.3 to 5.7.4
dependabot[bot] Jul 14, 2023
2dfaf54
nicer avatargroup for the personinitialscomponents
martindstone Jul 14, 2023
d477252
Remove border from avatars
gsreynolds Jul 14, 2023
fc221b6
Adjust responders e2e test for the popover
gsreynolds Jul 14, 2023
804d388
Merge pull request #175 from PagerDuty/avatar-groups
gsreynolds Jul 14, 2023
ace285c
Translate incident action phrases
gsreynolds Jul 14, 2023
d5cd736
show an error if the user attempts to get >10000 incidents
martindstone Jul 14, 2023
7261027
remove the option to turn off server side filtering
martindstone Jul 16, 2023
91776d5
Merge pull request #168 from PagerDuty/issue-156
gsreynolds Jul 17, 2023
39be7ea
Merge pull request #180 from PagerDuty/issue-163
gsreynolds Jul 17, 2023
d0c23f5
Merge pull request #182 from PagerDuty/issue-181
gsreynolds Jul 17, 2023
8d8a5a0
Ensure i18next-parser has a static list of the standard columns
gsreynolds Jul 14, 2023
f91918c
Ensure i18next-parser has a static list of severity names
gsreynolds Jul 14, 2023
1f65bb8
Update translations
gsreynolds Jul 14, 2023
eaf0586
Bump i18next from 22.5.1 to 23.2.11
dependabot[bot] Jul 13, 2023
352f6cf
Update i18next-parser to 8.2.0
gsreynolds Jul 14, 2023
243d360
Update translations
gsreynolds Jul 17, 2023
771c321
If you want to use plain english keys, separators such as `.` and `:`…
gsreynolds Jul 17, 2023
bc2b1c7
Merge pull request #169 from PagerDuty/i18n_updates
gsreynolds Jul 17, 2023
97327ad
Bump i18next-browser-languagedetector from 7.0.1 to 7.1.0
dependabot[bot] Jul 17, 2023
c170d02
Merge pull request #173 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 17, 2023
57df79d
Merge pull request #172 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 17, 2023
503e190
Merge pull request #174 from PagerDuty/dependabot/npm_and_yarn/develo…
gsreynolds Jul 17, 2023
010148a
Publishing release v0.9.0-beta.0
gsreynolds Jul 17, 2023
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ updates:
labels:
- 'npm'
- 'dependencies'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
# Raise pull requests for version updates on github-actions against the `develop` branch
target-branch: 'develop'
# Labels on pull requests for version updates only
labels:
- 'github-actions'
- 'dependencies'
9 changes: 4 additions & 5 deletions .github/workflows/cd-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ jobs:
REACT_APP_DD_DEFAULT_PRIVACY_LEVEL: ${{ secrets.DD_DEFAULT_PRIVACY_LEVEL }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.19.0'
node-version-file: .tool-versions
- name: Install Yarn
run: npm install -g yarn
# https://github.com/actions/cache/blob/main/examples.md#node---yarn
Expand Down Expand Up @@ -71,7 +70,7 @@ jobs:
sync-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Merge main -> develop
uses: devmasx/merge-branch@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:

# For Snyk Open Source you must first set up the development environment for your application's dependencies
# For example for Node
- uses: actions/setup-node@master
- uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: .tool-versions

# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
- name: Run Snyk to check for vulnerabilities
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
needs: install
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.16.0-chrome107-ff107
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
strategy:
fail-fast: false
Expand Down Expand Up @@ -81,6 +81,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: .tool-versions
- name: Node Version
run: node -v
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
Expand Down
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# MUST match .node-version
nodejs 16.19.0
nodejs 18.16.1
yarn 1.22.19
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you wish to maintain + deploy your own version of PagerDuty Live, we recommen

#### Local Development

1. Install [NodeJS v16.19](https://nodejs.org/tr/blog/release/v16.19.0/) via [`asdf install`](https://github.com/asdf-vm/asdf) / [`nvm`](https://github.com/nvm-sh/nvm)
1. Install [NodeJS v18.16.1](https://nodejs.org/en/blog/release/v18.16.1) via [`asdf install`](https://github.com/asdf-vm/asdf) / [`nvm`](https://github.com/nvm-sh/nvm)

2. `$ git clone` repo to desired destination and `$ cd pd-live-react` into directory

Expand Down
42 changes: 39 additions & 3 deletions cypress/e2e/Incidents/incidents.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import {
runExternalSystemSync,
runResponsePlay,
checkActionAlertsModalContent,
checkPopoverContent,
checkIncidentCellContent,
checkNoIncidentsSelected,
// activateButton,
// deactivateButton,
checkIncidentCellContentHasLink,
manageIncidentTableColumns,
priorityNames,
} from '../../support/util/common';

Expand Down Expand Up @@ -89,6 +90,32 @@ describe('Manage Open Incidents', { failFast: { enabled: false } }, () => {
});
});

it('Add note with URL to singular incident', () => {
const note = 'This note has a URL example.com included';
const incidentIdx = 2;
selectIncident(incidentIdx);

cy.get(`@selectedIncidentId_${incidentIdx}`).then((incidentId) => {
addNote(note);
checkActionAlertsModalContent('have been updated with a note');
checkIncidentCellContent(incidentId, 'Latest Note', note);
checkIncidentCellContentHasLink(incidentId, 'Latest Note', 'example.com', 'http://example.com');
});
});

it('Add note with email to singular incident', () => {
const note = 'This note has an email [email protected] included';
const incidentIdx = 3;
selectIncident(incidentIdx);

cy.get(`@selectedIncidentId_${incidentIdx}`).then((incidentId) => {
addNote(note);
checkActionAlertsModalContent('have been updated with a note');
checkIncidentCellContent(incidentId, 'Latest Note', note);
checkIncidentCellContentHasLink(incidentId, 'Latest Note', '[email protected]', 'mailto:[email protected]');
});
});

// Assumed environment has 3 levels on escalation policy
for (let escalationLevel = 1; escalationLevel < 4; escalationLevel++) {
it(`Escalate singular incident to level: ${escalationLevel}`, () => {
Expand Down Expand Up @@ -119,11 +146,20 @@ describe('Manage Open Incidents', { failFast: { enabled: false } }, () => {
});

it('Add responder (User A1) to singular incident', () => {
const columns = [
['Responders', 'responders'],
];
manageIncidentTableColumns('add', columns.map((column) => column[1]));
const responders = ['User A1'];
const message = 'Need help with this incident';
selectIncident(0);
const incidentIdx = 0;
selectIncident(incidentIdx);
addResponders(responders, message);
checkActionAlertsModalContent('Requested additional response for incident(s)');
cy.get(`@selectedIncidentId_${incidentIdx}`).then((incidentId) => {
checkIncidentCellContent(incidentId, 'Responders', 'UA');
checkPopoverContent(incidentId, 'Responders', '[email protected]');
});
});

it('Add responder (Team A) to singular incident', () => {
Expand Down
3 changes: 0 additions & 3 deletions cypress/e2e/Query/query.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import {
import {
acceptDisclaimer,
waitForIncidentTable,
updateAutoAcceptIncidentQuery,
activateButton,
deactivateButton,
checkIncidentCellContentAllRows,
checkIncidentCellIconAllRows,
manageIncidentTableColumns,
Expand Down
31 changes: 29 additions & 2 deletions cypress/e2e/Settings/settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
updateDefaultSinceDateLookback,
updateMaxRateLimit,
updateDarkMode,
updateRelativeDates,
manageIncidentTableColumns,
manageCustomAlertColumnDefinitions,
// activateButton,
// priorityNames,
checkIncidentCellContentAllRows,
} from '../../support/util/common';

describe('Manage Settings', { failFast: { enabled: false } }, () => {
Expand Down Expand Up @@ -205,4 +205,31 @@ describe('Manage Settings', { failFast: { enabled: false } }, () => {
state.settings.darkMode,
).to.equal(!currentDarkMode));
});

it('Update relative dates', () => {
[true, false].forEach((relativeDates) => {
updateRelativeDates(relativeDates);
cy.window()
.its('store')
.invoke('getState')
.then((state) => expect(
state.settings.relativeDates,
).to.equal(relativeDates));

if (relativeDates) {
checkIncidentCellContentAllRows('Created At', /second[s]? ago|minute[s]? ago|hour[s]? ago/);
}
});
});

it('Add age column to incident table', () => {
const columns = [
['Age', 'age'],
];
manageIncidentTableColumns('add', columns.map((column) => column[1]));
columns.map((column) => column[0]).forEach((columnName) => {
cy.get(`[data-column-name="${columnName}"]`).scrollIntoView().should('be.visible');
});
checkIncidentCellContentAllRows('Age', /second[s]?|minute[s]?|hour[s]?/);
});
});
33 changes: 23 additions & 10 deletions cypress/support/util/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,21 @@ export const checkNoIncidentsSelected = () => {
export const checkActionAlertsModalContent = (content) => {
cy.wait(2000);
cy.get('.chakra-alert__title').contains(content, { timeout: 10000 });
// cy.get('.action-alerts-modal').type('{esc}');
};

export const checkPopoverContent = (incidentId, incidentHeader, content) => {
cy.wait(2000);
cy.get(`[data-incident-header="${incidentHeader}"][data-incident-cell-id="${incidentId}"]`).within(() => {
cy.get('.chakra-avatar__group').realHover();
cy.get('.chakra-popover__popper').should('be.visible').contains(content, { timeout: 10000 });
});
};

export const checkIncidentCellContent = (incidentId, incidentHeader, content) => {
cy.wait(2000);
cy.get(`[data-incident-header="${incidentHeader}"][data-incident-cell-id="${incidentId}"]`)
.should('be.visible')
.should('have.text', content);
.contains(content);
};

export const checkIncidentCellContentAllRows = (incidentHeader, content) => {
Expand All @@ -69,7 +76,7 @@ export const checkIncidentCellContentAllRows = (incidentHeader, content) => {
)
.scrollIntoView()
.should('be.visible')
.should('have.text', content);
.contains(content);
}
});
};
Expand All @@ -94,6 +101,14 @@ export const checkIncidentCellIconAllRows = (incidentHeader, icon) => {
});
};

export const checkIncidentCellContentHasLink = (incidentId, incidentHeader, text, link) => {
cy.wait(2000);
cy.get(`[data-incident-header="${incidentHeader}"][data-incident-cell-id="${incidentId}"]`)
.should('be.visible')
.contains('a', text)
.should('have.attr', 'href', link);
};

export const deactivateButton = (domId) => {
cy.get(`#${domId}`).then(($el) => {
const cls = $el.attr('class');
Expand Down Expand Up @@ -290,20 +305,18 @@ export const updateMaxRateLimit = (limit = 200) => {
checkActionAlertsModalContent('Updated user profile settings');
};

export const updateAutoAcceptIncidentQuery = (autoAcceptIncidentsQuery = false) => {
export const updateRelativeDates = (relativeDates = false) => {
cy.get('.settings-panel-dropdown').click();
cy.get('.dropdown-item').contains('Settings').click();
cy.get('.nav-item').contains('User Profile').click();

if (autoAcceptIncidentsQuery) {
cy.get('#user-profile-auto-accept-incident-query-checkbox').check({ force: true });
if (relativeDates) {
cy.get('#relative-dates-switch').check({ force: true });
} else {
cy.get('#user-profile-auto-accept-incident-query-checkbox').uncheck({ force: true });
cy.get('#relative-dates-switch').uncheck({ force: true });
}

cy.get('.btn').contains('Update User Profile').click();
cy.get('#save-settings-button').click();
checkActionAlertsModalContent('Updated user profile settings');
cy.get('.close').click();
};

export const updateDarkMode = () => {
Expand Down
4 changes: 2 additions & 2 deletions i18next-parser.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
keepRemoved: false,
// Keep keys from the catalog that are no longer in code

keySeparator: '.',
keySeparator: false,
// Key separator used in your translation keys
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.

Expand All @@ -46,7 +46,7 @@ module.exports = {
locales: ['en', 'fr', 'es', 'de', 'ja', 'id', 'pt', 'pt-br'],
// An array of the locales in your applications

namespaceSeparator: ':',
namespaceSeparator: false,
// Namespace separator used in your translation keys
// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.

Expand Down
Loading
Loading