Skip to content

Commit 243ec3c

Browse files
committed
feat: create sleep step
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 272f95e commit 243ec3c

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Given the output of the last command should be empty
6666
Given /^run the command "(?P<command>(?:[^"]|\\")*)" with result code (\d+)$/
6767
Given /^run the bash command "(?P<command>(?:[^"]|\\")*)" with result code (\d+)$/
6868
Given create an environment :name with value :value to be used by occ command
69+
Given /^wait for ([0-9]+) (second|seconds)$/
6970
```
7071

7172
## Tips

features/test.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,6 @@ Feature: Test this extension
258258
"""
259259
I found the environment variable OC_PASS with value 123456
260260
"""
261+
262+
Scenario: Wait for seconds
263+
When wait for 1 seconds

src/NextcloudApiContext.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,11 @@ public static function createAnEnvironmentWithValueToBeUsedByOccCommand(string $
544544
self::$environments[$name] = $value;
545545
}
546546

547+
#[Given('/^wait for ([0-9]+) (second|seconds)$/')]
548+
public function waitForXSecond(int $seconds): void {
549+
sleep($seconds);
550+
}
551+
547552
#[AfterScenario()]
548553
public function tearDown(): void {
549554
self::$environments = [];

0 commit comments

Comments
 (0)