Skip to content

Sync features from the Features page

When AssertThat is the master, the Features page shows whether each feature’s latest version is in the repository, and lets you sync features one at a time without waiting for a full sync.

Each feature card shows its Git status next to the scenario counts:

  • a green tick (Synced): the feature’s current Gherkin is what was last written to the repository. Hover over it to see when;
  • Not synced: the feature changed since it was last written, or has never been synced.

The Features page with Git sync status: Promo codes is Not synced, the other features show a green tick

Features without scenarios aren’t written to the repository, so they have no status.

On a feature’s page, the status shows as text next to Download.

To list only the features that still need syncing, open More filters and set Git sync to Not synced. The filter is kept in the page address, so you can bookmark it, send it to a colleague or save it as a view.

You need the Edit work items permission in the project.

  1. Select the feature’s Not synced status. On the feature’s page you can also choose Sync feature to Git from any scenario’s … menu.

    A scenario’s menu: Delete, Move, Clone, Find similar scenarios and Sync feature to Git

  2. In Sync to the repository, add a Commit message (optional) and select Sync to Git.

    The Sync to the repository dialog with a commit message

To sync many features at once, use Sync now in the project’s Git integration.

The status changes to Syncing… and then to the green tick when the commit lands.

The Promo codes card after syncing, with the green Synced tick

In pull request mode, the change goes into a new pull request instead of straight to the branch.

When you save a feature or scenario, you can add a Commit message (optional). AssertThat keeps it and uses it as the commit message the next time the feature is synced. Messages saved since the last sync are listed in the sync dialog under Commit messages saved while editing.

How the commit is described:

  • With exactly one saved message, it becomes the commit title, prefixed with the feature name: the message cover declined Amex cards on Card payment gives Card payment: cover declined Amex cards. Don’t start the message with the feature name yourself, or it appears twice.
  • Otherwise the title summarises the sync, for example AssertThat: update feature files (1 added, 2 changed, 0 removed), and the saved messages are listed in the commit body.

The body always lists the files the commit adds, changes and removes. A sync with nothing to change makes no commit and reports Already up to date.