Skip to content

Instantly share code, notes, and snippets.

@ArturJS
Created September 17, 2022 04:25
Show Gist options
  • Select an option

  • Save ArturJS/c0b197742ee6b3b092172a1679109a42 to your computer and use it in GitHub Desktop.

Select an option

Save ArturJS/c0b197742ee6b3b092172a1679109a42 to your computer and use it in GitHub Desktop.
Sorry cypress create project
# Sometimes when you run sorry-cypress
# and have misconfigured UI which has
# http://localhost:4000 as baseUrl for API backend
# and need to create new project ASAP
# without digging into docs and sources
curl 'http://<your_ip_address>:4000/' \
-H 'sec-ch-ua: "Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"' \
-H 'accept: */*' \
-H 'Referer: http://<your_ip_address>:8080/' \
-H 'content-type: application/json' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
--data-raw $'{"operationName":"createProject","variables":{"project":{"projectId":"sorry-cypress","inactivityTimeoutSeconds":43200,"projectColor":""}},"query":"mutation createProject($project: CreateProjectInput\u0021) {\\n createProject(project: $project) {\\n projectId\\n inactivityTimeoutSeconds\\n projectColor\\n __typename\\n }\\n}\\n"}' \
--compressed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment