This Docker image provides a development environment primarily designed for screenshot testing of frontend applications, featuring Chrome and Puppeteer support. However, it is also well-suited for general development purposes whenever an environment with the specific pre-installed software (listed in the 'Installed Software' section below) is needed.
- Pre-installed Chrome browser for automated screenshot testing
- Puppeteer integration for headless browser automation
- Ready-to-use Node.js development environment
- Based on CentOS 8.4.2105
| Software name | Version |
|---|---|
| Node | 20.11.1 |
| NPM | 10.2.4 |
| Lerna | 8.2.2 |
| Yarn | 1.22.21 |
| Chrome | 125.0.6422.141 |
| Puppeteer | 21.11.0 |
This image is primarily built for running screenshot tests in a consistent environment. It provides a pre-configured Chrome browser with Puppeteer support, ensuring reliable test results across different CI/CD environments.
To use this image for screenshot testing with Jest and Puppeteer, you can leverage the @netcracker/qubership-apihub-jest-chrome-in-docker-environment package:
// it-test-docker.jest.config.cjs
const path = require('path')
const { prepareJestConfig } = require('@netcracker/qubership-apihub-jest-chrome-in-docker-environment')
module.exports = prepareJestConfig(
path.resolve(__dirname, './common-it-test.jest.config.cjs'),
path.resolve(__dirname, './common-puppeteer.config.cjs'),
{
dockerImage: 'ghcr.io/netcracker/qubership-apihub-nodejs-dev-image:1.8.0',
},
)This configuration runs your Jest tests inside the Docker container.
- Create a common Jest configuration for your tests
- Create a common Puppeteer configuration
- Set up a Docker-specific Jest configuration using the code above
- Run your tests with this configuration to ensure consistency
This image is used in CI/CD pipelines for building and testing frontend applications. For an example of using this image in GitHub Actions, see the screenshot-tests.yaml workflow file.
You can build the image locally by executing the commands below:
cd development-environment
docker build -t qubership-apihub-nodejs-dev-image .Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests to us.