Code Monkey home page Code Monkey logo

pet-my-dog's Introduction

pet-my-dog's People

Contributors

anetwcs avatar evaxliu avatar konankisa avatar mastevb avatar northatlantickk avatar protonlwx avatar

Watchers

 avatar

pet-my-dog's Issues

The Accept and Decline Buttons for the Meeting Do Not Work

Describe the bug
When the yes or no buttons to accept or decline a meeting are pressed, users are brought to a page that doesn't accurately show the navigation. This is because the buttons are not implemented properly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the find dogs page.
  2. Select a dog.
  3. Click the "Go to Dog" button.
  4. Then click yes or no for the listed request.

Expected behavior
The expected behavior is that the user is redirected to the nav-user page where the correct navigation is displayed for how the user can get to the dog in the shortest and quickest path.

Desktop (please complete the following information):

  • OS: Macbook
  • Browser: Chrome
  • Version 101.0.4951.64 (Official Build) (x86_64)

Additional context
N/A

Testing Fetch Meetup and POST Accept Request Bugs

Describe the bug
image
It looks like it knows where the methods are from
But it says they're not a function…

To Reproduce
Steps to reproduce the behavior:

  1. Run npm test

Expected behavior
I expect the test to be working.

Screenshots
image

Desktop (please complete the following information):
OS: Macbook Monterey 12.3.1 (21E258)

Additional context
I followed the instructions in this link. https://hackernoon.com/a-beginners-guide-to-learn-mock-fetching-in-jest-3u3634d5

import React from 'react';
import '@testing-library/jest-dom'

const meetupReqs = [{mid:"5f1587e7-4eb2-42d3-bf46-df9d0308bcd0",sender:"114777625620322820902",receiver:"104891333151558538036",status:"Pending",senderProfile:{uid:"114777625620322820902",username:"Eva",email:"[email protected]",pic_link:"https://lh3.googleusercontent.com/a/AATXAJy3Od8WvYTytjjsyB_KW-zBpLnGCMWyaXONttAK\u003ds96-c",last_ping:"1000-01-01T00:00"},receiverProfile:{uid:"104891333151558538036",username:"Wenxuan",email:"[email protected]",pic_link:"https://lh3.googleusercontent.com/a/AATXAJxGbGsZ7efsc7Q8Li62gFQEADQK4EYHGV9GnN6D\u003ds96-c",last_ping:"1000-01-01T00:00"}}];
const midMeet = meetupReqs[0].mid;

// global.fetch = jest.fn(() =>
//     Promise.resolve({
//         json: () => Promise.resolve(JSON.stringify(mid)),
//     })
// );

beforeEach(() => {
    fetch.resetMocks();
});

require('jest-fetch-mock').enableMocks()

it("Return requests", async () => {
    fetch.mockResponseOnce(JSON.stringify({
        result: meetupReqs,
    }));
    const status = await DogRequests.requestMeetup();
    expect(status).toEqual(meetupReqs);
    expect(fetch).toHaveBeenCalledTimes(1);
});

test('Changes meetup request status', () => {
    fetch.mockResponseOnce(JSON.stringify(meetupReqs));
    const onResponse = jest.fn();
    const onError = jest.fn();

    return DogRequests.acceptRequest(midMeet)
        .then(onResponse)
        .catch(onError)
        .finally(() => {
            expect(onResponse).toHaveBeenCalled();
            expect(onError).not.toHaveBeenCalled();

            expect(onResponse.mock.calls[0][0][0]).toEqual({mid:"5f1587e7-4eb2-42d3-bf46-df9d0308bcd0",sender:"114777625620322820902",receiver:"104891333151558538036",status:"Pending",senderProfile:{uid:"114777625620322820902",username:"Eva",email:"[email protected]",pic_link:"https://lh3.googleusercontent.com/a/AATXAJy3Od8WvYTytjjsyB_KW-zBpLnGCMWyaXONttAK\u003ds96-c",last_ping:"1000-01-01T00:00"},receiverProfile:{uid:"104891333151558538036",username:"Wenxuan",email:"[email protected]",pic_link:"https://lh3.googleusercontent.com/a/AATXAJxGbGsZ7efsc7Q8Li62gFQEADQK4EYHGV9GnN6D\u003ds96-c",last_ping:"1000-01-01T00:00"}});
        });
});```

Cannot launch the Spark server on localhost port 4567

Describe the bug
Followed the back-end setup instructions for building and running the project, but could not launch the Spark server on localhost port 4567.

To Reproduce
Steps to reproduce the behavior:

  1. Clicked compile under Lifecycle in the back-end tab after selecting Project SDK. Read additional context for more info.
  2. Downloaded Elasticsearch and ran it.
  3. Ran Main.java
  4. See error

Expected behavior
After running Main.java, expected the Spark server on localhost port 4567 to work.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
For step 1 of Building and Running the project, I get the following error message when I click compile:
Error running 'back-end [compile]': Project JDK is not specified. Configure

So I clicked Configure and selected 11 for Project SDK. Then it finally compiled.

Bug Report Example

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The Dogs Nearby Appears Twice

Describe the bug
When a user is on the find-dogs page of PMD, the user sees duplicate dogs displaying.

To Reproduce
Steps to reproduce the behavior:

  1. Go to find dogs page.

Expected behavior
We expect the dogs to be displayed only once.

Screenshots
image

Desktop (please complete the following information):

  • OS: Macbook Monterey 12.3.1 (21E258)
  • Browser: Chrome Version Version 101.0.4951.64 (Official Build) (x86_64)

No path shown in nav-owner & nav-user

Describe the bug
After the Meetup request is accepted, the user and owner both go to the navigation page, and no suggested path is displayed.

To Reproduce
Steps to reproduce the behavior:

  1. Client 1 follows the user manual to send a meetup request
  2. Client 2 follows the user manual to accept a meetup request
  3. Client 1 go to navigation page.
  4. See no path

Expected behavior
A path connecting petter and owner is shown on the page.

Desktop:

  • OS: OS X 12.4
  • Browser Chrome
  • Version 101.0.4951.64

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.