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

Feature/solved issues #153

Merged
merged 85 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
8dc53be
refactor loadResponses
Mar 25, 2020
19b8605
add tab bar, show solved issues
Mar 25, 2020
b9fd9c3
add more dashboard translations
Mar 25, 2020
59f17cd
refactor component, add heroFound button
Mar 25, 2020
6618dc4
add react-web-tabs
Mar 25, 2020
660afa2
add tertiary
Mar 25, 2020
7f4d56e
import react-web-tabs.css
Mar 25, 2020
4cb8452
add classes to overwrite default tab bar
Mar 25, 2020
7667da7
refactor deletion and solved handling, rework responses button, layou…
Mar 25, 2020
da910bb
remove showResponses, add message
Mar 25, 2020
d97f116
add reactjs-popup
Mar 27, 2020
97c8055
add min-w-90
Mar 27, 2020
96dff67
add popup translation keys
Mar 27, 2020
1b1b5d2
add popup helper
Mar 27, 2020
cc5f77f
add HintsPopup component
Mar 27, 2020
8fbcf07
Merge branch 'develop' into feature/solved-issues
Mar 27, 2020
b2a35cf
fix handleSolved
Mar 27, 2020
bcf81de
Merge branch 'master' of github.com:kenodressel/quarantine-hero into …
Mar 27, 2020
6c823d9
move loadResponses to /services
Mar 28, 2020
045de92
add showAsSolved
Mar 28, 2020
0dc3635
fix collectionName
Mar 28, 2020
d024911
remove invalid property
Mar 28, 2020
1b32e5e
consistent naming
Mar 28, 2020
a51c51c
only fetch responses on click
Mar 28, 2020
890f176
use useCollectionDataOnce for data fetching
Mar 28, 2020
cfec9ba
add translations for poup content
Mar 28, 2020
c7b7959
update translation keys, remove ternary operator
Mar 28, 2020
3b18e47
fix popup content
Mar 28, 2020
6c8a61a
refactor Popup component
Mar 29, 2020
6508e0d
fix condition
Mar 29, 2020
c8d3ccc
fix style for mobile
Mar 29, 2020
69c9f6f
Merge branch 'master' into feature/solved-issues
Mar 29, 2020
b6fac07
add solveReassure translations
Mar 30, 2020
fed15b4
add attemptingToSolve, styling fixes
Mar 30, 2020
207f298
fix tabs for mobile
Mar 30, 2020
2b3c618
add userIsOnMobile helper
Mar 30, 2020
84c837c
add max-width-5
Mar 30, 2020
83d6464
add PopupContentSolveReassure, refactoring
Mar 30, 2020
553aa79
fix margin-top
Mar 30, 2020
7248137
fix icon margin-left
Mar 30, 2020
f6c5680
use QuestionMarkSvg
Mar 30, 2020
330dcc4
Merge branch 'master' into feature/solved-issues
Mar 31, 2020
a7c2418
add initial dashboard spec
Mar 31, 2020
7e95af0
refactor loginVerifiedUser
Mar 31, 2020
b275611
add cypress tags
Mar 31, 2020
9e6566f
Merge branch 'feature/solved-issues' of github.com:kenodressel/quaran…
Mar 31, 2020
0e0335f
update yarn.lock
Mar 31, 2020
776aaec
Merge branch 'master' of github.com:kenodressel/quarantine-hero into …
Apr 1, 2020
00574cb
add data-cy attributes
Apr 2, 2020
790f7f4
add testing utilities
Apr 3, 2020
2de742d
reset attemptingToDelete on popup close
Apr 3, 2020
5eabb53
add first version of e2e tests
Apr 3, 2020
cbe903b
change questionmark height
Apr 3, 2020
d228d75
fix test cases
Apr 4, 2020
faa35a5
adapt timeouts
Apr 4, 2020
488c371
fix test timeouts
Apr 4, 2020
56a3a76
fix padding, add whitespace-pre-line
Apr 4, 2020
747ed73
add linebreaks
Apr 4, 2020
6e153cd
fix tabs font-size for mobile
Apr 4, 2020
01f0cde
Merge branch 'master' of github.com:kenodressel/quarantine-hero into …
Apr 4, 2020
4394b3d
remove conosle.log
Apr 4, 2020
945634d
add xs breakpoint (iPhone 5/SE)
Apr 7, 2020
07652b0
replace commonButtonClasses with composing utility btn-common
Apr 7, 2020
f7d258f
fix buttons for mobile
Apr 7, 2020
2ac9ac9
skip dashboard tests
Apr 7, 2020
ff1f991
Merge branch 'master' of github.com:kenodressel/quarantine-hero into …
Apr 7, 2020
30591e3
remove unused import
Apr 7, 2020
b184b01
add missing dependency for useEffect
Apr 7, 2020
93320aa
Merge branch 'feature/solved-issues' of github.com:kenodressel/quaran…
Apr 7, 2020
2317b77
Some minor design changes
florianschmidt1994 Apr 8, 2020
7063377
remove react-with-firebase-auth
Apr 11, 2020
5a81650
change to "Helfenden"
Apr 11, 2020
f5435ff
introduce "solved" state, import Svgs as ReactComponent
Apr 11, 2020
71200cc
Merge branch 'master' into feature/solved-issues
Apr 14, 2020
7a97012
update xsMax css class
Apr 14, 2020
4508219
remove xsMax, change xs to 321px
Apr 17, 2020
0dfd191
Merge branch 'master' into feature/solved-issues
Apr 21, 2020
88c6868
adapt pronouns to polite speech
Apr 21, 2020
4131610
fix linter
Apr 21, 2020
c1ead59
refactor parseDoc
Apr 21, 2020
8783be5
more polite speech fixes
Apr 21, 2020
53eb627
fix className
Apr 21, 2020
c6b5171
fix showAsSolved
Apr 21, 2020
c2109da
fix responses text style
Apr 21, 2020
e5ccce7
Fixed styling
mauriceackel Apr 21, 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
346 changes: 346 additions & 0 deletions cypress/integration/dashboard.spec.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions cypress/util/createAskForHelpPosting.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function createAskForHelpPosting(postalCode, description) {
cy.visit('localhost:3000/#/ask-for-help');
cy.get('[data-cy=location-search-input]').type(`${postalCode}{enter}`);
cy.get('[data-cy=autocomplete-suggestion]').first().click();
cy.get('[data-cy=ask-for-help-text-input]').type(description);
cy.get('[data-cy=ask-for-help-submit]').click();
cy.get('[data-cy=success-link-to-dashboard]').click();
}
14 changes: 14 additions & 0 deletions cypress/util/createResponseForPosting.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default function createResponseForPosting(responseText, email) {
cy.visit('localhost:3000/#/dashboard');
cy.wait(1000); // wait for data to load
cy.get('[data-cy=ask-for-help-entry]').invoke('attr', 'data-id').as('askForHelpId');
cy.get('@askForHelpId')
.then((askForHelpId) => {
cy.visit(`localhost:3000/#/offer-help/${askForHelpId}`);
cy.get('[data-cy=offer-help-text-input]').type(`${responseText}{enter}`);
cy.get('[data-cy=mail-input]').type(`${email}`);
cy.get('[data-cy=offer-help-submit]').click();
cy.get('[data-cy=success-offer-link]').click();
});
cy.wait(1000); // wait for data be updated
}
20 changes: 20 additions & 0 deletions cypress/util/loginVerifiedUser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default function loginVerifiedUser(email, password) {
cy.visit('localhost:3000');

// TODO: This yells ANTI-PATTERN. We should find a way to fix this
cy.wait(3000);
cy.get('body').then(($body) => {
if ($body.find('[data-cy=btn-sign-out]').length > 0) {
cy.get('[data-cy=btn-sign-out]').click();
}
});

cy.visit('localhost:3000/#/signin');
cy.get('form input[type="email"]').type(`${email}{enter}`);
cy.get('form input[type="password"]').type(`${password}{enter}`);

// TODO: Why do we redirect to ask-for-help here!
cy.hash().should('equal', '#/ask-for-help');

cy.visit('localhost:3000');
}
63 changes: 63 additions & 0 deletions cypress/util/removeExistingAskForHelpEntries.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
export function removeAskForHelpEntryWithoutResponses() {
cy.get('[data-cy=ask-for-help-entry]').should('be.visible');
cy.get('[data-cy=btn-entry-solve]').should('not.be.visible');
cy.get('[data-cy=btn-entry-delete]').should('be.visible');
cy.get('[data-cy=btn-entry-delete]').first().click();

// engage with popup content
cy.get('.popup-content').should('be.visible');
cy.get('[data-cy=btn-popup-cancel-positive]').should('be.visible');
cy.get('[data-cy=btn-popup-delete-terminally]').should('be.visible');
cy.get('[data-cy=btn-popup-delete-terminally]').click();

// click "ZURÜCK ZUR ÜBERSICHT" in the following popup
cy.get('[data-cy=btn-popup-ask-for-help]').should('be.visible');
cy.get('[data-cy=btn-popup-back-to-overview]').should('be.visible');
cy.get('[data-cy=btn-popup-back-to-overview]').click();
cy.wait(1000); // wait for deletion
cy.get('.popup-content').should('not.be.visible');
}

export function removeAskForHelpEntryWithResponses() {
cy.get('[data-cy=ask-for-help-entry-with-responses]').should('be.visible');
cy.get('[data-cy=btn-entry-solve]').should('be.visible');
cy.get('[data-cy=btn-entry-delete]').should('be.visible');
cy.get('[data-cy=btn-entry-delete]').first().click();

// engage with popup content
cy.get('.popup-content').should('be.visible');
cy.get('[data-cy=btn-popup-hero-found]').should('be.visible');
cy.get('[data-cy=btn-popup-delete-anyway]').should('be.visible');
cy.get('[data-cy=btn-popup-delete-anyway]').click();

// click "ZURÜCK ZUR ÜBERSICHT" in the following popup
cy.get('[data-cy=btn-popup-ask-for-help]').should('be.visible');
cy.get('[data-cy=btn-popup-back-to-overview]').should('be.visible');
cy.get('[data-cy=btn-popup-back-to-overview]').click();
cy.wait(1000); // wait for deletion
cy.get('.popup-content').should('not.be.visible');
}

export function removeSolvedAskForHelpEntry() {
cy.get('[data-cy=tabs-solved]').click();
cy.get('[data-cy=tabs-solved-content]').should('be.visible');

// get entry
cy.get('[data-cy=ask-for-help-entry-with-responses]').should('be.visible');
cy.get('[data-cy=btn-entry-solve]').should('be.visible');
cy.get('[data-cy=btn-entry-delete]').should('be.visible');
cy.get('[data-cy=btn-entry-delete]').first().click();
// engage popup content
cy.get('[data-cy=btn-popup-cancel-positive]').should('be.visible');
cy.get('[data-cy=btn-popup-delete-terminally]').should('be.visible');
cy.get('[data-cy=btn-popup-delete-terminally]').click({ force: true });
cy.wait(500); // wait for popup

// click "ZURÜCK ZUR ÜBERSICHT" in the following popup
cy.get('[data-cy=btn-popup-ask-for-help]').should('be.visible');
cy.get('[data-cy=btn-popup-back-to-overview]').should('be.visible');
cy.get('[data-cy=btn-popup-back-to-overview]').click();
cy.wait(1000); // wait for deletion
cy.get('.popup-content').should('not.be.visible');
cy.wait(2000);
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"react-scroll-up-button": "^1.6.4",
"react-share": "^4.1.0",
"react-slider": "^1.0.3",
"react-web-tabs": "^1.0.1",
florianschmidt1994 marked this conversation as resolved.
Show resolved Hide resolved
"react-with-firebase-auth": "^1.3.0",
mauriceackel marked this conversation as resolved.
Show resolved Hide resolved
"reactjs-popup": "^1.5.0",
"tailwindcss": "^1.2.0",
"supercluster": "^7.0.0",
"use-supercluster": "^0.2.6"
Expand Down
41 changes: 35 additions & 6 deletions public/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,16 @@
"needsHelp": "Hilfe benötigt",
"yourRequests": "Deine Hilfegesuche",
"noRequests": "Du hast noch keine Hilfegesuche eingestellt. Du kannst ein neues Gesuch",
"noResolvedRequests": "Du hast noch keine Held*innen für deine Gesuche gefunden. Du kannst ein neues Gesuch",
"create": "erstellen",
"yourNotifications": "Deine Benachrichtigungen",
"noNotificationsSubscribed": "Du hast noch keine Benachrichtigungen aktiviert. Du kannst neue Benachrichtigungen",
"here": "hier",
"register": "registrieren"
"register": "registrieren",
"tabs": {
"open": "OFFEN",
"solved": "ABGESCHLOSSEN"
}
},
"privacy": {
"title": "Datenschutzerklärung"
Expand Down Expand Up @@ -262,12 +267,36 @@
"somebodyAt": "Jemand in",
"needsHelp": "braucht Hilfe!",
"before": "vor",
"showResponses": "Antwort ansehen",
"showResponses_plural": "{{count}} Antworten ansehen",
"hideResponses": "Antwort verbergen",
"hideResponses_plural": "{{count}} Antworten verbergen",
"message": "{{count}} Nachricht",
"message_plural": "{{count}} Nachrichten",
"deleteRequestForHelp": "Löschen",
"registrationReason": "den Beitrag zu melden"
"registrationReason": "den Beitrag zu melden",
"heroFound": "Held*in gefunden",
"popup": {
"heroFound": "Ich habe eine*n Held*in gefunden",
"deleteAnyway": "Trotzdem löschen",
"backToOverview": "Zurück zur Übersicht",
"reassureDeletion": "Diese Anfrage wirklich löschen?",
"cancel": "Abbrechen",
"deleteTerminally": "Endgültig löschen",
"createNewRequest": "Neue Anfrage Erstellen",
"solveReassure": {
"heading": "War dein Hilfegesuch erfolgreich?",
"firstSentence": "Lass die Community wissen dass deine Suche erfolgreich war.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check with the team on which capitalization for "Dein" and similar.

"secondSentence": "Die Anfrage wird in das '$t(views.dashboard.tabs.solved)' Tab bewegt \nund du bekommst keine weiteren Nachrichten von Helfern mehr."
mauriceackel marked this conversation as resolved.
Show resolved Hide resolved
},
"wasYourRequestSuccessful": {
"heading": "War dein Hilfegesuch erfolgreich?",
"firstSentence": "Lass die Community wissen ob deine Suche erfolgreich war.",
"secondSentence": "Anstatt dein Hilfegesuch zu löschen markieren wir es als abgeschlossen.",
"thirdSentence": "Du kannst es natürlich jederzeit trotzdem löschen."
},
"yourRequestWasDeleted": {
"heading": "Dein Hilfegesuch wurde gelöscht!",
"firstSentence": "Bitte beachte, dass es einen Moment dauern kann, bis der Eintrag gelöscht wird.",
"secondSentence": "Du kannst natürlich jederzeit eine neue Anfrage erstellen \nund eine*n Held*in um Hilfe bitten."
}
}
},
"filteredList": {
"list": "LISTE",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/questionmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/components/LocationInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function Autocomplete(props) {
<input
ref={inputRef}
className="location-search-input appearance-none input-focus truncate"
data-cy="location-search-input"
style={{ paddingRight: '45px' }}
defaultValue={defaultValue}
onChange={(e) => {
Expand All @@ -180,6 +181,7 @@ function Autocomplete(props) {
{suggestions.map((s) => (
<AutocompleteSuggestion
key={s.description}
data-cy="autocomplete-suggestion"
suggestion={s}
onClick={() => handleSelect(s)}
/>
Expand Down
1 change: 1 addition & 0 deletions src/components/MailInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default function MailInput(props) {
return (
<input
className={className}
data-cy="mail-input"
type="email"
placeholder={placeholder}
onChange={(e) => {
Expand Down
Loading