Implement proposed StatusPageEmbed changes#68
Merged
Conversation
…lve module `@babel/runtime/helpers/interopRequireDefault`" [+] [Unable to resolve module \`@babel/runtime/helpers/interopRequireDefault\`](https://stackoverflow.com/questions/52486219/unable-to-resolve-module-babel-runtime-helpers-interoprequiredefault)
…r-related files
…eetPath()` [+] This is in preparation for replacing the `DEPLOY_ENV` based branching in `getBaseUrl()` with `document.currentScript` based branching. Vitest will be stubbing `document.currentScript` so need to defer reference of that object until after the tests have stubbed it.
…cument.currentScript` based branching
…-instead-of-deploy-env `config.getBaseUrl()`: replace `DEPLOY_ENV` based branching with `document.currentScript` based branching
…which loads local build
…spageembed-changes
…ntoGolden()` and replace hostname with [HOSTNAME]
…ost and `dev` (Docker Compose service) tests
…tuspageembed-changes
…()` better/less confusing for the Docker Compose `e2e-tests` service case [+] Previously for the localhost and `dev` cases `getSourceFileHostname()` was returning `new URL( document.URL ).hostname`, but when running the `e2e-tests` Docker Compose service this would lead to the `static.spec.js` `STATUSPAGE_SUMMARY_URL` being set to `localhost` hostname because with `document` undefined, `getSourceFileHostname()` returned `localhost`, which didn't match `dev` hostname returned in the Playwright controlled browser which loads `dev` host URL via the bridge network. It didn't matter much since `getStatuspageSummaryUrl()` was set up to make sure Playwright would still intercept the request for the fake `summary.json`, but it was weird.
Right now `getBaseUrl()` is only used once, in `getStylesheetUrl()`. Inlining it for now to make things simpler and to keep devs from thinking it's being used in many places.
Renamed because the class does more than just make calls to the Statuspage API, it also encapsulates the data in the targeted statuspage and our business logic regarding alert selection, so it's really a customized view of the statuspage, which includes a `fetchData` call that makes a request against the single API endpoint that we use (summary). In the future if it's decided we build in some more sophisticated functionality into the widget, we'll be adding more getters to this class.
…ARY_URL` to get Playwright tests working in Docker Compose
…amples and add Docker instructions for updating golden files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
monday.com: Implement proposed StatusPageEmbed changes