Assert what the site reports as its generator, by the Generator meta tag the System module prints: the name of the software, optionally with its major version, which turns a smoke test into an upgrade guard. The text is matched from the start of the tag, on whole words: "Drupal" and "Drupal 11" both match "Drupal 11 (https://www.drupal.org)", "Drupal 1" does not.
Examples
Then the site generator should be "Drupal"
Then the site generator should be "Drupal 10"
And the site generator should be "Drupal 11"
Then the site generator should not be "Drupal 9"
And the site generator should not be "Drupal 12"
Pattern
Then(/^the site generator should( not)* be "([^"]*)"$/, …)
Part of @webship-js/drupal-core-steps (github.com/webship/drupal-core-steps), a step pack for Webship-js 2.0.x.