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/v1.11.0 #810

Merged
merged 177 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
a0348a4
[SIG-2394] Category history request
janjaap Mar 25, 2020
b407144
Fixes category detail tests
janjaap Mar 25, 2020
4ddea69
added types, made it a bit more modular
jpoppe Apr 4, 2020
cad3506
draft commit
jpoppe Apr 6, 2020
1dab3a8
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 6, 2020
a932bfb
fixed typo
jpoppe Apr 6, 2020
0e23980
Run npm audit fix multiple times
boris-arkenaar Apr 14, 2020
3996908
Run npm update
boris-arkenaar Apr 14, 2020
3778f9d
Remove and re-add leaflet-headless
boris-arkenaar Apr 14, 2020
c1a95b6
Run npm remove build
boris-arkenaar Apr 14, 2020
99537fb
Merge branch 'develop' into feature/1-update-npm-dependencies
boris-arkenaar Apr 14, 2020
ccd1ed8
Merge branch 'develop' into feature/1-update-npm-dependencies
boris-arkenaar Apr 14, 2020
958391d
Merge remote-tracking branch 'origin/develop' into SIG-2394_category-…
janjaap Apr 15, 2020
07d60e3
Adds test
janjaap Apr 15, 2020
934bd4d
Unifies mock once
janjaap Apr 15, 2020
d800e37
zooms back to the incident when navigating from summary
aditudorache Apr 14, 2020
03e4022
uses reference for selections in MapSelect component
aditudorache Apr 15, 2020
3fe9889
(Chore) Exception message assignment
janjaap Apr 15, 2020
c04c5c1
fixes unittests
aditudorache Apr 15, 2020
9a2acc3
[SIG-2540] Remove marker on input clear
janjaap Apr 15, 2020
a51f663
[SIG-2549] Remove translations
janjaap Apr 15, 2020
451bf79
Removes newlines from fixture
janjaap Apr 15, 2020
5852741
removes unneeded existance tests and improves code coverage
aditudorache Apr 15, 2020
80a36d7
Removes only
janjaap Apr 15, 2020
f7cf317
Merge pull request #776 from Amsterdam/SIG-2540_remove-marker-on-inpu…
janjaap Apr 15, 2020
3d750cd
Merge remote-tracking branch 'origin/develop' into sync/v1.10.4
janjaap Apr 15, 2020
d6d527d
improves coverage in MapInput
aditudorache Apr 16, 2020
251eafe
removes the explicit font-family from the ovl legend
aditudorache Apr 16, 2020
172301c
adds relative positioning around the MapSelect control
aditudorache Apr 16, 2020
f7dd312
Merge pull request #778 from Amsterdam/sync/v1.10.4
aditudorache Apr 16, 2020
b06f855
Merge branch 'develop' into chore-exception-message-assignment
janjaap Apr 16, 2020
37960f9
Merge branch 'develop' into SIG-2538-OVL-style
aditudorache Apr 16, 2020
fdd8447
Merge branch 'develop' into SIG-2549_remove-translations
janjaap Apr 16, 2020
b43ae8e
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 16, 2020
c536c2e
[SIG-2539] Static map component
janjaap Apr 16, 2020
b0302b0
Merge branch 'develop' into SIG-2394_category-history-request
aditudorache Apr 16, 2020
703128f
Assets error message
janjaap Apr 16, 2020
062a08c
Removes commented line
janjaap Apr 16, 2020
dcac2d3
Adds error message assertions
janjaap Apr 16, 2020
8dd9150
Merge pull request #779 from Amsterdam/SIG-2538-OVL-style
aditudorache Apr 16, 2020
5979937
Merge branch 'develop' into chore-exception-message-assignment
janjaap Apr 16, 2020
595659b
Merge branch 'develop' into SIG-2549_remove-translations
aditudorache Apr 16, 2020
51ce461
Merge pull request #775 from Amsterdam/chore-exception-message-assign…
janjaap Apr 16, 2020
fc2aba0
Merge branch 'develop' into SIG-2549_remove-translations
janjaap Apr 16, 2020
00b40ba
Merge branch 'develop' into SIG-2539_static-map-component
janjaap Apr 16, 2020
c98ec5f
fix selection of all checkboxes whene onToggle prop is unset
jpoppe Apr 16, 2020
63bc994
Merge remote-tracking branch 'origin/develop' into SIG-2539_static-ma…
janjaap Apr 16, 2020
06aac5e
Merge remote-tracking branch 'origin/develop' into SIG-2539_static-ma…
janjaap Apr 16, 2020
cbe0805
Merge branch 'develop' into SIG-2557-checkboxes-select-all-fix
jpoppe Apr 16, 2020
8b1f8ab
[SIG-2539] Static map replacements
janjaap Apr 16, 2020
969c244
Merge pull request #777 from Amsterdam/SIG-2549_remove-translations
janjaap Apr 16, 2020
d2cedac
Merge branch 'develop' into SIG-2539_static-map-component
janjaap Apr 16, 2020
fe3e86d
Merge pull request #780 from Amsterdam/SIG-2539_static-map-component
janjaap Apr 16, 2020
fb3af34
Merge remote-tracking branch 'origin/develop' into SIG-2539_static-ma…
janjaap Apr 16, 2020
af948c8
fixes centering the map on click
aditudorache Apr 17, 2020
6e0e3a2
Merge branch 'develop' into SIG-2560-center-map-on-click
aditudorache Apr 17, 2020
74e7ad3
Merge pull request #783 from Amsterdam/SIG-2560-center-map-on-click
aditudorache Apr 17, 2020
f122844
Merge branch 'develop' into SIG-2557-checkboxes-select-all-fix
jpoppe Apr 17, 2020
727f156
fixes infinite loop of the state.
aditudorache Apr 17, 2020
4171edb
Merge branch 'develop' into SIG-2560-center-map-on-click
aditudorache Apr 17, 2020
f08f721
Merge pull request #784 from Amsterdam/SIG-2560-center-map-on-click
jpoppe Apr 17, 2020
c57b5bc
added tests for onChange and onToggle events
jpoppe Apr 18, 2020
390d2a2
Merge branch 'develop' into SIG-2557-checkboxes-select-all-fix
jpoppe Apr 18, 2020
0b9028f
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 18, 2020
9ec0a01
Merge remote-tracking branch 'origin/SIG-2557-checkboxes-select-all-f…
jpoppe Apr 18, 2020
5e42d48
changed properties to alphabetical order
jpoppe Apr 18, 2020
7cc1c63
Merge branch 'develop' into SIG-2394_category-history-request
janjaap Apr 20, 2020
d88d131
Merge remote-tracking branch 'origin/develop' into SIG-2539_static-ma…
janjaap Apr 20, 2020
cfd258d
Sets image and column widths
janjaap Apr 20, 2020
c0f9b8a
uses the Avenir Next font in the MapSelect controls
aditudorache Apr 20, 2020
b5a165f
fixes styling in 24 hour map
aditudorache Apr 16, 2020
aa85bc6
removes the text decoration in the incident link so it resprects the …
aditudorache Apr 20, 2020
5e113ae
Adds global createObjectUrl
janjaap Apr 20, 2020
2f3e5e2
Fixes tests
janjaap Apr 20, 2020
f7ac1a6
Merge pull request #770 from Amsterdam/SIG-2394_category-history-request
janjaap Apr 20, 2020
b900486
Adds useMemo hooks
janjaap Apr 20, 2020
c4263ac
Applies useMemo hooks to internal object vars
janjaap Apr 20, 2020
9d45684
Merge branch 'develop' into SIG-2539_static-map-replacements
janjaap Apr 20, 2020
016dacb
moves the font-family to the map component level
aditudorache Apr 20, 2020
ea901a9
Merge branch 'develop' into SIG-2538-OVL-style
aditudorache Apr 20, 2020
16c1da7
Merge remote-tracking branch 'origin/develop' into chore-npm-update-a…
janjaap Apr 20, 2020
c188426
Updates style-loader
janjaap Apr 20, 2020
ca6b32a
the detail panel uses a standard link now
aditudorache Apr 20, 2020
7abb67a
Merge branch 'develop' into SIG-2541-24hour-map
aditudorache Apr 20, 2020
c3d8ab4
Merge pull request #785 from Amsterdam/SIG-2538-OVL-style
aditudorache Apr 20, 2020
c40b9e2
Merge branch 'develop' into chore-npm-update-audit
aditudorache Apr 20, 2020
390f217
Merge pull request #787 from Amsterdam/chore-npm-update-audit
janjaap Apr 20, 2020
5d5059d
Merge branch 'develop' into SIG-2541-24hour-map
aditudorache Apr 20, 2020
85de9f9
Merge branch 'develop' into SIG-2539_static-map-replacements
janjaap Apr 20, 2020
ef4f7a3
Merge branch 'develop' into SIG-2557-checkboxes-select-all-fix
jpoppe Apr 20, 2020
3f41b94
Merge pull request #782 from Amsterdam/SIG-2539_static-map-replacements
janjaap Apr 20, 2020
3409a3e
Merge branch 'develop' into SIG-2557-checkboxes-select-all-fix
jpoppe Apr 20, 2020
938ebf9
Merge branch 'develop' into SIG-2541-24hour-map
aditudorache Apr 20, 2020
7ad921b
Merge pull request #781 from Amsterdam/SIG-2557-checkboxes-select-all…
jpoppe Apr 20, 2020
9273b56
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 20, 2020
7bf4633
Merge branch 'develop' into SIG-2541-24hour-map
aditudorache Apr 20, 2020
32799e9
moves the search string to the global state
aditudorache Apr 20, 2020
ce298a6
moves setSearchQuery and resetSearchQuery to the containers/App
aditudorache Apr 20, 2020
5b8ec90
Merge pull request #786 from Amsterdam/SIG-2541-24hour-map
aditudorache Apr 20, 2020
75d442a
Merge branch 'develop' into SIG-2562-search-incident-from-incident-form
aditudorache Apr 20, 2020
df3f174
fixes the naming conventions
aditudorache Apr 20, 2020
24ef3b4
[SIG-2251] Type filter
janjaap Apr 20, 2020
5ae2e80
fixes unittests
aditudorache Apr 20, 2020
25d00fe
Removes datalist entries from incident management reducer
janjaap Apr 20, 2020
f762969
Merge branch 'SIG-2562-search-incident-from-incident-form' of github.…
aditudorache Apr 20, 2020
0fdd60c
Merge remote-tracking branch 'origin/develop' into SIG-2251_type-filter
janjaap Apr 20, 2020
bf13fcf
changes the default zoom level in the 24 hour map
aditudorache Apr 20, 2020
699059b
Merge branch 'develop' into SIG-2550-default-zoom-24-hour-map
aditudorache Apr 20, 2020
6f7cf0e
Merge pull request #791 from Amsterdam/SIG-2550-default-zoom-24-hour-map
aditudorache Apr 21, 2020
8de94e2
Merge branch 'develop' into SIG-2562-search-incident-from-incident-form
aditudorache Apr 21, 2020
c7cc085
[SIG-2575] Checkboxlist state bug
janjaap Apr 21, 2020
7a73a4e
Merge branch 'develop' into SIG-2251_type-filter
janjaap Apr 21, 2020
8ae8842
Merge pull request #790 from Amsterdam/SIG-2251_type-filter
janjaap Apr 21, 2020
e78fc8f
Merge remote-tracking branch 'origin/develop' into SIG-2575_checkboxl…
janjaap Apr 21, 2020
1a87ef1
Merge pull request #792 from Amsterdam/SIG-2575_checkboxlist-state-bug
jpoppe Apr 21, 2020
8cc2a81
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 21, 2020
e2e111f
Merge branch 'develop' of github.com:Amsterdam/signals-frontend into …
aditudorache Apr 21, 2020
16adf1f
Merge branch 'SIG-2562-search-incident-from-incident-form' of github.…
aditudorache Apr 21, 2020
315f3f2
Merge pull request #789 from Amsterdam/SIG-2562-search-incident-from-…
aditudorache Apr 21, 2020
1521e2a
fixes the Avenir Next regular font name
aditudorache Apr 21, 2020
c644f9d
* Tests for 24 hour overview map
Apr 21, 2020
7bf72d1
updated user.json to be more consistent with the curren backend data
jpoppe Apr 21, 2020
ce7917d
use user.json instead of userNew.json
jpoppe Apr 21, 2020
fd35376
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 21, 2020
d7f946c
[SIG-2540] Map improvements
janjaap Apr 21, 2020
a4954c1
Reverts unrelated changes
janjaap Apr 21, 2020
3c70948
Adds action test
janjaap Apr 22, 2020
22c321c
(Chore) Remove redirect
janjaap Apr 22, 2020
9614901
adds outline instead of border to the detail panel
aditudorache Apr 22, 2020
3a745cb
Merge pull request #794 from Amsterdam/SIG-2538-OVL-style-fix
aditudorache Apr 22, 2020
82275c3
(Chore) Fix checkboxlist state update warning
janjaap Apr 22, 2020
2d7dafe
Merge branch 'develop' into chore-fix-checkboxlist-state-update-warning
janjaap Apr 22, 2020
70cda62
Removes line from test
janjaap Apr 22, 2020
fa2e8b1
Merge remote-tracking branch 'origin/develop' into SIG-2540_map-impro…
janjaap Apr 22, 2020
842445c
Merge branch 'develop' into SIG-2541-24hour-map-outline
aditudorache Apr 22, 2020
6431bc3
Merge pull request #798 from Amsterdam/SIG-2541-24hour-map-outline
aditudorache Apr 22, 2020
a04cc10
updated user and roles fixtures, fixed most tests
jpoppe Apr 22, 2020
c44335f
Merge branch 'develop' into SIG-2540_map-improvements
janjaap Apr 22, 2020
43b5a26
Merge pull request #796 from Amsterdam/SIG-2540_map-improvements
janjaap Apr 22, 2020
b437013
Merge branch 'develop' into chore-remove-redirect
janjaap Apr 22, 2020
61e129c
Merge branch 'develop' into SIG-2491-cypress-tests
arjandata Apr 22, 2020
584cfbf
Merge pull request #797 from Amsterdam/chore-remove-redirect
janjaap Apr 23, 2020
8317d50
Merge branch 'develop' into chore-fix-checkboxlist-state-update-warning
janjaap Apr 23, 2020
0cfa1eb
Merge pull request #799 from Amsterdam/chore-fix-checkboxlist-state-u…
janjaap Apr 23, 2020
8444d91
Merge remote-tracking branch 'origin/develop' into SIG-2491-cypress-t…
Apr 23, 2020
b9d9c2b
Merge branch 'SIG-2491-cypress-tests' of github.com:Amsterdam/signals…
Apr 23, 2020
30df212
Merge branch 'develop' into SIG-2491-cypress-tests
arjandata Apr 23, 2020
e4df193
Merge branch 'SIG-2491-cypress-tests' of github.com:Amsterdam/signals…
Apr 23, 2020
070a8ac
[SIG-2591] Page sections
janjaap Apr 23, 2020
e5e2231
Changes after review
Apr 23, 2020
d65e4ba
data-testid changed for map
Apr 23, 2020
cc627a4
Fixes tests and adjusts styling
janjaap Apr 23, 2020
a685dab
Removes specific assertion
janjaap Apr 23, 2020
dc20978
Removes assertions
janjaap Apr 23, 2020
a6c775c
[SIG-2589] IncidentPreview components cleanup
janjaap Apr 23, 2020
f40cd80
Merge remote-tracking branch 'origin/SIG-2591_page-sections' into SIG…
janjaap Apr 23, 2020
20d0108
[SIG-2589] Component cleanup
janjaap Apr 23, 2020
ac27f35
Set video on false and added some waits
Apr 23, 2020
d4c781a
Update Cypress version to 4.4.1
Apr 23, 2020
0b02d35
Merge pull request #800 from Amsterdam/SIG-2591_page-sections
janjaap Apr 23, 2020
86a2c26
Merge remote-tracking branch 'origin/SIG-1421_samenvatting-styling' i…
janjaap Apr 23, 2020
fb3c832
Merge remote-tracking branch 'origin/SIG-1421_samenvatting-styling' i…
janjaap Apr 23, 2020
5dd3404
Merge pull request #795 from Amsterdam/SIG-2491-cypress-tests
arjandata Apr 23, 2020
629e24b
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 23, 2020
2225462
cleaned up fixtures, all tests are passing
jpoppe Apr 24, 2020
2dc654d
Merge pull request #801 from Amsterdam/SIG-2589_incident-preview-comp…
janjaap Apr 28, 2020
e079d8c
Merge pull request #802 from Amsterdam/SIG-2589_component-cleanup
janjaap Apr 28, 2020
b57bdb7
Merge branch 'develop' into SIG-1421_samenvatting-styling
janjaap Apr 28, 2020
1518306
added missing label
jpoppe Apr 28, 2020
71e0952
removes useless async
jpoppe Apr 28, 2020
82a9423
Merge pull request #805 from Amsterdam/SIG-1421_samenvatting-styling
janjaap Apr 28, 2020
d26681f
Merge branch 'develop' into SIG-2092-add-checkbox-list-to-user-form-ng
jpoppe Apr 28, 2020
fa74329
Merge pull request #729 from Amsterdam/SIG-2092-add-checkbox-list-to-…
jpoppe Apr 28, 2020
1a0aa03
[SIG-1421] Summary page section header width
janjaap Apr 29, 2020
2bc67bc
Removes media query
janjaap Apr 29, 2020
7f79c16
Fixes test
janjaap Apr 29, 2020
dd082d2
Merge pull request #808 from Amsterdam/SIG-1421_summary-page-section-…
janjaap Apr 29, 2020
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
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ COPY .gitignore \
babel.config.js \
/app/

# Install language packs
RUN npm install --unsafe-perm -g full-icu
ENV NODE_ICU_DATA="/usr/local/lib/node_modules/full-icu"

COPY package.json \
package-lock.json \
/app/
Expand Down
3 changes: 3 additions & 0 deletions cypress.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"signalId": ""
}
8 changes: 4 additions & 4 deletions cypress.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"baseUrl": "http://localhost:3001",
"waitForAnimations": true,
"animationsDistanceTreshold": 20,
"defaultCommandTimeOut": 5000,
"projectId": "b6phb4",
"requestTimeout": 15000,
"reponseTimeout": 15000
}
"responseTimeout": 15000,
"video": false
}
18 changes: 18 additions & 0 deletions cypress/fixtures/creatSignalForMap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"location": {
"geometrie": {"type": "Point", "coordinates": [4.89089949, 52.37316397]},
"address": {
"openbare_ruimte": "Nieuwezijds Voorburgwal",
"huisnummer": "147",
"postcode": "1012RJ",
"woonplaats": "Amsterdam"
},
"stadsdeel": "A"
},
"category": {
"sub_category": "https://acc.api.data.amsterdam.nl/signals/v1/public/terms/categories/overlast-in-de-openbare-ruimte/sub_categories/overig-openbare-ruimte"
},
"reporter": {},
"incident_date_start": "2020-04-16T14:06:31+02:00",
"text": "Er staat een paard in de gang, ja ja een paard in de gang."
}
14 changes: 14 additions & 0 deletions cypress/fixtures/verkeerslicht.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"hoofdrubriek": [
[
"https://acc.api.data.amsterdam.nl/signals/v1/public/terms/categories/wegen-verkeer-straatmeubilair"
],
[0.8839280650199315]
],
"subrubriek": [
[
"https://acc.api.data.amsterdam.nl/signals/v1/public/terms/categories/wegen-verkeer-straatmeubilair/sub_categories/verkeerslicht"
],
[0.7701486592222567]
]
}
76 changes: 67 additions & 9 deletions cypress/integration/createSignalAfval.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import * as createSignal from '../support/commandsCreateSignal';
import { CREATE_SIGNAL } from '../support/selectorsCreateSignal';
import { SIGNAL_DETAILS } from '../support/selectorsSignalDetails';

describe('Create signal afval', () => {
before(() => {
cy.server();
cy.defineGeoSearchRoutes();
cy.getAddressRoute('1035LA 43');
cy.getAddressRoute();

// Open Homepage
cy.visitFetch('incident/beschrijf');
Expand All @@ -23,9 +24,7 @@ describe('Create signal afval', () => {

// Select found item
createSignal.selectAddress('Sandwijk 43, 1035LA Amsterdam');
cy.wait('@lookup')
.wait('@location')
.wait('@geoSearchLocation');
cy.wait('@geoSearchLocation');
});

it('Should enter a description', () => {
Expand Down Expand Up @@ -76,24 +75,83 @@ describe('Create signal afval', () => {
// Check h1
cy.checkHeaderText('Controleer uw gegevens');

// Check if map is visible
cy.get(CREATE_SIGNAL.mapContainer).should('be.visible');
// Check if map and marker are visible
cy.get(CREATE_SIGNAL.mapStaticImage).should('be.visible');
cy.get(CREATE_SIGNAL.mapStaticMarker).should('be.visible');

cy.contains('Sandwijk 43, 1035LA Amsterdam');
cy.contains('Voor mijn deur ligt allemaal afval op de stoep, zouden jullie ervoor kunnen zorgen dat dit wordt opgeruimd?');
// Check mail and phonenumber
cy.contains('06-12345678').should('be.visible');
cy.contains('[email protected]').should('be.visible');

cy.clickButton('Verstuur');
});

it('Should show the last screen', () => {
cy.server();
cy.postSignalRoutePublic();


cy.clickButton('Verstuur');

cy.wait('@postSignalPublic');

// Check URL
cy.url().should('include', '/incident/bedankt');

// Check h1
cy.checkHeaderText('Bedankt!');

// Capture signal id
cy.get('.bedankt').first().then($signalLabel => {
// Get the signal id
const signalNumber = $signalLabel.text().match(/\d+/)[0];
cy.log(signalNumber);
// Set the signal id in variable for later use
Cypress.env('signalId', signalNumber);
});
});
});

// TODO capture signal id
describe('Check data created signal', () => {
before(() => {
localStorage.setItem('accessToken', 'TEST123');
cy.server();
cy.getManageSignalsRoutes();
cy.visitFetch('/manage/incidents/');
cy.wait('@getFilters');
cy.wait('@getCategories');
cy.wait('@getSignals');
cy.wait('@getUserInfo');
cy.log(Cypress.env('signalId'));
});

it('Should show the signal details', () => {
cy.get('[href*="/manage/incident/"]').contains(Cypress.env('signalId')).click();

cy.contains('Voor mijn deur ligt allemaal afval op de stoep, zouden jullie ervoor kunnen zorgen dat dit wordt opgeruimd?');

// Check if map and marker are visible
cy.get(CREATE_SIGNAL.mapStaticImage).should('be.visible');
cy.get(CREATE_SIGNAL.mapStaticMarker).should('be.visible');

cy.get(SIGNAL_DETAILS.stadsdeel).contains('Stadsdeel: ').and('contain', 'Noord').should('be.visible');
cy.get(SIGNAL_DETAILS.addressStreet).contains('Sandwijk').and('contain', '43').should('be.visible');
cy.get(SIGNAL_DETAILS.addressCity).contains('1035LA').and('contain', 'Amsterdam').should('be.visible');
cy.get(SIGNAL_DETAILS.email).contains('[email protected]').should('be.visible');
cy.get(SIGNAL_DETAILS.phoneNumber).contains('06-12345678').should('be.visible');

// Check if status is 'gemeld' with red coloured text
cy.get(SIGNAL_DETAILS.status).contains('Gemeld').should('be.visible').and($labels => {
expect($labels).to.have.css('color', 'rgb(236, 0, 0)');
});

// TODO should have a data-testid
// check urgency
cy.contains('Normaal').should('be.visible');
cy.contains('Veeg- / zwerfvuil').should('be.visible');

cy.get(SIGNAL_DETAILS.mainCategory).contains('Schoon').should('be.visible');
cy.get(SIGNAL_DETAILS.department).contains('STW').should('be.visible');
cy.get(SIGNAL_DETAILS.source).contains('online').should('be.visible');
});
});
25 changes: 14 additions & 11 deletions cypress/integration/createSignalAnimalsWaspFromManage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ describe('Create signal from incident management, animals', () => {
cy.openMenu();
cy.contains('Melden').click();
cy.checkHeaderText('Beschrijf uw melding');

// Use visitfetch to open url, this enables Cypress to intercept fetch protocol
cy.visitFetch('incident/beschrijf');
});

it('Should search for an address', () => {
cy.server();
cy.defineGeoSearchRoutes();
cy.getAddressRoute('1012GX 23');
cy.getAddressRoute();

// Check URL
cy.url().should('include', '/incident/beschrijf');
Expand All @@ -44,9 +47,7 @@ describe('Create signal from incident management, animals', () => {

// Select found item
createSignal.selectAddress('Oudekerksplein 23, 1012GX Amsterdam');
cy.wait('@lookup')
.wait('@location')
.wait('@geoSearchLocation');
cy.wait('@geoSearchLocation');
});

it('Should enter signal details', () => {
Expand Down Expand Up @@ -121,21 +122,23 @@ describe('Create signal from incident management, animals', () => {
// Check h1
cy.checkHeaderText('Controleer uw gegevens');

// Check if map is visible
cy.get(CREATE_SIGNAL.mapContainer).should('be.visible');
// Check if map and marker are visible
cy.get(CREATE_SIGNAL.mapStaticImage).should('be.visible');
cy.get(CREATE_SIGNAL.mapStaticMarker).should('be.visible');

// Check information provided by user
cy.contains('Oudekerksplein 23, 1012GX Amsterdam').should('be.visible');
cy.contains('Er is een wespennest bij de hoofdingang van de Oude kerk');
});

// Check marker on map
cy.get(CREATE_SIGNAL.imageAddressMarker).find("img").should('be.visible');
it('Should show the last screen', () => {
cy.server();
cy.postSignalRoutePrivate();

// Click on next
cy.clickButton('Verstuur');
});

it('Should show the last screen', () => {
cy.wait('@postSignalPrivate');

// Check URL
cy.url().should('include', '/incident/bedankt');

Expand Down
20 changes: 12 additions & 8 deletions cypress/integration/createSignalBotenWater.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Create signal boten',() => {
before(() => {
cy.server();
cy.defineGeoSearchRoutes();
cy.getAddressRoute('1096AC 7');
cy.getAddressRoute();

// Open Homepage
cy.visitFetch('incident/beschrijf');
Expand All @@ -23,9 +23,7 @@ describe('Create signal boten',() => {

// Select found item
createSignal.selectAddress('Korte Ouderkerkerdijk 7, 1096AC Amsterdam');
cy.wait('@lookup')
.wait('@location')
.wait('@geoSearchLocation');
cy.wait('@geoSearchLocation');
});

it('Should enter description and date', () => {
Expand Down Expand Up @@ -92,20 +90,26 @@ describe('Create signal boten',() => {
// Check h1
cy.checkHeaderText('Controleer uw gegevens');

// Check if map is visible
cy.get(CREATE_SIGNAL.mapContainer).should('be.visible');
// Check if map and marker are visible
cy.get(CREATE_SIGNAL.mapStaticImage).should('be.visible');
cy.get(CREATE_SIGNAL.mapStaticMarker).should('be.visible');

// Check information provided by user
cy.contains('Korte Ouderkerkerdijk 7, 1096AC Amsterdam').should('be.visible');
cy.contains('Een grote boot vaart al de hele dag hard door het water.').should('be.visible');
cy.contains('Amsterdam Boat Center').should('be.visible');
cy.contains('Bota Fogo').should('be.visible');
cy.contains('De boot voer richting Ouderkerk aan de Amstel').should('be.visible');

cy.clickButton('Verstuur');
});

it('Should show the last screen', () => {
cy.server();
cy.postSignalRoutePublic();

cy.clickButton('Verstuur');

cy.wait('@postSignalPublic');

// Check URL
cy.url().should('include', '/incident/bedankt');

Expand Down
20 changes: 12 additions & 8 deletions cypress/integration/createSignalContainer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Create signal cointainer',() => {
before(() => {
cy.server();
cy.defineGeoSearchRoutes();
cy.getAddressRoute('1012AB 15');
cy.getAddressRoute();

// Open Homepage
cy.visitFetch('incident/beschrijf');
Expand All @@ -23,9 +23,7 @@ describe('Create signal cointainer',() => {

// Select found item
createSignal.selectAddress('Stationsplein 15, 1012AB Amsterdam');
cy.wait('@lookup')
.wait('@location')
.wait('@geoSearchLocation');
cy.wait('@geoSearchLocation');
});

it('Should enter description and date', () => {
Expand Down Expand Up @@ -87,19 +85,25 @@ describe('Create signal cointainer',() => {
// Check h1
cy.checkHeaderText('Controleer uw gegevens');

// Check if map is visible
cy.get(CREATE_SIGNAL.mapContainer).should('be.visible');
// Check if map and marker are visible
cy.get(CREATE_SIGNAL.mapStaticImage).should('be.visible');
cy.get(CREATE_SIGNAL.mapStaticMarker).should('be.visible');

// Check information provided by user
cy.contains('Stationsplein 15, 1012AB Amsterdam').should('be.visible');
cy.contains('De container voor de deur is kapot, de klep gaat niet open.').should('be.visible');
cy.contains('Een restafval container').should('be.visible');
cy.contains('Nummertje 666').should('be.visible');

cy.clickButton('Verstuur');
});

it('Should show the last screen', () => {
cy.server();
cy.postSignalRoutePublic();

cy.clickButton('Verstuur');

cy.wait('@postSignalPublic');

// Check URL
cy.url().should('include', '/incident/bedankt');

Expand Down
Loading