Skip to content

Commit

Permalink
Merge branch 'trunk' into feature/88-add-more-lcp-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Miraeld committed Jun 20, 2024
2 parents 779e72e + 0faf4b2 commit adf82b4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/features/lcp-beacon-script.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@lcp @setup
@lcp @delaylcp @setup
Feature: Beacon script captures the right images.

Background:
Expand Down
18 changes: 17 additions & 1 deletion src/support/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import backstop from 'backstopjs';
import {SCENARIO_URLS, WP_SSH_ROOT_DIR,} from "../../config/wp.config";

import { After, AfterAll, Before, BeforeAll, Status, setDefaultTimeout } from "@cucumber/cucumber";
import {rename, exists, rm, testSshConnection} from "../../utils/commands";
import {rename, exists, rm, testSshConnection, installRemotePlugin, activatePlugin, uninstallPlugin} from "../../utils/commands";
// import {configurations, getWPDir} from "../../utils/configurations";

/**
Expand Down Expand Up @@ -208,6 +208,22 @@ After(async function (this: ICustomWorld, { pickle, result }) {

});

/**
* Before each test scenario with the @delaylcp tag, performs setup tasks.
*/
Before({tags: '@delaylcp'}, async function (this: ICustomWorld) {
// Install and activate the remote plugin
await installRemotePlugin('https://github.com/wp-media/wp-rocket-e2e-test-helper/raw/main/helper-plugin/rocket-lcp-delay.zip');
await activatePlugin('rocket-lcp-delay');
});

/**
* After each test scenario with the @delaylcp tag, performs teardown tasks.
*/
After({tags: '@delaylcp'}, async function (this: ICustomWorld) {
await uninstallPlugin('rocket-lcp-delay');
});

/**
* To uncomment during implementation of cli
*/
Expand Down

0 comments on commit adf82b4

Please sign in to comment.