diff --git a/.github/workflows/milolib.yml b/.github/workflows/milolib.yml new file mode 100644 index 00000000..78a3e688 --- /dev/null +++ b/.github/workflows/milolib.yml @@ -0,0 +1,52 @@ +name: Run Nala on Milo Libs Manually + +on: + workflow_dispatch: + inputs: + branch: + description: 'Provide the branch url' + required: false + type: string + milolibs: + description: 'Provide MiloLibs param' + required: false + type: string + tags: + description: 'Test scenario tags, if empty all tests will run. i.e., @marquee' + required: false + type: string + platform: + description: 'Platform to run tests on; select one, options: [ubuntu-latest, windows-latest, macos-latest]' + required: true + type: string + +jobs: + action: + name: Running tests + runs-on: ${{ inputs.platform }} + + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Set permissions + run: chmod +x ./path/to/run.sh + - name: Set environment variables + run: | + echo "PR_BRANCH_LIVE_URL_GH=${{ github.event.inputs.branch }}" >> $GITHUB_ENV + echo "MILO_LIBS=${{ github.event.inputs.milolibs }}" >> $GITHUB_ENV + + - name: Run Nala ${{ inputs.platform }} + uses: ./ + env: + labels: ${{ inputs.tags }} + IMS_EMAIL: ${{ secrets.IMS_EMAIL }} + IMS_PASS: ${{ secrets.IMS_PASS }} + HLX_TKN: ${{ secrets.HLX_TKN }} + SLACK_WH: ${{ secrets.SLACK_WH }} + - name: Persist JSON Artifact + uses: actions/upload-artifact@v3 + if: always() + with: + name: nala-results + path: nala-results.json + retention-days: 30 diff --git a/tests/milo/accordion.block.test.js b/tests/milo/accordion.block.test.js index efdda553..b57b5cda 100644 --- a/tests/milo/accordion.block.test.js +++ b/tests/milo/accordion.block.test.js @@ -6,6 +6,7 @@ import AccordionBlock from '../../selectors/milo/accordion.block.page.js'; let webUtil; let accordion; let consoleErrors = []; +let miloLib = '?milolibs=stage'; const knownConsoleErrors = ['Access-Control-Allow-Origin','Failed to load resource: net::ERR_FAILED']; test.describe('Milo Accordion Block test suite', () => { @@ -26,13 +27,13 @@ test.describe('Milo Accordion Block test suite', () => { // Test 0 : Accordion test(`${features[0].name},${features[0].tags}`, async ({ page, baseURL }) => { - console.info(`[Test Page]: ${baseURL}${features[0].path}`); + console.info(`[Test Page]: ${baseURL}${features[0].path}${miloLib}`); const { data } = features[0]; await test.step('step-1: Go to Accordion block test page', async () => { - await page.goto(`${baseURL}${features[0].path}`); + await page.goto(`${baseURL}${features[0].path}${miloLib}`); await page.waitForLoadState('domcontentloaded'); - await expect(page).toHaveURL(`${baseURL}${features[0].path}`); + await expect(page).toHaveURL(`${baseURL}${features[0].path}${miloLib}`); }); await test.step('step-2: Verify Accrodion block content/specs', async () => {