# Database week 💽 --- ## User Experience It was a challenge to fit in the UX design, as this is the last step once everything is functional :runner: Also if we had more time, we would have added the FAC cohort numbers :face_palm: a button to link back to the home page and reorganise the fact cards with flex so they were all visible, especially mobile responsive :iphone: --- Implementing the design and features for different routes was very enjoyable once the server was listening :ear: it was time add some style :sunglasses: We originally tried using DOM manipulation for showing and hiding elements :face_with_hand_over_mouth: But after getting the CSS files linked to the correct route path it all came together with a cool flip animation :juggling: --- ## Facilitator ### How tasks were divided + We looked at the user stories and broke them down into the project boards and converted some of them into issues then we assigned those issues to each other. + We planned on setting up the initial files then connecting to the database as a team. --- + After we wanted to retrieve data from the database to display it on our page, we first added some tables with some info first to see if it works. + Then allowing the users to enter information that can be saved in our database to retrieve afterwards. + After the basic functionality we added styles. --- ## Communication + I asked what each of the members wanted to work on in the begining + This role was also shared across the other members so everyone got a part of setting tasks depending on the situation --- + We checked op on our progress by coming joining back into a four from a pair + When the tasks for each of the pairs were linked we would swap pairs again to share knowledge to inform them how to continue in that task --- ## QA 😌 ![](https://i.imgur.com/dZTHzwf.png) + Wrote and passed 6 cypress tests ✅ --- ## QA positives 😁 + We started with a TDD approach which helped us write our issues and divide our tasks + We used beforeEach() to reset our database between each test run. + Our test caught the race condition issue that Oli spotted, we were initally redirecting straight away to the display facts page and had to refresh the page for the data to be displayed. This is good because it alerted us that something wasn't quite right. --- ## QA challenges 😰 + When we got stuck the TDD approach took a back seat while we tried to achieve basic functionality. + We did not run our cypress tests on the deployed live version, so although our tests passed locally our app did not work on the live site + Cy.contains() made some of the tests brittle as small changes e.g. Capitalisation in text resulted in test failure. --- #### DevOps :sparkles: - File structure Installed express/nodemon/cypress dependencies. Write and run script as in package.JSON Issue with .env file and add ``` -r dotenv/config server.js ``` - Modularisation How to modularise. Not to modularise too early. --- #### Issues getting input information to the database * Using the create_db/repopulate_db scripts. * Each person needing their own local copy. * Modularisation made this difficult. Learning: console.log! --- #### Code ![](https://i.imgur.com/Yo4Z1O3.png) --- #### (Missing catch..) ![](https://i.imgur.com/XOtJMAj.png) --- #### SQL ![](https://i.imgur.com/I0DW5HQ.png) --- #### Deployment to Heroku * Added inside the pool object and added env variable to config vars settings on heroku. ``` ssl: { rejectUnauthorized: false } ``` --- * Our error ![](https://i.imgur.com/Rd49iK9.png) --- #### More time... * Deploy to heroku. * Or do we?????? 🤔 * https://whosaidthat4.herokuapp.com/ --- #### Team learning * Not having enough time to review progress and catch up. * Taking the time to read the docs and google errors is worth the time, trying to reverse engineer/modify workshop code can be counter productive to starting from scratch * When running into errors or walls :person_climbing: research solutions together but all on our separate computers for time management :timer_clock: ---
{"metaMigratedAt":"2023-06-16T18:23:04.474Z","metaMigratedFrom":"Content","title":"Database week 💽","breaks":true,"contributors":"[{\"id\":\"ae3532b1-4610-4f25-89ec-b00c8da7a54b\",\"add\":1214,\"del\":336},{\"id\":\"5fc58879-82a7-42a5-adb7-d717c9b3063b\",\"add\":1240,\"del\":112},{\"id\":\"473a32e9-12bd-45da-a3d3-4ac6fad9042c\",\"add\":1508,\"del\":387},{\"id\":\"6efe631b-dc1b-41c9-af3f-fd298e6c280c\",\"add\":1078,\"del\":33}]"}
    255 views