Skip to content

Commit 925323b

Browse files
committed
update release CI
2 parents 5fddc15 + 60fe50e commit 925323b

5 files changed

Lines changed: 39 additions & 14 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ jobs:
8787
cp -fv tests/ci/behat.yml tests/behat.yml
8888
cp -fv tests/ci/config.php public_html/lists/config/config.php
8989
mkdir -p output/screenshots
90+
chmod 777 output/screenshots
91+
mkdir /tmp/screenshots
92+
chmod 777 /tmp/screenshots
9093
mkdir -p build/mails
9194
./bin/start-selenium > output/selenium.log 2>&1 &
9295
sleep 5
@@ -112,21 +115,31 @@ jobs:
112115
which sftp
113116
which sshpass
114117
vendor/bin/behat -V
118+
ls -l output
119+
ls -l output/screenshots
115120
116-
- name: Run Behat Tests
121+
- name: Run Behat Tests ## problem encountered https://github.com/forceedge01/behat-fail-aid/issues/76
117122
run: |
118123
cd $GITHUB_WORKSPACE/tests
119-
../vendor/bin/behat -n -fprogress -p chrome --strict --stop-on-failure --tags=@initialise
120-
../vendor/bin/behat -n -fprogress -p chrome --strict --stop-on-failure --tags="~@initialise && ~@wip"
124+
../vendor/bin/behat -n -p chrome --strict --stop-on-failure --tags=@initialise
125+
../vendor/bin/behat -n -p chrome --strict --stop-on-failure --tags="~@initialise && ~@wip"
121126
122-
- name: Upload the screenshots
127+
- name: Upload the output
123128
if: always()
124129
uses: actions/upload-artifact@v4
125130
with:
126131
path: "output"
127132
name: "behat output"
128133
retention-days: 3
129134

135+
- name: Upload the screenshots
136+
if: always()
137+
uses: actions/upload-artifact@v4
138+
with:
139+
path: "/tmp/screenshots/"
140+
name: "screenshots"
141+
retention-days: 3
142+
130143
- name: Clean Up
131144
run: |
132145
cd $GITHUB_WORKSPACE
@@ -259,7 +272,7 @@ jobs:
259272
cd $GITHUB_WORKSPACE
260273
cd ..
261274
262-
sshpass -e sftp -oBatchMode=no -b - ${{ secrets.SF_USERNAME }}@${{ secrets.SF_HOST }} << EOF
275+
[[ $SSHPASS != "" ]] && sshpass -e sftp -oBatchMode=no -b - ${{ secrets.SF_USERNAME }}@${{ secrets.SF_HOST }} << EOF
263276
cd /home/frs/project/phplist/$RELEASE_FOLDER
264277
mkdir $RELEASE_VERSION
265278
cd $RELEASE_VERSION

tests/ci/behat.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,9 @@ default:
5656
wd_host: http://127.0.0.1:4444/wd/hub
5757
FailAid\Extension:
5858
screenshot:
59-
directory: ./output/screenshots/
59+
directory: /tmp/screenshots/
6060
mode: default
6161
autoClean: false
62-
size: 1444x1280
63-
Bex\Behat\ScreenshotExtension:
64-
active_image_drivers: [local]
65-
image_drivers:
66-
local:
67-
screenshot_directory: output/screenshots
68-
clear_screenshot_directory: true
6962

7063
chrome:
7164
extensions:

tests/features/bootstrap/FeatureContext.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ public function iAmAuthenticatedAsAdmin() {
170170
$this->fillField('login', $this->params['admin_username']);
171171
$this->fillField('password', $this->params['admin_password']);
172172
$this->pressButton('Continue');
173+
$this->getSession()->getDriver()->setTimeouts([
174+
'script' => 3000000,
175+
'implicit' => 3000000,
176+
'page load' => 3000000 //https://web.archive.org/web/20160730151941/http://alex-panshin.me/blog/how-to-set-pageload-timeout-for-selenium-with-behat/
177+
178+
]);
173179
}
174180

175181
/**
@@ -217,6 +223,14 @@ public function iFillInWithAValidPassword($arg1)
217223
{
218224
$this->fillField($arg1, $this->params['admin_password']);
219225
}
226+
227+
/**
228+
* @Given I refresh the page
229+
*/
230+
public function iRefreshThePage()
231+
{
232+
$this->getSession()->getDriver()->reload();
233+
}
220234

221235
/**
222236
* @When /^I fill in "([^"]*)" with an email address$/

tests/features/getting-started/menu.feature

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Feature: Navigate the app using the menu
77

88
Scenario Outline: Use main menu navigation links
99
Given I have logged in as an administrator
10+
Given I follow "Dashboard"
1011
Then I should see "<Pagename>"
1112
Examples:
1213
| Pagename |
@@ -21,7 +22,6 @@ Feature: Navigate the app using the menu
2122
Then I should see "logout"
2223
Then I should see "Dashboard"
2324

24-
2525
Scenario Outline: Browse Subscribers menu
2626
Given I have logged in as an administrator
2727
Given I follow "Subscribers"
@@ -75,8 +75,10 @@ Feature: Navigate the app using the menu
7575
| Send the queue |
7676
| Rebuild DB indexes |
7777
| system |
78+
7879
Scenario Outline: Browse Config menu
7980
Given I have logged in as an administrator
81+
Given I follow "Dashboard"
8082
Given I follow "Config"
8183
Then I should see "<Innerpages>"
8284
Examples:

tests/features/managing-campaigns/newcampaign.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@ Feature: Create new campaign
1919
And I press "Save and continue editing"
2020
Then I should see "This is the Content of the Campaign"
2121
When I follow "Scheduling"
22+
And I refresh the page
2223
Then I should see "Embargoed Until"
2324
When I follow "Lists"
25+
And I refresh the page
2426
Then I should see "Please select the lists you want to send your campaign to"
2527
And I should see "All Lists"
2628
When I check "targetlist[all]"
2729
And I press "Save and continue editing"
30+
And I refresh the page
2831
Then I should see "selected"
2932
When I follow "Finish"
3033
And I press "send"

0 commit comments

Comments
 (0)