Skip to content

Commit 390e8ad

Browse files
committed
docs: add Cypress testing dependencies documentation with OS-specific scripts
Move Cypress dependency installation from CI workflow into documented scripts for better maintainability and user guidance. Add OS-specific tabs in documentation for Ubuntu 22.04, Ubuntu 24.04, and macOS. Changes: - Create OS-specific scripts for installing Cypress dependencies - Update CI workflow to use the new scripts - Add Testing dependencies section to frontend documentation with tabs - Include macOS support for Cypress testing in CI
1 parent 3beb7bb commit 390e8ad

File tree

4 files changed

+66
-6
lines changed

4 files changed

+66
-6
lines changed

.github/workflows/test-docs-scripts-frontend.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,11 @@ jobs:
102102
- name: Prepare for Cypress tests (Ubuntu 22.04)
103103
if: matrix.os == 'ubuntu-22.04'
104104
run: |
105-
sudo apt-get update
106-
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \
107-
libnss3 libxss1 libasound2 libxtst6 xauth xvfb
105+
bash website/docs/developers/scripts/frontend/install-cypress-deps-ubuntu-22-04.sh
108106
109107
- name: Prepare for Cypress tests (Ubuntu 24.04)
110108
if: matrix.os == 'ubuntu-24.04'
111109
run: |
112-
sudo apt-get update
113-
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \
114-
libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb
110+
bash website/docs/developers/scripts/frontend/install-cypress-deps-ubuntu-24-04.sh
111+
112+
# Note: Cypress works out of the box on macOS, no additional dependencies needed

website/docs/developers/frontend/index.mdx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import TabItem from "@theme/TabItem";
1010
import InstallNodejsLinux from "!!raw-loader!../scripts/frontend/install-nodejs-linux.sh";
1111
import InstallNodejsMacos from "!!raw-loader!../scripts/frontend/install-nodejs-macos.sh";
1212
import InstallAngularCli from "!!raw-loader!../scripts/frontend/install-angular-cli.sh";
13+
import InstallCypressUbuntu2204 from "!!raw-loader!../scripts/frontend/install-cypress-deps-ubuntu-22-04.sh";
14+
import InstallCypressUbuntu2404 from "!!raw-loader!../scripts/frontend/install-cypress-deps-ubuntu-24-04.sh";
1315

1416
# Frontend Applications
1517

@@ -145,6 +147,53 @@ set.
145147

146148
<!-- prettier-ignore-stop -->
147149

150+
## Testing dependencies
151+
152+
### Cypress end-to-end testing
153+
154+
The frontend applications use Cypress for end-to-end testing. Cypress requires
155+
additional system dependencies to run browser automation tests.
156+
157+
<Tabs>
158+
<TabItem value="ubuntu-22-04" label="Ubuntu 22.04">
159+
160+
<CodeBlock
161+
language="bash"
162+
title="scripts/frontend/install-cypress-deps-ubuntu-22-04.sh"
163+
>
164+
{InstallCypressUbuntu2204}
165+
</CodeBlock>
166+
167+
</TabItem>
168+
<TabItem value="ubuntu-24-04" label="Ubuntu 24.04">
169+
170+
<CodeBlock
171+
language="bash"
172+
title="scripts/frontend/install-cypress-deps-ubuntu-24-04.sh"
173+
>
174+
{InstallCypressUbuntu2404}
175+
</CodeBlock>
176+
177+
</TabItem>
178+
</Tabs>
179+
180+
<!-- prettier-ignore-start -->
181+
182+
:::info Cypress Dependencies
183+
184+
These dependencies are required for:
185+
186+
- Running Cypress in headless mode (CI/CD environments)
187+
- Displaying the Cypress Test Runner GUI locally
188+
- Browser automation and screenshot capabilities
189+
190+
**Note for macOS users:** Cypress typically works out of the box on macOS with
191+
system browsers. No additional dependencies need to be installed.
192+
193+
:::
194+
195+
<!-- prettier-ignore-stop -->
196+
148197
## Next Steps
149198

150199
With Node.js and Angular CLI installed, you're ready to build and run any of the
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Install Cypress dependencies for Ubuntu 22.04
2+
# These packages are required for running Cypress end-to-end tests
3+
4+
sudo apt-get update
5+
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \
6+
libnss3 libxss1 libasound2 libxtst6 xauth xvfb
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Install Cypress dependencies for Ubuntu 24.04
2+
# These packages are required for running Cypress end-to-end tests
3+
# Note: libasound2t64 is used instead of libasound2 in Ubuntu 24.04
4+
5+
sudo apt-get update
6+
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \
7+
libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb

0 commit comments

Comments
 (0)