Skip to content

Commit 6d733d2

Browse files
authored
refactor: add v1.24.3 constraint, update README.md (#61)
1 parent 015299e commit 6d733d2

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

README.md

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,33 @@
1-
[![tests](https://github.com/ddev/ddev-selenium-standalone-chrome/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-addon-template/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2025.svg)
1+
[![add-on registry](https://img.shields.io/badge/DDEV-Add--on_Registry-blue)](https://addons.ddev.com)
2+
[![tests](https://github.com/ddev/ddev-selenium-standalone-chrome/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/ddev/ddev-selenium-standalone-chrome/actions/workflows/tests.yml?query=branch%3Amain)
3+
[![last commit](https://img.shields.io/github/last-commit/ddev/ddev-selenium-standalone-chrome)](https://github.com/ddev/ddev-selenium-standalone-chrome/commits)
4+
[![release](https://img.shields.io/github/v/release/ddev/ddev-selenium-standalone-chrome)](https://github.com/ddev/ddev-selenium-standalone-chrome/releases/latest)
25

36
# DDEV Selenium Standalone Chrome
47

5-
## Introduction
8+
## Overview
69

710
This service can be used with any project type. The examples below are Drupal-specific. Contributions for docs and tests that show this service working with other project types are appreciated.
811

9-
## Install/Update
12+
## Installation
1013

11-
For DDEV v1.23.5 or above run
12-
13-
```sh
14+
```bash
1415
ddev add-on get ddev/ddev-selenium-standalone-chrome
15-
```
16-
17-
For earlier versions of DDEV run
18-
19-
```sh
20-
ddev get ddev/ddev-selenium-standalone-chrome
21-
```
22-
23-
Then restart your project
24-
25-
```sh
2616
ddev restart
2717
```
2818

2919
> [!NOTE]
30-
> If you change `additional_hostnames` or `additional_fqdns`, you have to re-run `ddev add-on get ddev/ddev-selenium-standalone-chrome`
20+
> Run `ddev add-on get ddev/ddev-selenium-standalone-chrome` after changes to `name`, `additional_hostnames`, `additional_fqdns`, or `project_tld` in `.ddev/config.yaml` so that `.ddev/docker-compose.selenium-chrome_extras.yaml` is regenerated.
21+
22+
After installation, make sure to commit the `.ddev` directory to version control.
3123

3224
### Optional steps
3325

3426
1. Update the provided `.ddev/config.selenium-standalone-chrome.yaml` as you see fit (and remove the #ddev-generated line). You can also just override lines in your `.ddev/config.yaml`
3527
1. Check `config.selenium-standalone-chrome.yaml` and `docker-compose.selenium-chrome.yaml` into your source control.
3628
1. Update by re-running `ddev add-on get ddev/ddev-selenium-standalone-chrome`.
3729

38-
## Use
30+
## Usage
3931

4032
- Your project is now ready to run FunctionalJavascript and [Nightwatch](https://www.drupal.org/docs/automated-testing/javascript-testing-using-nightwatch) tests from Drupal core, or [Drupal Test Traits](https://gitlab.com/weitzman/drupal-test-traits) (DTT). All these types are tested in this repo. Some examples to try:
4133
- FunctionalJavascript:
@@ -53,10 +45,10 @@ ddev restart
5345

5446
### The easy way: Use noVNC (built-in)
5547

56-
1. Remove --headless from the MINK_DRIVER_ARGS_WEBDRIVER in your project's .ddev/config.selenium-standalone-chrome.yaml. Run `ddev restart`.
57-
2. On your host, run `ddev launch :7900` or browse to https://[DDEV SITE URL]:7900 to watch tests run with noVNC (neat!).
48+
1. Remove `--headless` from the `MINK_DRIVER_ARGS_WEBDRIVER` in your project's `.ddev/config.selenium-standalone-chrome.yaml`. Run `ddev restart`.
49+
2. On your host, run `ddev launch :7900` or browse to `https://[DDEV SITE URL]:7900` to watch tests run with noVNC (neat!).
5850

59-
By default noVNC connects without password, you can enable password by removing the "VNC_NO_PASSWORD=1" line in the file `docker-compose.selenium-chrome.yaml`, the default password will be `secret`, and you can set the custom one via `VNC_PASSWORD` environment variable.
51+
By default noVNC connects without password, you can enable password by removing the `VNC_NO_PASSWORD=1` line in the file `docker-compose.selenium-chrome.yaml`, the default password will be `secret`, and you can set the custom one via `VNC_PASSWORD` environment variable.
6052

6153
This enables you to quickly see what is going on with your tests.
6254

@@ -74,15 +66,15 @@ If you want to use the browser provided by this addon to check out the test resu
7466
2. Uncomment the two lines about `ports` and `5900:5900`.
7567
3. Execute `ddev restart`.
7668

77-
You can now connect to [DDEV SITE URL]:5900 (password: `secret`) in your VNC client.
69+
You can now connect to `[DDEV SITE URL]:5900` (password: `secret`) in your VNC client.
7870

7971
Note that when using `ports`, only one project at a time can be running with port 5900.
8072

8173
### Behat config example
8274

8375
If you use Behat as a test running, adjust your `behat.yml`
8476

85-
```yml
77+
```yaml
8678
extensions:
8779
Behat\MinkExtension:
8880
base_url: http://web
@@ -101,6 +93,6 @@ If you use Behat as a test running, adjust your `behat.yml`
10193
10294
- Anyone is welcome to submit a PR to this repo. See README.md at https://github.com/ddev/ddev-addon-template, the parent of this repo.
10395
104-
## Maintainer
96+
## Credits
10597
106-
- Contributed and maintained by [@weitzman](https://github.com/weitzman).
98+
**Contributed and maintained by [@weitzman](https://github.com/weitzman)**

install.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ project_files:
44
- docker-compose.selenium-chrome.yaml
55
- config.selenium-standalone-chrome.yaml
66

7+
ddev_version_constraint: '>= v1.24.3'
8+
79
post_install_actions:
810
- |
911
#ddev-nodisplay
@@ -25,6 +27,7 @@ post_install_actions:
2527
- "ddev-router:{{- replace (env "DDEV_TLD") "\\${DDEV_TLD}" (replace (env "DDEV_PROJECT") "\\${DDEV_PROJECT}" $n) -}}"
2628
{{- end }}
2729
END
30+
2831
removal_actions:
2932
- |
3033
#ddev-nodisplay

0 commit comments

Comments
 (0)