Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add more tests to Cypress 🌲 #36

Open
4 of 10 tasks
amaury1093 opened this issue Oct 26, 2020 · 4 comments
Open
4 of 10 tasks

Add more tests to Cypress 🌲 #36

amaury1093 opened this issue Oct 26, 2020 · 4 comments
Labels
good first issue Good for newcomers

Comments

@amaury1093
Copy link
Member

amaury1093 commented Oct 26, 2020

We use cypress to do e2e testing. We should add more tests.

Some ideas I have:

Components:

Home page:

  • Test "Use my location" button (might be hard)

City page:

  • Shows cigarettes after some time
  • Click on weekly shows cigs * 7
  • Click on monthly shows cigs * 30

Feel free to pick some tests, or add new ones you can think of!

@devtayls
Copy link

devtayls commented Nov 3, 2021

I'd be interested in working on this!

@amaury1093
Copy link
Member Author

Sure! Feel free to take one (or more) tests and I can review your PRs.

@devtayls
Copy link

devtayls commented Nov 5, 2021

I think I'm having issues with the build. I can load up the server and start the index, however when I try to route to another page I get the following:

Snag_aabf98f

Snag_aae5b4c

Error: getaddrinfo EAI_AGAIN gitlab.com at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) { errno: -3001, code: 'EAI_AGAIN', syscall: 'getaddrinfo', hostname: 'gitlab.com', config: { url: 'https://gitlab.com/shootbot/cities/-/raw/master/all.json', method: 'get', headers: { Accept: 'application/json, text/plain, */*', 'User-Agent': 'axios/0.21.4' }, transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, data: undefined }, request: <ref *1> Writable { _writableState: WritableState { objectMode: false, highWaterMark: 16384, finalCalled: false, needDrain: false, ending: false, ended: false, finished: false, destroyed: false, decodeStrings: true, defaultEncoding: 'utf8', length: 0, writing: false, corked: 0, sync: true, bufferProcessing: false, onwrite: [Function: bound onwrite], writecb: null, writelen: 0, afterWriteTickInfo: null, buffered: [], bufferedIndex: 0, allBuffers: true, allNoop: true, pendingcb: 0, constructed: true, prefinished: false, errorEmitted: false, emitClose: true, autoDestroy: true, errored: null, closed: false, closeEmitted: false, [Symbol(kOnFinished)]: [] }, _events: [Object: null prototype] { response: [Function: handleResponse], error: [Function: handleRequestError] }, _eventsCount: 2, _maxListeners: undefined, _options: { maxRedirects: 21, maxBodyLength: 10485760, protocol: 'https:', path: '/shootbot/cities/-/raw/master/all.json', method: 'GET', headers: [Object], agent: undefined, agents: [Object], auth: undefined, hostname: 'gitlab.com', port: null, nativeProtocols: [Object], pathname: '/shootbot/cities/-/raw/master/all.json' }, _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 0, _requestBodyBuffers: [], _onNativeResponse: [Function (anonymous)], _currentRequest: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: false, socket: [TLSSocket], _header: 'GET /shootbot/cities/-/raw/master/all.json HTTP/1.1\r\n' + 'Accept: application/json, text/plain, */*\r\n' + 'User-Agent: axios/0.21.4\r\n' + 'Host: gitlab.com\r\n' + 'Connection: close\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, path: '/shootbot/cities/-/raw/master/all.json', _ended: false, res: null, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'gitlab.com', protocol: 'https:', _redirectable: [Circular *1], [Symbol(kCapture)]: false, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kOutHeaders)]: [Object: null prototype] }, _currentUrl: 'https://gitlab.com/shootbot/cities/-/raw/master/all.json', [Symbol(kCapture)]: false }, response: undefined, isAxiosError: true, toJSON: [Function: toJSON] }

For the .env, I'm just using the defaults supplied in .env.example

@amaury1093
Copy link
Member Author

It seems like a DNS timeout. The only gitlab link we use is https://gitlab.com/shootbot/cities/-/raw/master/all.json. Can you access that link?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants