Skip to content

Commit

Permalink
Tests: Add workflow (#4523)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike10ca authored Nov 15, 2024
1 parent fe37198 commit a7f6ac2
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 42 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/e2e-full-ondemand.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Full Regression on demand tests

on:
workflow_dispatch:
schedule:
- cron: '0 4 * * 1-5'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
e2e:
runs-on: ubuntu-20.04
timeout-minutes: 40
name: Cypress Full Regression on demand tests
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4

- uses: ./.github/workflows/cypress
with:
secrets: ${{ toJSON(secrets) }}
spec: |
cypress/e2e/happypath_2/*.cy.js
cypress/e2e/regression/*.cy.js
cypress/e2e/safe-apps/*.cy.js
cypress/e2e/smoke/*.cy.js
group: 'Full Regression on demand tests'
tag: 'full_regression'

- name: Python setup
if: always()
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install junitparser
if: always()
run: |
pip install junitparser
- name: Merge JUnit reports for TestRail
if: always()
run: |
junitparser merge --suite-name "Root Suite" --glob "reports/junit-*" "reports/junit-report.xml"
- name: TestRail CLI upload results
if: always()
run: |
pip install trcli
if ! trcli -y \
-h https://gno.testrail.io/ \
--project "Safe- Web App" \
--username ${{ secrets.TESTRAIL_USERNAME }} \
--password ${{ secrets.TESTRAIL_PASSWORD }} \
parse_junit \
--title "Full Regression Automated Tests, branch: ${GITHUB_REF_NAME}" \
--run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
-f "reports/junit-report.xml"; then
echo -e "\e[41;32mTestRail upload failed. Pipeline will continue, please check the upload process.\e[0m"
fi
2 changes: 1 addition & 1 deletion .github/workflows/e2e-hp-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ jobs:
--username ${{ secrets.TESTRAIL_USERNAME }} \
--password ${{ secrets.TESTRAIL_PASSWORD }} \
parse_junit \
--title "Happy path Tests, branch: ${GITHUB_REF_NAME}" \
--title "Happy Path Automated Tests, branch: ${GITHUB_REF_NAME}" \
--run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
-f "reports/junit-report.xml"
4 changes: 1 addition & 3 deletions .github/workflows/e2e-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Regression on demand tests

on:
workflow_dispatch:
schedule:
- cron: '0 4 * * 1-5'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -57,7 +55,7 @@ jobs:
--username ${{ secrets.TESTRAIL_USERNAME }} \
--password ${{ secrets.TESTRAIL_PASSWORD }} \
parse_junit \
--title "Automated Tests, branch: ${GITHUB_REF_NAME}" \
--title "Regression Automated Tests, branch: ${GITHUB_REF_NAME}" \
--run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
-f "reports/junit-report.xml"; then
echo -e "\e[41;32mTestRail upload failed. Pipeline will continue, please check the upload process.\e[0m"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-prod-ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
--username ${{ secrets.TESTRAIL_USERNAME }} \
--password ${{ secrets.TESTRAIL_PASSWORD }} \
parse_junit \
--title "Automated Tests, branch: ${GITHUB_REF_NAME}" \
--title "Production Health Checks Automated Tests, branch: ${GITHUB_REF_NAME}" \
--run-description ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
-f "reports/junit-report.xml"; then
echo -e "\e[41;32mTestRail upload failed. Pipeline will continue, please check the upload process.\e[0m"
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/e2e-regression.yml

This file was deleted.

7 changes: 0 additions & 7 deletions cypress/e2e/pages/nfts.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,4 @@ export function clikOnNextBtn() {
export function verifyReviewModalData(NFTcount) {
main.verifyElementsExist([nftItemList])
main.verifyElementsCount(nftItemNane, NFTcount)

if (NFTcount > 1) {
const numbersArr = Array.from({ length: NFTcount }, (_, index) => index + 1)
numbersArr.forEach((number) => {
cy.contains(number.toString()).scrollIntoView().should('be.visible')
})
}
}
3 changes: 2 additions & 1 deletion cypress/e2e/regression/multichain_setup.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ describe('Multichain setup tests', { defaultCommandTimeout: 30000 }, () => {
})

it('Verify warning on swap owner for one safe in the group', () => {
cy.visit(constants.setupUrl + `sep:${safe}`)
let safe = main.changeSafeChainName(staticSafes.MATIC_STATIC_SAFE_28, 'sep')
cy.visit(constants.setupUrl + safe)
owner.waitForConnectionStatus()
owner.openReplaceOwnerWindow(1)
owner.typeOwnerAddress(constants.SEPOLIA_OWNER_2)
Expand Down

0 comments on commit a7f6ac2

Please sign in to comment.