-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #810 from Amsterdam/release/v1.11.0
Release/v1.11.0
- Loading branch information
Showing
203 changed files
with
12,754 additions
and
7,750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"signalId": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'); | ||
|
@@ -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', () => { | ||
|
@@ -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'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.