Open Itxaka opened 1 year ago
The e2e web tests use cypress: https://github.com/kairos-io/kairos-agent/blob/main/internal/webui/public/cypress/e2e/spec.cy.js
And they are run on CI via the following workflow: https://github.com/kairos-io/kairos-agent/blob/main/.github/workflows/webui.yaml (you can run the earthly target locally)
@mauromorales @Itxaka would it be too much to implement the same thing https://github.com/spectrocloud/librarium has done?
See https://spectrocloud.github.io/librarium/reports/demo-visual-tests/8603071324/1/
the above URL encompasses tests in which we could implement for docs and WebUI.
@wcrum Because this is an open-source project, it's eligible for the Argos CI open-source free-tier solution, and have an even simpler workflow than what librarium has.
@mauromorales for context, we built something pretty close to what Docusarus uses for Visual Testing.
@wcrum, @karl-cardenas-coding Thanks for pointing that out, the solution is quite nice, but this seems to work when building a web app/page if I understand correctly.
The tests in this ticket are not meant to validate the content itself, that should happen on the kairos-docs repo. Since we don't have such tests either, maybe we should create a new ticket for that. I think it's quite common that we have a broken link or such.
On the agent, what we want to test is the integration of the agent webui and a copy of the docs which is appended to it. So when the user accesses http://localhost:8080/, they see the installer, can click on the docs link and read the documentation.
Having said that, I'm not sure where we stand here because we had to work on reducing the size of the binaries, so maybe the final decision is to not have the docs integrated in the agent at all.
@mauromorales yeah embedding docs is a challenge in itself. I am not sure if this fits your model, but for Palette docs, we offer an offline docs experience through a Docker image. The image contains all the assets and an HTTP serverthat exposes the site locally. The image is built daily through a GitHub Actions.
kairos-agent bundles the docs Also runs some webui basic tests
But we bundle the docs as well and we are not even checking if you can access them properly
We should expand the webui docs to at least: