Skip to content

Commit

Permalink
cypress now has a latest tag (finally)
Browse files Browse the repository at this point in the history
Added some messaging to the example implementations
  • Loading branch information
calaldees committed Aug 9, 2023
1 parent 050938a commit 1d79466
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.cypress.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
test_client:
image: cypress/included:11.2.0
image: cypress/included:latest
working_dir: /tests
volumes:
# USER passthrough
Expand Down
8 changes: 7 additions & 1 deletion example_client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,13 @@ <h3>My Items</h3>
// Startup -----------------------------------------------------------------

const urlParams = new URLSearchParams(window.location.search);
const urlAPI = (urlParams.get('api') || '/api/v1').replace(/\/$/, ''); // Get api url (and remove trailing slash if present)
const urlAPI = (urlParams.get('api') || '').replace(/\/$/, ''); // Get api url (and remove trailing slash if present)
if (!urlAPI) {
const pp = document.createElement('p')
pp.textContent = "Missing `?api=` in query string - this is probably not going to work"
pp.style = "color: red"
document.body.appendChild(pp)
}

/*
function redirect_to_hash({hash='#'}={}) {
Expand Down
1 change: 1 addition & 0 deletions example_server/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def get_index(request):
</head>
<body>
<h1>Test</h1>
<p>You probably what a human readable description here. Maybe a link to the OpenAPI spec? Maybe some example curl commands?</p>
</body>
<html>"""
response = {'body': body}
Expand Down

0 comments on commit 1d79466

Please sign in to comment.