Skip to content

Commit

Permalink
Merge pull request #42 from globaldothealth/41-replace-monkeypox-with…
Browse files Browse the repository at this point in the history
…-mpox-for-map

Replace Monkeypox with Mpox
  • Loading branch information
stanislaw-zakrzewski authored Nov 10, 2023
2 parents 0632b3f + 2ffc330 commit 9a4b8bc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Global.health Monkeypox visualization
# Global.health Mpox visualization

Global.health Monkeypox visualization
Global.health Mpox visualization

https://map.monkeypox.global.health

Expand Down
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress';

export default defineConfig({
projectId: 'j7ngy8',
defaultCommandTimeout: 8000,
defaultCommandTimeout: 15000,
viewportWidth: 1280,
viewportHeight: 1024,
e2e: {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/App.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('<App />', () => {
cy.visit('/');

cy.contains(/Country view/i).should('be.visible');
cy.contains(/Monkeypox Dataset/i).should('be.visible');
cy.contains(/Mpox Dataset/i).should('be.visible');
cy.contains(/Feedback/i).should('be.visible');
cy.contains(/Briefing Report/i).should('be.visible');
});
Expand All @@ -84,7 +84,7 @@ describe('<App />', () => {
cy.contains(/Line List Cases/i).should('be.visible');
cy.url().should('eq', 'http://localhost:3000/country');

cy.contains(/Monkeypox Dataset/i)
cy.contains(/Mpox Dataset/i)
.should('have.attr', 'href')
.and('eq', 'https://github.com/globaldothealth/monkeypox');

Expand Down
21 changes: 20 additions & 1 deletion cypress/e2e/CopyStateLinkButton.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('<CopyStateLinkButton />', () => {
cy.contains(/COPY LINK TO/i).should('be.visible');
});

it('Copying proper link to clipboard', () => {
it('Copying proper link to clipboard for country view', () => {
cy.visit('/country');
cy.wrap(
Cypress.automation('remote:debugger:protocol', {
Expand All @@ -67,6 +67,8 @@ describe('<CopyStateLinkButton />', () => {

cy.get('.MuiSlider-track + span > input').invoke('attr', 'value', 12);

cy.get('button').contains(/Accept/i).should('be.visible').click()

cy.contains(/COPY LINK TO/i)
.should('be.visible')
.focus()
Expand All @@ -77,9 +79,24 @@ describe('<CopyStateLinkButton />', () => {
expect(text).to.include('?name=ARG&currDate=12');
});
});
});

it('Copying proper link to clipboard from chart', () => {
cy.visit('/chart');

cy.wrap(
Cypress.automation('remote:debugger:protocol', {
command: 'Browser.grantPermissions',
params: {
permissions: [
'clipboardReadWrite',
'clipboardSanitizedWrite',
],
origin: window.location.origin,
},
}),
);

cy.wait(3000);

cy.contains('Argentina').click();
Expand All @@ -90,6 +107,8 @@ describe('<CopyStateLinkButton />', () => {
'width: 50%',
]);

cy.get('button').contains(/Accept/i).should('be.visible').click()

cy.contains(/COPY LINK TO/i)
.should('be.visible')
.focus()
Expand Down
4 changes: 2 additions & 2 deletions src/components/MapGuide/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const StyledMapGuideContext: React.FC = () => {
return (
<>
<StyledTooltipTitle>
Welcome to the Global.health monkeypox map!
Welcome to the Global.health Mpox map!
</StyledTooltipTitle>
<Typography
sx={{
marginBottom: '2rem',
}}
>
These geospatial data visualisations allow you to explore data
produced by the World Health Organization for the 2022 Monkeypox
produced by the World Health Organization for the 2022 Mpox
outbreak. You can read about our data transition and completing
a 100 days mission on the{' '}
<Link
Expand Down
2 changes: 1 addition & 1 deletion src/components/TopBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const TopBar = () => {
target="_blank"
>
<Typography variant="navbarlink" gutterBottom>
Monkeypox Dataset
Mpox Dataset
</Typography>
</a>

Expand Down

0 comments on commit 9a4b8bc

Please sign in to comment.