Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- yarn test plastic-cards.test
- .tsx
- yarn run v1.19.1
- $ yarn compile-messages && jest --env=jsdom plastic-car
- ds.test.tsx
- $ lingui compile
- Compiling message catalogs…
- Done!
- console.warn node_modules/react-dom/cjs/react-dom.dev
- elopment.js:12357
- Warning: componentWillMount has been renamed, and i
- s not recommended for use. See https://fb.me/react-unsa
- fe-component-lifecycles for details.
- * Move code with side effects to componentDidMount,
- and set initial state in the constructor.
- * Rename componentWillMount to UNSAFE_componentWill
- Mount to suppress this warning in non-strict mode. In R
- eact 17.x, only the UNSAFE_ name will work. To rename a
- ll deprecated lifecycles to their new names, you can ru
- n `npx react-codemod rename-unsafe-lifecycles` in your
- project source folder.
- Please update the following components: SideEffect(
- NullComponent)
- console.error node_modules/jest-environment-jsdom/nod
- e_modules/jsdom/lib/jsdom/virtual-console.js:29
- Error: Error: getaddrinfo ENOTFOUND api.staging.ple
- o.io
- at Object.dispatchError (/Users/arshad_pleo/Doc
- uments/git_repos/pleo-projects/product-web/node_modules
- /jest-environment-jsdom/node_modules/jsdom/lib/jsdom/li
- ving/xhr-utils.js:65:19)
- at EventEmitter.<anonymous> (/Users/arshad_pleo
- /Documents/git_repos/pleo-projects/product-web/node_mod
- ules/jest-environment-jsdom/node_modules/jsdom/lib/jsdo
- m/living/xmlhttprequest.js:676:20)
- at EventEmitter.emit (events.js:228:7)
- at Request.<anonymous> (/Users/arshad_pleo/Docu
- ments/git_repos/pleo-projects/product-web/node_modules/
- jest-environment-jsdom/node_modules/jsdom/lib/jsdom/liv
- ing/xhr-utils.js:412:47)
- at Request.emit (events.js:223:5)
- at Request.onRequestError (/Users/arshad_pleo/D
- ocuments/git_repos/pleo-projects/product-web/node_modul
- es/request/request.js:881:8)
- at ClientRequest.emit (events.js:223:5)
- at TLSSocket.socketErrorListener (_http_client.
- js:406:9)
- at TLSSocket.emit (events.js:223:5)
- at emitErrorNT (internal/streams/destroy.js:92:
- 8) undefined
- console.error node_modules/jest-environment-jsdom/nod
- e_modules/jsdom/lib/jsdom/virtual-console.js:29
- Error: Error: getaddrinfo ENOTFOUND api.staging.ple
- o.io
- at Object.dispatchError (/Users/arshad_pleo/Doc
- uments/git_repos/pleo-projects/product-web/node_modules
- /jest-environment-jsdom/node_modules/jsdom/lib/jsdom/li
- ving/xhr-utils.js:65:19)
- at EventEmitter.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
- at EventEmitter.emit (events.js:228:7)
- at Request.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:412:47)
- at Request.emit (events.js:223:5)
- at Request.onRequestError (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/request/request.js:881:8)
- at ClientRequest.emit (events.js:223:5)
- at TLSSocket.socketErrorListener (_http_client.js:406:9)
- at TLSSocket.emit (events.js:223:5)
- at emitErrorNT (internal/streams/destroy.js:92:8) undefined
- console.error node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/virtual-console.js:29
- Error: Error: getaddrinfo ENOTFOUND api.staging.pleo.io
- at Object.dispatchError (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:65:19)
- at EventEmitter.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:676:20)
- at EventEmitter.emit (events.js:228:7)
- at Request.<anonymous> (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:412:47)
- at Request.emit (events.js:223:5)
- at Request.onRequestError (/Users/arshad_pleo/Documents/git_repos/pleo-projects/product-web/node_modules/request/request.js:881:8)
- at ClientRequest.emit (events.js:223:5)
- at TLSSocket.socketErrorListener (_http_client.js:406:9)
- at TLSSocket.emit (events.js:223:5)
- at emitErrorNT (internal/streams/destroy.js:92:8) undefined
- FAIL app/scripts/pages/auth/team/plastic-cards/plasti
- c-cards.test.tsx (5.928s)
- PlasticCards
- PlasticCards
- ✓ renders the disabled 'Order cards' button when
- there is an editable order (79ms)
- ✕ renders the disabled 'Order cards' button when
- there is a processing order (31ms)
- ✕ renders the disabled 'Order cards' button when
- there is both an editing and a processing order (24ms)
- ✕ renders 'plastic-card-orders' when there is an
- activeOrders (18ms)
- ✓ renders 'plastic-card-orders' when there are pr
- eviousOrders (21ms)
- ● PlasticCards › PlasticCards › renders the disabled
- 'Order cards' button when there is a processing order
- thrown: Object {
- "body": undefined,
- "config": Object {
- "adapter": [Function xhrAdapter],
- "data": undefined,
- "headers": Object {
- "Accept": "application/json, text/plain, */*",
- "Authorization": "Bearer undefined",
- },
- "maxContentLength": -1,
- "method": "get",
- "onUploadProgress": undefined,
- "params": Object {
- "status": [Array],
- },
- "timeout": 0,
- "transformRequest": Object {
- "0": [Function transformRequest],
- },
- "transformResponse": Object {
- "0": [Function transformResponse],
- },
- "url": "https://api.staging.pleo.io/rest/v1/companies/undefined/cardOrders",
- "validateStatus": [Function validateStatus],
- "withCredentials": undefined,
- "xsrfCookieName": "XSRF-TOKEN",
- "xsrfHeaderName": "X-XSRF-TOKEN",
- },
- "message": "",
- "request": XMLHttpRequest {
- "_eventHandlers": Object {
- "readystatechange": [Function handleLoad],
- },
- "_registeredHandlers": Set {
- "readystatechange",
- },
- "upload": XMLHttpRequestUpload {
- "_ownerDocument": [Document],
- },
- Symbol(flag): Object {
- "agentOptions": undefined,
- "auth": null,
- "body": undefined,
- "cookieJar": [CookieJar],
- "encoding": "UTF-8",
- "formData": false,
- "method": "GET",
- "mimeType": null,
- "origin": "https://app.test.pleo.io",
- "pool": undefined,
- "preflight": true,
- "proxy": undefined,
- "referrer": "https://app.test.pleo.io/",
- "requestHeaders": [Object],
- "requestManager": [RequestManager],
- "responseType": "",
- "strictSSL": undefined,
- "synchronous": false,
- "timeout": 0,
- "uri": "https://api.staging.pleo.io/rest/v1/companies/undefined/cardOrders?status[]=CREATED&status[]=PROCESSING&status[]=SENT",
- "userAgent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
- "withCredentials": false,
- },
- Symbol(properties): Object {
- "abortError": false,
- "beforeSend": false,
- "bufferStepSize": 1048576,
- "client": [EventEmitter],
- "cookieJar": [CookieJar],
- "error": [Error: getaddrinfo ENOTFOUND api.staging.pleo.io],
- "filteredResponseHeaders": [Array],
- "origin": "https://app.test.pleo.io",
- "readyState": 4,
- "requestBuffer": null,
- "requestCache": null,
- "responseBuffer": null,
- "responseCache": null,
- "responseHeaders": [Object],
- "responseTextCache": null,
- "responseURL": "",
- "responseXMLCache": null,
- "send": false,
- "status": 0,
- "statusText": "",
- "timeoutFn": null,
- "timeoutId": 0,
- "timeoutStart": 0,
- "totalReceivedChunkSize": 0,
- "uploadComplete": true,
- "uploadListener": false,
- },
- },
- "response": undefined,
- "status": undefined,
- }
- 355 | })
- 356 |
- > 357 | it("renders the disabled 'Order cards' button when there is a processing order", () => {
- | ^
- 358 | const companyId = basePlasticCardsProps.company.id
- 359 | nock(baseUrl)
- 360 | .get(`/companies/${companyId}/cardOrders`)
- at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:92:20)
- at Suite.it (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:357:9)
- at Suite.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:313:5)
- at Object.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:59:1)
- ● PlasticCards › PlasticCards › renders the disabled 'Order cards' button when there is both an editing and a processing order
- thrown: Object {
- "body": undefined,
- "config": Object {
- "adapter": [Function xhrAdapter],
- "data": undefined,
- "headers": Object {
- "Accept": "application/json, text/plain, */*",
- "Authorization": "Bearer undefined",
- },
- "maxContentLength": -1,
- "method": "get",
- "onUploadProgress": undefined,
- "params": undefined,
- "timeout": 0,
- "transformRequest": Object {
- "0": [Function transformRequest],
- },
- "transformResponse": Object {
- "0": [Function transformResponse],
- },
- "url": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/recarding-date",
- "validateStatus": [Function validateStatus],
- "withCredentials": undefined,
- "xsrfCookieName": "XSRF-TOKEN",
- "xsrfHeaderName": "X-XSRF-TOKEN",
- },
- "message": "",
- "request": XMLHttpRequest {
- "_eventHandlers": Object {
- "readystatechange": [Function handleLoad],
- },
- "_registeredHandlers": Set {
- "readystatechange",
- },
- "upload": XMLHttpRequestUpload {
- "_ownerDocument": [Document],
- },
- Symbol(flag): Object {
- "agentOptions": undefined,
- "auth": null,
- "body": undefined,
- "cookieJar": [CookieJar],
- "encoding": "UTF-8",
- "formData": false,
- "method": "GET",
- "mimeType": null,
- "origin": "https://app.test.pleo.io",
- "pool": undefined,
- "preflight": true,
- "proxy": undefined,
- "referrer": "https://app.test.pleo.io/",
- "requestHeaders": [Object],
- "requestManager": [RequestManager],
- "responseType": "",
- "strictSSL": undefined,
- "synchronous": false,
- "timeout": 0,
- "uri": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/recarding-date",
- "userAgent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
- "withCredentials": false,
- },
- Symbol(properties): Object {
- "abortError": false,
- "beforeSend": false,
- "bufferStepSize": 1048576,
- "client": [EventEmitter],
- "cookieJar": [CookieJar],
- "error": [Error: getaddrinfo ENOTFOUND api.staging.pleo.io],
- "filteredResponseHeaders": [Array],
- "origin": "https://app.test.pleo.io",
- "readyState": 4,
- "requestBuffer": null,
- "requestCache": null,
- "responseBuffer": null,
- "responseCache": null,
- "responseHeaders": [Object],
- "responseTextCache": null,
- "responseURL": "",
- "responseXMLCache": null,
- "send": false,
- "status": 0,
- "statusText": "",
- "timeoutFn": null,
- "timeoutId": 0,
- "timeoutStart": 0,
- "totalReceivedChunkSize": 0,
- "uploadComplete": true,
- "uploadListener": false,
- },
- },
- "response": undefined,
- "status": undefined,
- }
- 385 | })
- 386 |
- > 387 | it("renders the disabled 'Order cards' button when there is both an editing and a processing order", () => {
- | ^
- 388 | const companyId = basePlasticCardsProps.company.id
- 389 | nock(baseUrl)
- 390 | .get(`/companies/${companyId}/cardOrders`)
- at Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:92:20)
- at Suite.it (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:387:9)
- at Suite.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:313:5)
- at Object.describe (app/scripts/pages/auth/team/plastic-cards/plastic-cards.test.tsx:59:1)
- ● PlasticCards › PlasticCards › renders 'plastic-card-orders' when there is an activeOrders
- thrown: Object {
- "body": undefined,
- "config": Object {
- "adapter": [Function xhrAdapter],
- "data": undefined,
- "headers": Object {
- "Accept": "application/json, text/plain, */*",
- "Authorization": "Bearer undefined",
- },
- "maxContentLength": -1,
- "method": "get",
- "onUploadProgress": undefined,
- "params": undefined,
- "timeout": 0,
- "transformRequest": Object {
- "0": [Function transformRequest],
- },
- "transformResponse": Object {
- "0": [Function transformResponse],
- },
- "url": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/gps-employees",
- "validateStatus": [Function validateStatus],
- "withCredentials": undefined,
- "xsrfCookieName": "XSRF-TOKEN",
- "xsrfHeaderName": "X-XSRF-TOKEN",
- },
- "message": "",
- "request": XMLHttpRequest {
- "_eventHandlers": Object {
- "readystatechange": [Function handleLoad],
- },
- "_registeredHandlers": Set {
- "readystatechange",
- },
- "upload": XMLHttpRequestUpload {
- "_ownerDocument": [Document],
- },
- Symbol(flag): Object {
- "agentOptions": undefined,
- "auth": null,
- "body": undefined,
- "cookieJar": [CookieJar],
- "encoding": "UTF-8",
- "formData": false,
- "method": "GET",
- "mimeType": null,
- "origin": "https://app.test.pleo.io",
- "pool": undefined,
- "preflight": true,
- "proxy": undefined,
- "referrer": "https://app.test.pleo.io/",
- "requestHeaders": [Object],
- "requestManager": [RequestManager],
- "responseType": "",
- "strictSSL": undefined,
- "synchronous": false,
- "timeout": 0,
- "uri": "https://api.staging.pleo.io/rest/v1/recarding/companies/undefined/gps-employees",
- "userAgent": "Mozilla/5.0 (darwin) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/11.12.0",
- "withCredentials": false,
- },
- Symbol(properties): Object {
- "abortError": false,
- "beforeSend": false,
- "bufferStepSize": 1048576,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement