diff --git a/.github/workflows/e2e-functional.yml b/.github/workflows/e2e-functional.yml index d625be37..5e0aa731 100644 --- a/.github/workflows/e2e-functional.yml +++ b/.github/workflows/e2e-functional.yml @@ -39,7 +39,7 @@ env: MM_TEST_SERVER_URL: ${{ secrets.MM_DESKTOP_E2E_SERVER_URL }} MM_TEST_USER_NAME: ${{ secrets.MM_DESKTOP_E2E_USER_NAME }} MM_TEST_PASSWORD: ${{ secrets.MM_DESKTOP_E2E_USER_CREDENTIALS }} - PULL_REQUEST_BASE_URL: "https://github.com/mattermost/desktop/pull/" + PULL_REQUEST: "https://github.com/mattermost/desktop/pull/${{ github.event.number }}" ZEPHYR_ENVIRONMENT_NAME: 'Desktop app' ZEPHYR_FOLDER_ID: "3256491" TEST_CYCLE_LINK_PREFIX: ${{ secrets.MM_DESKTOP_E2E_TEST_CYCLE_LINK_PREFIX }} @@ -75,7 +75,7 @@ jobs: - name: ci/checkout-repo uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - name: ci/setup-node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version-file: "package.json" cache: "npm" @@ -147,7 +147,7 @@ jobs: - name: ci/checkout-repo uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - name: ci/setup-node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version-file: "package.json" cache: "npm" @@ -232,7 +232,7 @@ jobs: - name: ci/checkout-repo uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - name: ci/setup-node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + uses: actions/setup-node@v4 with: node-version-file: "package.json" cache: "npm" diff --git a/e2e/utils/test_cases.js b/e2e/utils/test_cases.js index 561e5658..34dcc246 100644 --- a/e2e/utils/test_cases.js +++ b/e2e/utils/test_cases.js @@ -83,13 +83,36 @@ function saveToEndpoint(url, data) { }); } +async function getZEPHYRFolderID() { + const { + ZEPHYR_FOLDER_ID, + } = process.env; + const platform = os.platform(); + let folderID; + + switch (platform) { + case 'darwin': + folderID = 12358650; + break; + case 'win32': + folderID = 12358651; + break; + case 'linux': + folderID = 12358649; + break; + default: + folderID = ZEPHYR_FOLDER_ID; + } + + return folderID; +} + async function createTestCycle(startDate, endDate) { const { BRANCH, BUILD_ID, JIRA_PROJECT_KEY, ZEPHYR_CYCLE_NAME, - ZEPHYR_FOLDER_ID, } = process.env; const testCycle = { @@ -99,7 +122,7 @@ async function createTestCycle(startDate, endDate) { plannedStartDate: startDate, plannedEndDate: endDate, statusName: 'Done', - folderId: ZEPHYR_FOLDER_ID, + folderId: getZEPHYRFolderID(), }; const response = await saveToEndpoint('https://api.zephyrscale.smartbear.com/v2/testcycles', testCycle);