Skip to content

Commit

Permalink
Jenkinsfile,testsuite: Improve sat UI tests
Browse files Browse the repository at this point in the history
* save UI test artifacts on failure
* execute tests with `-count 1` so that they are never cached (test
  should run even if no changes are made to testsuite/playwright-ui)
* fix failing UI tests
* bump allowed time for single playwright test

Change-Id: I753706c58316a6534121839a7f6667f49fd7d764
  • Loading branch information
mobyvb committed Mar 13, 2024
1 parent e05d427 commit 9a87a1c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Jenkinsfile.verify
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ pipeline {
sh 'cockroach sql --insecure --host=localhost:26256 -e \'create database uitestcockroach;\''
sh 'make test-satellite-ui'
}

post {
failure {
sh script: 'tar -zcvf .build/test-results.tar.gz ./testsuite/playwright-ui/test-results/'
archiveArtifacts artifacts: '.build/test-results.tar.gz'
}
}
}

stage('Tests') {
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ test-satellite-ui: ## Run playwright ui tests
npx playwright install;\
npx playwright install-deps;\
STORJ_TEST_SATELLITE_WEB='../../web/satellite' \
go test ./... -run TestRun
go test ./... -run TestRun -count 1


.PHONY: check-monitoring
Expand Down
2 changes: 1 addition & 1 deletion testsuite/playwright-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "npx playwright test ./tests/",
"test-debug": "DEBUG=pw:browser* npx playwright test ./tests/bucket.test.ts --trace on",
"test-dev": "npm run prerun-dev && npx playwright test ./tests/ --headed --project=chromium-hd --trace on",
"test-ci": "PW_TEST_HTML_REPORT_OPEN=never npx playwright test ./tests/"
"test-ci": "PW_TEST_HTML_REPORT_OPEN=never npx playwright test ./tests/ --trace on"
},
"license": "ISC",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
export class BucketsPageObjects {
static NEW_BUCKET_BUTTON_XPATH = `//button[span[text()=' New Bucket ']]`;
static BUCKET_NAME_INPUT_FIELD_XPATH = `//input[@id='Bucket Name']`;
static CONFIRM_BUTTON_CREATE_BUCKET_FLOW_XPATH = `//button[span[text()=' Create Bucket ']]`;
static CONFIRM_BUTTON_CREATE_BUCKET_FLOW_XPATH = `//button[span[text()='Create Bucket']]`;
static BUCKET_ROW_MORE_BUTTON_XPATH = `//button[@title='Bucket Actions']`;
static VIEW_BUCKET_DETAILS_BUTTON_XPATH = `//div[div[div[text()=' Bucket Details ']]]`;
static SHARE_BUCKET_BUTTON_XPATH = `//div[div[div[text()=' Share Bucket ']]]`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class SignupPageObjects {
static INPUT_RETYPE_PASSWORD_XPATH = `//input[@id='Retype Password']`;
static TOS_CHECKMARK_XPATH = `//input[@id='Terms checkbox']`;
static CREATE_ACCOUNT_BUTTON_XPATH = `//button[span[text()=' Create your account ']]`;
static HEADER_TEXT_XPATH = `//h1[contains(text(),'Start using Storj today')]`;
static HEADER_TEXT_XPATH = `//h1[.='Start using Storj today.']`;
static SUBHEADER_TEXT_XPATH = `//p[contains(text(),'Whether migrating your data or just testing out')]`;

// SIGNUP SUCCESS PAGE
Expand Down
2 changes: 1 addition & 1 deletion testsuite/playwright-ui/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default defineConfig({
],
retries: process.env.CI ? 1 : 0, // Retry on CI only.
testDir: './tests', // Directory where tests are located.
timeout: 20 * 1000, // Maximum time one test can run for.
timeout: 30 * 1000, // Maximum time one test can run for.
use: {
actionTimeout: 0, // Maximum time each action can take.
// baseURL: 'http://127.0.0.1:10000',
Expand Down

0 comments on commit 9a87a1c

Please sign in to comment.