From 3650312da5ffbfdd0985465b2b7926026ff618bd Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 14 Dec 2023 13:20:09 -0600 Subject: [PATCH 01/33] add action to push images to conda store --- .github/workflows/push_images.yml | 98 +++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .github/workflows/push_images.yml diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml new file mode 100644 index 00000000..cb9bc317 --- /dev/null +++ b/.github/workflows/push_images.yml @@ -0,0 +1,98 @@ +# This workflow collects screenshots which have stored as artifacts in test.yml +# and opens a PR on conda-store to update the docs. +# +# There are two ways to trigger this workflow: +# 1. Trigger by adding the `update_screenshots` label. +# The workflow will run immediately after you add the label. It is +# also expecting artifacts which have been generated in test.yml. +# Therefore, this cannot be triggered until test.yml is complete. +# 2. Trigger by workflow dispatch. +# Specify the PR number with the artifacts you'd like to use. +# Again, the test.yml workflow must be complete. +# +# If a PR has already been opened on the conda-store repo from this +# action, a rerun of this action will attempt to update the PR, not +# create a new one. + +name: Push screenshots to conda-store docs + +on: + pull_request: + types: [labeled] + workflow_dispatch: + inputs: + pr_number: + description: "PR Number with screenshots to push" + required: true + +jobs: + update_screenshots: + name: "update_screenshots" + runs-on: ubuntu-latest + defaults: + run: + shell: bash -el {0} + if: ${{ github.event.label.name == 'update_screenshots' && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} + steps: + - name: "Checkout the conda-store repository 🛎" + uses: actions/checkout@v4 + with: + path: conda-store-repo + repository: 'conda-incubator/conda-store' + + - name: Use this PR number or the one specified in workflow dispatch + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + my_variable=${{ inputs.pr_number }} + else + PR_NUMBER=${{github.event.pull_request.number}} + fi + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV + + - name: Download artifact images - will fail if artifact doesn't exist yet + id: download-artifact + uses: dawidd6/action-download-artifact@v3 + with: + # Optional, GitHub token, a Personal Access Token with `public_repo` scope if needed + # Required, if the artifact is from a different repo + # Required, if the repo is private a Personal Access Token with `repo` scope is needed or GitHub token in a job where the permissions `action` scope set to `read` + github_token: ${{ secrets.GITHUB_TOKEN }} + # workflow file name from which to get the artifact + workflow: on_pr.yml + # PR from which to get the artifact + pr: ${{ env.PR_NUMBER }} + # how to exit the action if no artifact is found + if_no_artifact_found: fail + + - name: "ls" + run: | + ls + pwd + + - name: "Copy images to other repo" + run: | + cd conda-store-repo + cp ../playwright-tests/test-results/* . + + git config user.name ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + git config user.email 'noreply@github.com' + git add -A + git commit -m "commit all changes" + + - name: "Create PR on conda-store with updated screenshots" + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.PAT }} + path: conda-store-repo + commit-message: Update screenshots + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + branch: update_screenshots + delete-branch: true + title: '[AUTO] Update screenshots' + body: | + Update screenshots + - Updated with the latest images from playwright generated in PR ${{ env.PR_NUMBER }} + - Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request From 0b4b170922121badc03c7dd8f0f952e780431980 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 14 Dec 2023 13:38:55 -0600 Subject: [PATCH 02/33] correct source wf name --- .github/workflows/push_images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index cb9bc317..012d5394 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -58,7 +58,7 @@ jobs: # Required, if the repo is private a Personal Access Token with `repo` scope is needed or GitHub token in a job where the permissions `action` scope set to `read` github_token: ${{ secrets.GITHUB_TOKEN }} # workflow file name from which to get the artifact - workflow: on_pr.yml + workflow: test.yml # PR from which to get the artifact pr: ${{ env.PR_NUMBER }} # how to exit the action if no artifact is found From 3b643e114d520722070373a2bbd2ae73d11f130a Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 14 Dec 2023 13:47:38 -0600 Subject: [PATCH 03/33] remove extra folder from artifact contents --- .github/workflows/push_images.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 012d5394..9e08191d 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -68,11 +68,12 @@ jobs: run: | ls pwd + ls conda-store-repo - name: "Copy images to other repo" run: | cd conda-store-repo - cp ../playwright-tests/test-results/* . + cp ../playwright-tests/* . git config user.name ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> git config user.email 'noreply@github.com' From f4cf7777ab812505e04c2c2f0b730f86c592e7aa Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 14 Dec 2023 14:01:59 -0600 Subject: [PATCH 04/33] only grab pngs from artifact, pick a folder in conda-store to put them in --- .github/workflows/push_images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 9e08191d..d66d02f6 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -73,7 +73,7 @@ jobs: - name: "Copy images to other repo" run: | cd conda-store-repo - cp ../playwright-tests/* . + cp ../playwright-tests/*.png docusaurus-docs/conda-store-ui/images/. git config user.name ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> git config user.email 'noreply@github.com' From fdf2dba68eb179f6de58d79430220e46d47c224e Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 14 Dec 2023 14:09:43 -0600 Subject: [PATCH 05/33] cant have empty lines in bash script? --- .github/workflows/push_images.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index d66d02f6..f82e6127 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -74,7 +74,6 @@ jobs: run: | cd conda-store-repo cp ../playwright-tests/*.png docusaurus-docs/conda-store-ui/images/. - git config user.name ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> git config user.email 'noreply@github.com' git add -A From d021fcc86e032c2982b25fd8316591f5e0c9c07f Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 14 Dec 2023 14:24:15 -0600 Subject: [PATCH 06/33] can't use greater than less than --- .github/workflows/push_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index f82e6127..980de10d 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -74,8 +74,8 @@ jobs: run: | cd conda-store-repo cp ../playwright-tests/*.png docusaurus-docs/conda-store-ui/images/. - git config user.name ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - git config user.email 'noreply@github.com' + git config user.name ${{ github.actor }} + git config user.email '${{ github.actor }}@users.noreply.github.com' git add -A git commit -m "commit all changes" From 216df06144d84716fc4e913a27cecf24dbf25263 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 2 Jan 2024 12:23:22 -0600 Subject: [PATCH 07/33] update secrets and trigger on comment --- .github/workflows/push_images.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 980de10d..60dc6d2d 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -17,8 +17,8 @@ name: Push screenshots to conda-store docs on: - pull_request: - types: [labeled] + issue_comment: + types: [created, edited] workflow_dispatch: inputs: pr_number: @@ -32,7 +32,7 @@ jobs: defaults: run: shell: bash -el {0} - if: ${{ github.event.label.name == 'update_screenshots' && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} + if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update screenshots') || github.event_name == 'workflow_dispatch' }} steps: - name: "Checkout the conda-store repository 🛎" uses: actions/checkout@v4 @@ -82,7 +82,7 @@ jobs: - name: "Create PR on conda-store with updated screenshots" uses: peter-evans/create-pull-request@v5 with: - token: ${{ secrets.PAT }} + token: ${{ secrets.conda-store-ui-ghaction }} path: conda-store-repo commit-message: Update screenshots committer: GitHub From 11c9a571f9b0558834cbaa5919e7ff26ebe34c98 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 2 Jan 2024 12:43:31 -0600 Subject: [PATCH 08/33] add label trigger back temporarily --- .github/workflows/push_images.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 60dc6d2d..a50d97c1 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -17,6 +17,8 @@ name: Push screenshots to conda-store docs on: + pull_request: + types: [labeled] issue_comment: types: [created, edited] workflow_dispatch: @@ -32,7 +34,7 @@ jobs: defaults: run: shell: bash -el {0} - if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'please update screenshots') || github.event_name == 'workflow_dispatch' }} + if: ${{ github.event.issue.pull_request && (contains(github.event.comment.body, 'please update screenshots') || github.event_name == 'workflow_dispatch' || github.event.label.name == 'update_screenshots' ) }} steps: - name: "Checkout the conda-store repository 🛎" uses: actions/checkout@v4 From bce85f95e844e624ecb0f660e683cc962e749b5a Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 2 Jan 2024 12:56:20 -0600 Subject: [PATCH 09/33] add label trigger back temporarily --- .github/workflows/push_images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index a50d97c1..39427dbf 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -34,7 +34,7 @@ jobs: defaults: run: shell: bash -el {0} - if: ${{ github.event.issue.pull_request && (contains(github.event.comment.body, 'please update screenshots') || github.event_name == 'workflow_dispatch' || github.event.label.name == 'update_screenshots' ) }} + if: ${{ github.event.issue.pull_request && github.event.label.name == 'update_screenshots' || github.event_name == 'workflow_dispatch' }} steps: - name: "Checkout the conda-store repository 🛎" uses: actions/checkout@v4 From 77f46d76a4064a97eedbdf8fd2ec549c664153e5 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 2 Jan 2024 13:05:51 -0600 Subject: [PATCH 10/33] add label trigger back temporarily --- .github/workflows/push_images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 39427dbf..96bbfc4d 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -34,7 +34,7 @@ jobs: defaults: run: shell: bash -el {0} - if: ${{ github.event.issue.pull_request && github.event.label.name == 'update_screenshots' || github.event_name == 'workflow_dispatch' }} + if: ${{ github.event.label.name == 'update_screenshots' && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} steps: - name: "Checkout the conda-store repository 🛎" uses: actions/checkout@v4 From b8ed999de32af40b44034c00d11ef6bb4186e23d Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 2 Jan 2024 13:16:56 -0600 Subject: [PATCH 11/33] fix typo in secret --- .github/workflows/push_images.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 96bbfc4d..af40489c 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -82,9 +82,10 @@ jobs: git commit -m "commit all changes" - name: "Create PR on conda-store with updated screenshots" + id: create-pull-request uses: peter-evans/create-pull-request@v5 with: - token: ${{ secrets.conda-store-ui-ghaction }} + token: ${{ secrets.CONDA_STORE_SYNC }} path: conda-store-repo commit-message: Update screenshots committer: GitHub @@ -98,3 +99,9 @@ jobs: - Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request + + - name: Check outputs + if: ${{ steps.create-pull-request.outputs.pull-request-number }} + run: | + echo "Pull Request Number - ${{ steps.create-pull-request.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.create-pull-request.outputs.pull-request-url }}" From 0e4dbf958956e1e9c528c1eec960cff01cb98612 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 2 Jan 2024 13:28:26 -0600 Subject: [PATCH 12/33] post a comment back to the PR with an update --- .github/workflows/push_images.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index af40489c..ffd40d33 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -100,8 +100,10 @@ jobs: [1]: https://github.com/peter-evans/create-pull-request - - name: Check outputs + - name: Comment back on the PR if: ${{ steps.create-pull-request.outputs.pull-request-number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo "Pull Request Number - ${{ steps.create-pull-request.outputs.pull-request-number }}" - echo "Pull Request URL - ${{ steps.create-pull-request.outputs.pull-request-url }}" + gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --raw-field 'body=A PR to conda-store has been opened with updated screenshots - ${{ steps.create-pull-request.outputs.pull-request-url }}' + From 8be4e8407e7c30424809e20abcc974e95bfc02f1 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Fri, 5 Jan 2024 15:28:37 -0600 Subject: [PATCH 13/33] add all existing doc images --- .github/workflows/push_images.yml | 7 +-- test/playwright/test_ux.py | 77 ++++++++++++++++++++++++------- 2 files changed, 65 insertions(+), 19 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index ffd40d33..2aaba0c5 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -9,6 +9,7 @@ # 2. Trigger by workflow dispatch. # Specify the PR number with the artifacts you'd like to use. # Again, the test.yml workflow must be complete. +# 3. By commenting on the PR `please update screenshots`. # # If a PR has already been opened on the conda-store repo from this # action, a rerun of this action will attempt to update the PR, not @@ -34,7 +35,7 @@ jobs: defaults: run: shell: bash -el {0} - if: ${{ github.event.label.name == 'update_screenshots' && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} + if: ${{ github.event.label.name == 'update_screenshots' && github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || (github.event.issue.pull_request && contains(github.event.comment.body, 'please update screenshots')) }} steps: - name: "Checkout the conda-store repository 🛎" uses: actions/checkout@v4 @@ -101,9 +102,9 @@ jobs: [1]: https://github.com/peter-evans/create-pull-request - name: Comment back on the PR - if: ${{ steps.create-pull-request.outputs.pull-request-number }} + if: ${{ steps.create-pull-request.outputs.pull-request-number }} && github.event_name == 'pull_request' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --raw-field 'body=A PR to conda-store has been opened with updated screenshots - ${{ steps.create-pull-request.outputs.pull-request-url }}' + gh api repos/${{ github.repository }}/issues/${{ env.PR_NUMBER }}/comments --raw-field 'body=A PR to conda-store has been opened with updated screenshots - ${{ steps.create-pull-request.outputs.pull-request-url }}' diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 46355617..bee1cb4a 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -48,23 +48,25 @@ def _login_sequence(page, screenshot=False): grab screenshots """ # Log in sequence + if screenshot: + page.screenshot(path="test-results/login.png") # Click Login page.locator("text=Log in").click() - if screenshot: - page.screenshot(path="test-results/conda-store-login_screen.png") - # Fill in the Username field page.locator('[placeholder="Username"]').fill("username") # Fill in the Password field page.locator('[placeholder="Password"]').fill("password") + if screenshot: + page.screenshot(path="test-results/authentication.png") + with page.expect_navigation(): page.locator('button:has-text("Sign In")').click() - if screenshot: - page.screenshot(path="test-results/conda-store-authenticated.png") + # if screenshot: + # page.screenshot(path="test-results/conda-store-authenticated.png") def _create_new_environment(page, screenshot=False): @@ -89,40 +91,77 @@ def _create_new_environment(page, screenshot=False): # ensure new filename in case this test is run multiple times new_env_name = f'test_env_{random.randint(0, 100000)}' # set timeout for building the environment - time_to_build_env = 2 * 60 * 1000 # 2 minutes in milliseconds + time_to_build_env = 3 * 60 * 1000 # 3 minutes in milliseconds # Create the new environment # click the + to create a new env page.get_by_label("Create a new environment in the username namespace").click() if screenshot: - page.screenshot(path="test-results/conda-store-new-env.png") + page.screenshot(path="test-results/create-new-env.png", clip={'x': 0, 'y': 145, 'width': 275, 'height': 50}) + # page.screenshot(path="test-results/conda-store-new-env.png", full_page=True) # fill in the env name page.get_by_placeholder("Environment name").fill(new_env_name) # fill in the description page.get_by_placeholder("Enter here the description of your environment").fill("description") + if screenshot: + page.screenshot(path="test-results/add-package-button.png", clip={'x': 300, 'y': 385, 'width': 425, 'height': 170}) + page.screenshot(path="test-results/name-description.png") # click the + to add a package page.get_by_role("button", name="+ Add Package").click() # add a package to the ui page.get_by_label("Enter package").fill("rich") + if screenshot: + page.screenshot(path="test-results/package-selection.png") page.get_by_role("option", name="rich", exact=True).click() + + # add version spec + page.get_by_role("row", name="rich ​ ​").get_by_role("button").first.click() + + if screenshot: + page.screenshot(path="test-results/package-version-constraint.png") + page.get_by_role("option", name=">", exact=True).click() + page.get_by_role("cell", name="> ​").get_by_role("button").nth(1).click() + if screenshot: + page.screenshot(path="test-results/package-version-number.png") + page.get_by_role("option", name="12.6.0").click() + # open up the channels accordian card page.get_by_role("button", name="Channels").click() # click the + to add a channel page.get_by_role("button", name="+ Add Channel").click() # fill in conda-forge as the new channel name page.get_by_label("Enter channel").fill("conda-forge") + if screenshot: + page.screenshot(path="test-results/add-channel.png", clip={'x': 300, 'y': 440, 'width': 425, 'height': 202}) # press enter to submit the channel to the list page.get_by_label("Enter channel").press("Enter") + # switch to yaml editor + page.get_by_label("YAML").check() + if screenshot: + page.screenshot(path="test-results/yaml-editor.png") + # switch back + page.get_by_label("Standard").check() + + if screenshot: + page.screenshot(path="test-results/create-button.png") # click create to start building the env page.get_by_role("button", name="Create", exact=True).click() - + # Interact with the environment shortly after creation # click to open the Active environment dropdown manu page.get_by_role("button", name=" - Active", exact=False).click() + if screenshot: + page.keyboard.press("PageUp") # ensure we are at the top of the page + page.screenshot(path="test-results/version-select.png") # click on the Active environment on the dropdown menu item (which is currently building) page.get_by_role("option", name=" - Active", exact=False).click() + if screenshot: + page.screenshot(path="test-results/version-select-done.png") # ensure that the environment is building expect(page.get_by_text("Building")).to_be_visible() + if screenshot: + page.keyboard.press("PageUp") # ensure we are at the top of the page + page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 100}) # wait until the status is `Completed` completed = page.get_by_text("Completed", exact=False) completed.wait_for(state='attached', timeout=time_to_build_env) @@ -145,9 +184,9 @@ def _close_environment_tabs(page): close_tab.first.click() -def _existing_environment_interactions(page, env_name, time_to_build_env=3*60*1000, screenshot=False): +def _existing_environment_interactions(page, env_name, time_to_build_env=4*60*1000, screenshot=False): """test interactions with existing environments. - During this test, the test will be rebuilt twice. + During this test, the env will be rebuilt twice. Note: This test assumes the environment being tested is the one from `_create_new_environment`. Changes to that method will require changes @@ -168,12 +207,19 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=3*60*10 """ # edit existing environment throught the YAML editor page.get_by_role("button", name=env_name).click() + if screenshot: + page.keyboard.press("PageUp") # ensure we are at the top of the page + page.screenshot(path="test-results/edit-env.png") page.get_by_role("button", name="Edit").click() + if screenshot: + page.screenshot(path="test-results/switch-to-yaml.png", clip={'x': 280, 'y': 385, 'width': 985, 'height': 75}) + page.keyboard.press("PageDown") # ensure we are at the bottom of the page + page.screenshot(path="test-results/delete-env.png") page.get_by_label("YAML").check() if screenshot: - page.screenshot(path="test-results/conda-store-yaml-editor.png") - page.get_by_text("- rich").click() - page.get_by_text("channels: - conda-forgedependencies: - rich - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich\n - python\n - pip:\n - nothing\n - ipykernel\n\n") + page.screenshot(path="test-results/pip-section.png") + page.get_by_text("- rich").click() # bring focus to the section + page.get_by_text("channels: - conda-forgedependencies: - rich>12.6.0 - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.6.0\n - python\n - pip:\n - ragna\n - ipykernel\n\n") page.get_by_role("button", name="Save").click() # wait until the status is `Completed` completed = page.get_by_text("Completed", exact=False) @@ -270,7 +316,6 @@ def test_integration(page: Page, test_config, screenshot): # Go to http://localhost:{server_port} page.goto(test_config['base_url'], wait_until="domcontentloaded", timeout=4*60*1000) - page.screenshot(path="test-results/conda-store-unauthenticated.png") if screenshot: page.screenshot(path="test-results/conda-store-unauthenticated.png") @@ -298,7 +343,7 @@ def test_integration(page: Page, test_config, screenshot): 'password': CONDA_STORE_PASSWORD, 'server_port': CONDA_STORE_SERVER_PORT, } - screenshot = False + screenshot = True # ######################################################################## # Start playwright and setup @@ -313,7 +358,7 @@ def test_integration(page: Page, test_config, screenshot): page.goto(config['base_url'], wait_until="domcontentloaded") # Log in to conda-store - _login_sequence(page) + _login_sequence(page, screenshot=screenshot) # create a new environment env_name = _create_new_environment(page, screenshot=screenshot) From a4cdf3ad6b41161ba1e6b6bf396a00412f5da9ba Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Mon, 8 Jan 2024 12:27:37 -0600 Subject: [PATCH 14/33] loosen yaml switch locator --- test/playwright/test_ux.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index bee1cb4a..7ac9d4bb 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -65,9 +65,6 @@ def _login_sequence(page, screenshot=False): with page.expect_navigation(): page.locator('button:has-text("Sign In")').click() - # if screenshot: - # page.screenshot(path="test-results/conda-store-authenticated.png") - def _create_new_environment(page, screenshot=False): """Workflow to create a new environment in the UI. The env will be @@ -98,7 +95,6 @@ def _create_new_environment(page, screenshot=False): page.get_by_label("Create a new environment in the username namespace").click() if screenshot: page.screenshot(path="test-results/create-new-env.png", clip={'x': 0, 'y': 145, 'width': 275, 'height': 50}) - # page.screenshot(path="test-results/conda-store-new-env.png", full_page=True) # fill in the env name page.get_by_placeholder("Environment name").fill(new_env_name) # fill in the description @@ -136,11 +132,11 @@ def _create_new_environment(page, screenshot=False): # press enter to submit the channel to the list page.get_by_label("Enter channel").press("Enter") # switch to yaml editor - page.get_by_label("YAML").check() + page.get_by_label("YAML").click() if screenshot: page.screenshot(path="test-results/yaml-editor.png") # switch back - page.get_by_label("Standard").check() + page.get_by_label("Standard", exact=False).click() if screenshot: page.screenshot(path="test-results/create-button.png") From fe795f2429ba50ec11271d98fcefefbb50692305 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 9 Jan 2024 11:52:33 -0600 Subject: [PATCH 15/33] add video --- .gitignore | 1 + test/playwright/conftest.py | 10 +++++-- test/playwright/test_ux.py | 58 ++++++++++++++++++------------------- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index df3627e3..79ffcb02 100644 --- a/.gitignore +++ b/.gitignore @@ -152,6 +152,7 @@ src/version.ts # playwright screenshots static +test-results/* # yarn diff --git a/test/playwright/conftest.py b/test/playwright/conftest.py index c7737983..febff585 100644 --- a/test/playwright/conftest.py +++ b/test/playwright/conftest.py @@ -1,8 +1,5 @@ import pytest -from playwright.sync_api import expect - - def pytest_addoption(parser): parser.addoption("--screenshots", action="store", default="false") @@ -13,3 +10,10 @@ def screenshot(pytestconfig): return False else: return True + +@pytest.fixture(scope="session") +def browser_context_args(browser_context_args): + return { + **browser_context_args, + "record_video_dir": "test-results/videos/", + } diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 7ac9d4bb..77eec966 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -136,32 +136,32 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/yaml-editor.png") # switch back - page.get_by_label("Standard", exact=False).click() + # page.get_by_label("Standard", exact=False).click() - if screenshot: - page.screenshot(path="test-results/create-button.png") - # click create to start building the env - page.get_by_role("button", name="Create", exact=True).click() - - # Interact with the environment shortly after creation - # click to open the Active environment dropdown manu - page.get_by_role("button", name=" - Active", exact=False).click() - if screenshot: - page.keyboard.press("PageUp") # ensure we are at the top of the page - page.screenshot(path="test-results/version-select.png") - # click on the Active environment on the dropdown menu item (which is currently building) - page.get_by_role("option", name=" - Active", exact=False).click() - if screenshot: - page.screenshot(path="test-results/version-select-done.png") - # ensure that the environment is building - expect(page.get_by_text("Building")).to_be_visible() - if screenshot: - page.keyboard.press("PageUp") # ensure we are at the top of the page - page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 100}) - # wait until the status is `Completed` - completed = page.get_by_text("Completed", exact=False) - completed.wait_for(state='attached', timeout=time_to_build_env) - expect(completed).to_be_visible() + # if screenshot: + # page.screenshot(path="test-results/create-button.png") + # # click create to start building the env + # page.get_by_role("button", name="Create", exact=True).click() + + # # Interact with the environment shortly after creation + # # click to open the Active environment dropdown manu + # page.get_by_role("button", name=" - Active", exact=False).click() + # if screenshot: + # page.keyboard.press("PageUp") # ensure we are at the top of the page + # page.screenshot(path="test-results/version-select.png") + # # click on the Active environment on the dropdown menu item (which is currently building) + # page.get_by_role("option", name=" - Active", exact=False).click() + # if screenshot: + # page.screenshot(path="test-results/version-select-done.png") + # # ensure that the environment is building + # expect(page.get_by_text("Building")).to_be_visible() + # if screenshot: + # page.keyboard.press("PageUp") # ensure we are at the top of the page + # page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 100}) + # # wait until the status is `Completed` + # completed = page.get_by_text("Completed", exact=False) + # completed.wait_for(state='attached', timeout=time_to_build_env) + # expect(completed).to_be_visible() return new_env_name @@ -321,11 +321,11 @@ def test_integration(page: Page, test_config, screenshot): # create a new environment env_name = _create_new_environment(page, screenshot=screenshot) - # close any open tabs on the conda-store ui - _close_environment_tabs(page) + # # close any open tabs on the conda-store ui + # _close_environment_tabs(page) - # interact with an existing environment - _existing_environment_interactions(page, env_name, screenshot=screenshot) + # # interact with an existing environment + # _existing_environment_interactions(page, env_name, screenshot=screenshot) if __name__ == "__main__": From c117a58a0343bb87b4de7c2ce74dffb3247d75ed Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 9 Jan 2024 11:56:29 -0600 Subject: [PATCH 16/33] separate artifacts for videos and screenshots --- .github/workflows/push_images.yml | 2 ++ .github/workflows/test.yml | 11 +++++++++-- test/playwright/conftest.py | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 2aaba0c5..741909dc 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -66,6 +66,8 @@ jobs: pr: ${{ env.PR_NUMBER }} # how to exit the action if no artifact is found if_no_artifact_found: fail + # artifact name + name: 'screenshots' - name: "ls" run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2efdaa7..b0aeafba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,9 +59,16 @@ jobs: run: | yarn run start & pytest --video on --output test-results --screenshots true test/playwright/test_ux.py - - name: "Upload artifacts" + - name: "Upload screenshot artifacts" uses: actions/upload-artifact@v3 if: ${{ always() }} with: - name: playwright-tests + name: screenshots path: test-results + + - name: "Upload video artifact" + uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: video + path: video diff --git a/test/playwright/conftest.py b/test/playwright/conftest.py index febff585..591bac44 100644 --- a/test/playwright/conftest.py +++ b/test/playwright/conftest.py @@ -15,5 +15,5 @@ def screenshot(pytestconfig): def browser_context_args(browser_context_args): return { **browser_context_args, - "record_video_dir": "test-results/videos/", + "record_video_dir": "video", } From dd715f4a67c7ae38fb6f018e4cb73ef5910ffe55 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 9 Jan 2024 12:03:50 -0600 Subject: [PATCH 17/33] update GUI/yaml switch name --- test/playwright/test_ux.py | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 77eec966..cb7f1705 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -136,32 +136,32 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/yaml-editor.png") # switch back - # page.get_by_label("Standard", exact=False).click() + page.get_by_label("GUI", exact=False).click() - # if screenshot: - # page.screenshot(path="test-results/create-button.png") - # # click create to start building the env - # page.get_by_role("button", name="Create", exact=True).click() - - # # Interact with the environment shortly after creation - # # click to open the Active environment dropdown manu - # page.get_by_role("button", name=" - Active", exact=False).click() - # if screenshot: - # page.keyboard.press("PageUp") # ensure we are at the top of the page - # page.screenshot(path="test-results/version-select.png") - # # click on the Active environment on the dropdown menu item (which is currently building) - # page.get_by_role("option", name=" - Active", exact=False).click() - # if screenshot: - # page.screenshot(path="test-results/version-select-done.png") - # # ensure that the environment is building - # expect(page.get_by_text("Building")).to_be_visible() - # if screenshot: - # page.keyboard.press("PageUp") # ensure we are at the top of the page - # page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 100}) - # # wait until the status is `Completed` - # completed = page.get_by_text("Completed", exact=False) - # completed.wait_for(state='attached', timeout=time_to_build_env) - # expect(completed).to_be_visible() + if screenshot: + page.screenshot(path="test-results/create-button.png") + # click create to start building the env + page.get_by_role("button", name="Create", exact=True).click() + + # Interact with the environment shortly after creation + # click to open the Active environment dropdown manu + page.get_by_role("button", name=" - Active", exact=False).click() + if screenshot: + page.keyboard.press("PageUp") # ensure we are at the top of the page + page.screenshot(path="test-results/version-select.png") + # click on the Active environment on the dropdown menu item (which is currently building) + page.get_by_role("option", name=" - Active", exact=False).click() + if screenshot: + page.screenshot(path="test-results/version-select-done.png") + # ensure that the environment is building + expect(page.get_by_text("Building")).to_be_visible() + if screenshot: + page.keyboard.press("PageUp") # ensure we are at the top of the page + page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 100}) + # wait until the status is `Completed` + completed = page.get_by_text("Completed", exact=False) + completed.wait_for(state='attached', timeout=time_to_build_env) + expect(completed).to_be_visible() return new_env_name From 376d2bda7b127279cacc27b8a9b4c33274f25a77 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Tue, 9 Jan 2024 12:27:08 -0600 Subject: [PATCH 18/33] loosen requirement on version spec --- test/playwright/test_ux.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index cb7f1705..c2e45a1f 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -111,15 +111,16 @@ def _create_new_environment(page, screenshot=False): page.get_by_role("option", name="rich", exact=True).click() # add version spec - page.get_by_role("row", name="rich ​ ​").get_by_role("button").first.click() + page.get_by_role("row", name="rich").get_by_role("button").first.click() if screenshot: page.screenshot(path="test-results/package-version-constraint.png") page.get_by_role("option", name=">", exact=True).click() - page.get_by_role("cell", name="> ​").get_by_role("button").nth(1).click() + # page.get_by_role("cell", name="> ​").get_by_role("button").nth(1).click() + page.get_by_role("cell", name=">").get_by_role("button").nth(1).click() if screenshot: page.screenshot(path="test-results/package-version-number.png") - page.get_by_role("option", name="12.6.0").click() + page.get_by_role("option", name="12.6.0", exact=False).click() # open up the channels accordian card page.get_by_role("button", name="Channels").click() From d9c52f562a97a118983fd9df353a72dd7c91dac9 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Wed, 10 Jan 2024 11:31:29 -0600 Subject: [PATCH 19/33] switch version spec in env - mismatch in availability on c-f and defaults --- test/playwright/test_ux.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index c2e45a1f..44d0960e 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -120,7 +120,7 @@ def _create_new_environment(page, screenshot=False): page.get_by_role("cell", name=">").get_by_role("button").nth(1).click() if screenshot: page.screenshot(path="test-results/package-version-number.png") - page.get_by_role("option", name="12.6.0", exact=False).click() + page.get_by_role("option", name="12.5.1", exact=False).click() # open up the channels accordian card page.get_by_role("button", name="Channels").click() @@ -216,7 +216,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=4*60*10 if screenshot: page.screenshot(path="test-results/pip-section.png") page.get_by_text("- rich").click() # bring focus to the section - page.get_by_text("channels: - conda-forgedependencies: - rich>12.6.0 - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.6.0\n - python\n - pip:\n - ragna\n - ipykernel\n\n") + page.get_by_text("channels: - conda-forgedependencies: - rich>12.5.1 - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.5.1\n - python\n - pip:\n - ragna\n - ipykernel\n\n") page.get_by_role("button", name="Save").click() # wait until the status is `Completed` completed = page.get_by_text("Completed", exact=False) @@ -322,11 +322,11 @@ def test_integration(page: Page, test_config, screenshot): # create a new environment env_name = _create_new_environment(page, screenshot=screenshot) - # # close any open tabs on the conda-store ui - # _close_environment_tabs(page) + # close any open tabs on the conda-store ui + _close_environment_tabs(page) - # # interact with an existing environment - # _existing_environment_interactions(page, env_name, screenshot=screenshot) + # interact with an existing environment + _existing_environment_interactions(page, env_name, screenshot=screenshot) if __name__ == "__main__": From d3c65ba195da960ff4ae78ebb6527240296d7a92 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Wed, 10 Jan 2024 13:04:21 -0600 Subject: [PATCH 20/33] unpack screenshots to specific directory, store jest video in video dir --- .github/workflows/push_images.yml | 4 +++- .github/workflows/test.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 741909dc..b612011e 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -68,6 +68,8 @@ jobs: if_no_artifact_found: fail # artifact name name: 'screenshots' + # directory in which to put the contents of the artifact + path: 'screenshots' - name: "ls" run: | @@ -78,7 +80,7 @@ jobs: - name: "Copy images to other repo" run: | cd conda-store-repo - cp ../playwright-tests/*.png docusaurus-docs/conda-store-ui/images/. + cp ../screenshots/*.png docusaurus-docs/conda-store-ui/images/. git config user.name ${{ github.actor }} git config user.email '${{ github.actor }}@users.noreply.github.com' git add -A diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0aeafba..76f3bd47 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: - name: "Start web server and run tests" shell: bash -el {0} run: | - yarn run start & pytest --video on --output test-results --screenshots true test/playwright/test_ux.py + yarn run start & pytest --video on --output video --screenshots true test/playwright/test_ux.py - name: "Upload screenshot artifacts" uses: actions/upload-artifact@v3 From 507683119b5516d0ee42cd7961fb42a299a267a8 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Wed, 10 Jan 2024 13:44:54 -0600 Subject: [PATCH 21/33] switch author of the PR to be the one who triggered the action, committer will be bot --- .github/workflows/push_images.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index b612011e..b1891e3a 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -93,8 +93,6 @@ jobs: token: ${{ secrets.CONDA_STORE_SYNC }} path: conda-store-repo commit-message: Update screenshots - committer: GitHub - author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> branch: update_screenshots delete-branch: true title: '[AUTO] Update screenshots' From cdd4607bb4376ed91d7c2420afeabb2168bf0618 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 1 Feb 2024 12:02:23 -0600 Subject: [PATCH 22/33] Apply suggestions from code review Co-authored-by: Tania Allard --- .github/workflows/push_images.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index b1891e3a..0e3295c7 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -1,5 +1,5 @@ # This workflow collects screenshots which have stored as artifacts in test.yml -# and opens a PR on conda-store to update the docs. +# and opens a PR on the conda-incubator/conda-store repo to update the docs. # # There are two ways to trigger this workflow: # 1. Trigger by adding the `update_screenshots` label. @@ -50,7 +50,7 @@ jobs: else PR_NUMBER=${{github.event.pull_request.number}} fi - echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV + echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV - name: Download artifact images - will fail if artifact doesn't exist yet id: download-artifact @@ -77,7 +77,7 @@ jobs: pwd ls conda-store-repo - - name: "Copy images to other repo" + - name: "Copy images to conda-store repo" run: | cd conda-store-repo cp ../screenshots/*.png docusaurus-docs/conda-store-ui/images/. @@ -95,7 +95,7 @@ jobs: commit-message: Update screenshots branch: update_screenshots delete-branch: true - title: '[AUTO] Update screenshots' + title: '[AUTO] - Update docs screenshots' body: | Update screenshots - Updated with the latest images from playwright generated in PR ${{ env.PR_NUMBER }} From 8291bf6d68b20f55887b0625475b4855a79fb67f Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 1 Feb 2024 12:03:18 -0600 Subject: [PATCH 23/33] minor cleanup --- .github/workflows/push_images.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 0e3295c7..62e56907 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -71,11 +71,6 @@ jobs: # directory in which to put the contents of the artifact path: 'screenshots' - - name: "ls" - run: | - ls - pwd - ls conda-store-repo - name: "Copy images to conda-store repo" run: | From 09c5d1ab9925b670ff53ab53f346711a35ec3c2c Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Fri, 24 May 2024 14:03:20 -0500 Subject: [PATCH 24/33] update access to some of the ui elements --- README.md | 2 +- test/playwright/test_ux.py | 30 +++++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 02b8ec5d..3cac48a2 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ We use [Docker Compose](https://docs.docker.com/compose/) to set up the infrastr Running conda-store-ui in Docker is the most straightforward way to set up your local development environment. 1. Run `yarn run start:docker` to start the entire development stack. -2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui. +2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) to see conda-store-ui. 3. You can then log in using the default username of `username` and default password of `password`. Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes. diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index b4e8d2b4..040b1460 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -82,12 +82,14 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/create-new-env.png", clip={'x': 0, 'y': 145, 'width': 275, 'height': 50}) # fill in the env name - page.get_by_label("Environment name").fill(new_env_name) + page.get_by_placeholder("Environment name").fill(new_env_name) # fill in the description page.get_by_placeholder("Enter here the description of your environment").fill("description") if screenshot: page.screenshot(path="test-results/add-package-button.png", clip={'x': 300, 'y': 385, 'width': 425, 'height': 170}) page.screenshot(path="test-results/name-description.png") + + # add `rich` package # click the + to add a package page.get_by_role("button", name="+ Add Package").click() # add a package to the ui @@ -95,19 +97,27 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/package-selection.png") page.get_by_role("option", name="rich", exact=True).click() - # add version spec page.get_by_role("row", name="rich").get_by_role("button").first.click() - if screenshot: page.screenshot(path="test-results/package-version-constraint.png") page.get_by_role("option", name=">", exact=True).click() - # page.get_by_role("cell", name="> ​").get_by_role("button").nth(1).click() page.get_by_role("cell", name=">").get_by_role("button").nth(1).click() if screenshot: page.screenshot(path="test-results/package-version-number.png") page.get_by_role("option", name="12.5.1", exact=False).click() + # python + # click the + to add a package + page.get_by_role("button", name="+ Add Package").click() + # add a package to the ui + page.get_by_label("Enter package").fill("python") + page.keyboard.press("Enter") + # add version spec + page.get_by_role("row", name="python", exact=False).get_by_role("button").nth(2).click() + page.get_by_role("option", name="3.10.9", exact=False).click() + + # update channels # open up the channels accordian card page.get_by_role("button", name="Channels").click() # click the + to add a channel @@ -123,7 +133,7 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/yaml-editor.png") # switch back - page.get_by_label("GUI", exact=False).click() + page.get_by_label("Switch to Standard View", exact=False).click() if screenshot: page.screenshot(path="test-results/create-button.png") @@ -167,7 +177,7 @@ def _close_environment_tabs(page): close_tab.first.click() -def _existing_environment_interactions(page, env_name, time_to_build_env=4*60*1000, screenshot=False): +def _existing_environment_interactions(page, env_name, time_to_build_env=5*60*1000, screenshot=False): """test interactions with existing environments. During this test, the env will be rebuilt twice. @@ -188,7 +198,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=4*60*10 grab screenshots """ - env_link = page.get_by_role("link", name=env_name) + env_link = page.get_by_role("button", name=env_name) edit_button = page.get_by_role("button", name="Edit") # edit existing environment throught the YAML editor @@ -205,7 +215,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=4*60*10 if screenshot: page.screenshot(path="test-results/pip-section.png") page.get_by_text("- rich").click() # bring focus to the section - page.get_by_text("channels: - conda-forgedependencies: - rich>12.5.1 - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.5.1\n - python\n - pip:\n - ragna\n - ipykernel\n\n") + page.get_by_text("channels: - conda-forgedependencies: - rich>12.5.1 - python>=3.10.9 - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.5.1\n - python=3.10\n - pip:\n - ragna\n - ipykernel\n\n") page.get_by_role("button", name="Save").click() edit_button.wait_for(state="attached") @@ -231,9 +241,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=4*60*10 "new description" ) # change the vesion spec of an existing package - page.get_by_role("row", name="ipykernel", exact=False).get_by_role( - "combobox" - ).first.click() + page.get_by_role("row", name="rich").get_by_role("button").first.click() page.get_by_role("option", name=">=").click() # Note: purposefully not testing version constraint since there is inconsistent behavior here From 8aea378c9196e9e73d413369f7663ac99a35a17a Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Fri, 14 Jun 2024 15:23:52 -0500 Subject: [PATCH 25/33] update tests, implement wait-for-it in ci to avoid race conditions --- .github/workflows/test.yml | 10 ++++++++-- test/playwright/test_ux.py | 29 ++++++++++++++++------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fdb3fa7..e40aa040 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,10 +42,16 @@ jobs: yarn install --immutable yarn run build - - name: "Start web server and run tests" + - name: "Start web server" shell: bash -el {0} run: | - yarn run start & pytest --video on --output video --screenshots true test/playwright/test_ux.py + yarn run start & + wait-for-it localhost:8000 # wait for conda-store-ui to start + + - name: "Run playwright tests" + shell: bash -el {0} + run: | + pytest --video on --output video --screenshots true test/playwright/test_ux.py - name: "Upload screenshot artifacts" uses: actions/upload-artifact@v3 diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 040b1460..379b279b 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -82,7 +82,7 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/create-new-env.png", clip={'x': 0, 'y': 145, 'width': 275, 'height': 50}) # fill in the env name - page.get_by_placeholder("Environment name").fill(new_env_name) + page.get_by_label("Environment name").fill(new_env_name) # fill in the description page.get_by_placeholder("Enter here the description of your environment").fill("description") if screenshot: @@ -97,15 +97,16 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/package-selection.png") page.get_by_role("option", name="rich", exact=True).click() + # add version spec - page.get_by_role("row", name="rich").get_by_role("button").first.click() + page.get_by_role("combobox").first.click() if screenshot: page.screenshot(path="test-results/package-version-constraint.png") page.get_by_role("option", name=">", exact=True).click() - page.get_by_role("cell", name=">").get_by_role("button").nth(1).click() + page.get_by_role("combobox").nth(1).click() if screenshot: page.screenshot(path="test-results/package-version-number.png") - page.get_by_role("option", name="12.5.1", exact=False).click() + page.get_by_role("option", name="12.6.0").click() # python # click the + to add a package @@ -114,8 +115,10 @@ def _create_new_environment(page, screenshot=False): page.get_by_label("Enter package").fill("python") page.keyboard.press("Enter") # add version spec - page.get_by_role("row", name="python", exact=False).get_by_role("button").nth(2).click() - page.get_by_role("option", name="3.10.9", exact=False).click() + page.get_by_role("combobox").nth(2).click() + page.get_by_role("option", name="=", exact=True).click() + page.get_by_role("combobox").nth(3).click() + page.get_by_role("option", name="3.10.9").click() # update channels # open up the channels accordian card @@ -133,7 +136,7 @@ def _create_new_environment(page, screenshot=False): if screenshot: page.screenshot(path="test-results/yaml-editor.png") # switch back - page.get_by_label("Switch to Standard View", exact=False).click() + page.get_by_label("YAML", exact=False).click() if screenshot: page.screenshot(path="test-results/create-button.png") @@ -142,12 +145,12 @@ def _create_new_environment(page, screenshot=False): # Interact with the environment shortly after creation # click to open the Active environment dropdown manu - page.get_by_role("button", name=" - Active", exact=False).click() + page.get_by_text(" - Active", exact=False).click() if screenshot: page.keyboard.press("PageUp") # ensure we are at the top of the page page.screenshot(path="test-results/version-select.png") # click on the Active environment on the dropdown menu item (which is currently building) - page.get_by_role("option", name=" - Active", exact=False).click() + page.get_by_role("option", name="- Active", exact=False).click() if screenshot: page.screenshot(path="test-results/version-select-done.png") # ensure that the environment is building @@ -198,7 +201,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=5*60*10 grab screenshots """ - env_link = page.get_by_role("button", name=env_name) + env_link = page.get_by_role("link", name=env_name) edit_button = page.get_by_role("button", name="Edit") # edit existing environment throught the YAML editor @@ -215,7 +218,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=5*60*10 if screenshot: page.screenshot(path="test-results/pip-section.png") page.get_by_text("- rich").click() # bring focus to the section - page.get_by_text("channels: - conda-forgedependencies: - rich>12.5.1 - python>=3.10.9 - pip: - nothing - ipykernel").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.5.1\n - python=3.10\n - pip:\n - ragna\n - ipykernel\n\n") + page.get_by_text("channels: - conda-forgedependencies: - rich>12.6.0 - python=3.10.9 - pip: - nothing - ipykernelvariables: {}").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.6.0\n - python=3.10\n") page.get_by_role("button", name="Save").click() edit_button.wait_for(state="attached") @@ -235,13 +238,13 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=5*60*10 # edit existing environment env_link.click() edit_button.click() - # page.get_by_placeholder("Enter here the description of your environment").click() + # change the description page.get_by_placeholder("Enter here the description of your environment").fill( "new description" ) # change the vesion spec of an existing package - page.get_by_role("row", name="rich").get_by_role("button").first.click() + page.get_by_text(">", exact=True).click() page.get_by_role("option", name=">=").click() # Note: purposefully not testing version constraint since there is inconsistent behavior here From 1d1aa2d16ef512227d4c8bdf9634518f41997b63 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Fri, 14 Jun 2024 15:28:19 -0500 Subject: [PATCH 26/33] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cac48a2..c7aed98e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ We use [Docker Compose](https://docs.docker.com/compose/) to set up the infrastr Running conda-store-ui in Docker is the most straightforward way to set up your local development environment. 1. Run `yarn run start:docker` to start the entire development stack. -2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) to see conda-store-ui. +2. Open your local browser and go to [http://localhost:8000](http://localhost:8000) to see conda-store-ui. 3. You can then log in using the default username of `username` and default password of `password`. Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes. From 0aaa3dc17fb8861100e0cea4e4debca255f0124a Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Fri, 14 Jun 2024 15:42:41 -0500 Subject: [PATCH 27/33] change wait time for conda ui startup --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e40aa040..e354ba54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: shell: bash -el {0} run: | yarn run start & - wait-for-it localhost:8000 # wait for conda-store-ui to start + wait-for-it localhost:8000 -t 240 # wait for conda-store-ui to start (seconds) - name: "Run playwright tests" shell: bash -el {0} From bc6e0661b9773ceeafafe3087553bc4ace17081c Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Mon, 17 Jun 2024 11:49:14 -0500 Subject: [PATCH 28/33] bump actions versions and fix version unavailable on ci platform --- .github/workflows/test.yml | 6 +++--- test/playwright/test_ux.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e354ba54..f208e300 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: "Set up Python" - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 env: CONDA_SOLVER: libmamba with: @@ -54,14 +54,14 @@ jobs: pytest --video on --output video --screenshots true test/playwright/test_ux.py - name: "Upload screenshot artifacts" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: screenshots path: test-results - name: "Upload video artifact" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: video diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 010c551d..00521d76 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -106,7 +106,7 @@ def _create_new_environment(page, screenshot=False): page.get_by_role("combobox").nth(1).click() if screenshot: page.screenshot(path="test-results/package-version-number.png") - page.get_by_role("option", name="12.6.0").click() + page.get_by_role("option", name="12.5.1").click() # python # click the + to add a package @@ -218,7 +218,7 @@ def _existing_environment_interactions(page, env_name, time_to_build_env=5*60*10 if screenshot: page.screenshot(path="test-results/pip-section.png") page.get_by_text("- rich").click() # bring focus to the section - page.get_by_text("channels: - conda-forgedependencies: - rich>12.6.0 - python=3.10.9 - pip: - nothing - ipykernelvariables: {}").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.6.0\n - python=3.10\n") + page.get_by_text("channels: - conda-forgedependencies: - rich>12.5.1 - python=3.10.9 - pip: - nothing - ipykernelvariables: {}").fill("channels:\n - conda-forge\ndependencies:\n - rich>12.5.1\n - python=3.10\n") page.get_by_role("button", name="Save").click() edit_button.wait_for(state="attached") From 0c319e275b36ce9cdf1b379e3f15c340ecdf2535 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Mon, 16 Sep 2024 12:31:57 -0500 Subject: [PATCH 29/33] add requested comments, fix tests for latest UI --- .github/workflows/push_images.yml | 4 ++-- .github/workflows/test.yml | 4 +++- package.json | 2 +- test/playwright/test_ux.py | 22 +++++++++++----------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 62e56907..8f744c9c 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -46,7 +46,7 @@ jobs: - name: Use this PR number or the one specified in workflow dispatch run: | if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then - my_variable=${{ inputs.pr_number }} + PR_NUMBER=${{ inputs.pr_number }} else PR_NUMBER=${{github.event.pull_request.number}} fi @@ -87,7 +87,7 @@ jobs: with: token: ${{ secrets.CONDA_STORE_SYNC }} path: conda-store-repo - commit-message: Update screenshots + commit-message: "Copy updated screenshots from GitHub CI job for Conda Store docs. This commit was created by a script via GitHub Actions." branch: update_screenshots delete-branch: true title: '[AUTO] - Update docs screenshots' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bb8e7b6..7bac3cba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,13 +53,15 @@ jobs: run: | pytest --video on --output video --screenshots true test/playwright/test_ux.py + # screenshots are used in the `push_images` workflow to push the screenshots to the codebase repo - name: "Upload screenshot artifacts 📤" uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: screenshots path: test-results - + # video is added as an artifact to assist in debugging the CI failures, playwright traceback + # often shows failures several steps beyond the actual failure which can be seen in a video - name: "Upload video artifact 📤" uses: actions/upload-artifact@v4 if: ${{ always() }} diff --git a/package.json b/package.json index bce2954e..aea98702 100644 --- a/package.json +++ b/package.json @@ -146,4 +146,4 @@ "node": ">=18.0.0" }, "packageManager": "yarn@4.4.0" -} \ No newline at end of file +} diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index fe2b3c90..7ee734f5 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -192,10 +192,19 @@ def _existing_environment_interactions( env_link = page.get_by_role("link", name=env_name) edit_button = page.get_by_role("button", name="Edit") + # ensure the namespace is expanded + try: + expect(env_link).to_be_visible(timeout=5000) # short timeout to allow for page loading + except Exception as e: + # click to expand the `username` namespace (but not click the +) + page.get_by_role( + "button", name="username Create a new environment in the username namespace" + ).click() + # edit existing environment through the YAML editor env_link.click() if screenshot: - page.keyboard.press("PageUp") # ensure we are at the top of the page + page.keyboard.press("Home") # ensure we are at the top of the page page.screenshot(path="test-results/edit-env.png") edit_button.click() if screenshot: @@ -223,15 +232,6 @@ def _existing_environment_interactions( completed = page.get_by_text("Completed", exact=False) completed.wait_for(state="attached", timeout=time_to_build_env) - # ensure the namespace is expanded - try: - expect(env_link).to_be_visible() - except Exception as e: - # click to expand the `username` name space (but not click the +) - page.get_by_role( - "button", name="username Create a new environment in the username namespace" - ).click() - # edit existing environment env_link.click() edit_button.click() @@ -241,7 +241,7 @@ def _existing_environment_interactions( "new description" ) # change the vesion spec of an existing package - page.get_by_text(">", exact=True).click() + page.get_by_role("row", name="rich", exact=False).get_by_role("combobox").first.click() page.get_by_role("option", name=">=").click() # Note: purposefully not testing version constraint since there is inconsistent behavior here From 4dc8b8188a78f73915e9a8ed3f486f9ebe1078d6 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Mon, 16 Sep 2024 13:18:29 -0500 Subject: [PATCH 30/33] update screenshot clip settings based on review --- test/playwright/test_ux.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index 7ee734f5..d571e4fc 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -80,7 +80,7 @@ def _create_new_environment(page, screenshot=False): # click the + to create a new env page.get_by_label("Create a new environment in the username namespace").click() if screenshot: - page.screenshot(path="test-results/create-new-env.png", clip={'x': 0, 'y': 145, 'width': 275, 'height': 50}) + page.screenshot(path="test-results/create-new-env.png", clip={'x': 0, 'y': 160, 'width': 290, 'height': 50}) # fill in the env name page.get_by_label("Environment name").fill(new_env_name) # fill in the description @@ -139,6 +139,8 @@ def _create_new_environment(page, screenshot=False): page.get_by_label("YAML", exact=False).click() if screenshot: + page.keyboard.press("PageDown") # ensure we are at the bottom of the page + page.keyboard.press("PageDown") page.screenshot(path="test-results/create-button.png") # click create to start building the env page.get_by_role("button", name="Create", exact=True).click() @@ -147,7 +149,7 @@ def _create_new_environment(page, screenshot=False): # click to open the Active environment dropdown manu page.get_by_text(" - Active", exact=False).click() if screenshot: - page.keyboard.press("PageUp") # ensure we are at the top of the page + page.keyboard.press("Home") # ensure we are at the top of the page page.screenshot(path="test-results/version-select.png") # click on the Active environment on the dropdown menu item (which is currently building) page.get_by_role("option", name="- Active", exact=False).click() @@ -210,6 +212,7 @@ def _existing_environment_interactions( if screenshot: page.screenshot(path="test-results/switch-to-yaml.png", clip={'x': 280, 'y': 385, 'width': 985, 'height': 75}) page.keyboard.press("PageDown") # ensure we are at the bottom of the page + page.keyboard.press("PageDown") page.screenshot(path="test-results/delete-env.png") page.get_by_label("YAML").check() if screenshot: From 4ac13a2640b7eea2238eb97fa0ee2120a57f06ec Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Mon, 16 Sep 2024 13:49:08 -0500 Subject: [PATCH 31/33] add committer to PR opener step --- .github/workflows/push_images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 8f744c9c..62945998 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -87,6 +87,7 @@ jobs: with: token: ${{ secrets.CONDA_STORE_SYNC }} path: conda-store-repo + committer: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> commit-message: "Copy updated screenshots from GitHub CI job for Conda Store docs. This commit was created by a script via GitHub Actions." branch: update_screenshots delete-branch: true From b28de4706f7dcceca0f4e3911dbb01f32ca52248 Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Thu, 19 Sep 2024 14:08:04 -0500 Subject: [PATCH 32/33] update clip settings --- .github/workflows/push_images.yml | 1 + test/playwright/test_ux.py | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 62945998..38202f91 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -1,3 +1,4 @@ +# WARNING - This workflow must be run AFTER the "test" workflow. # This workflow collects screenshots which have stored as artifacts in test.yml # and opens a PR on the conda-incubator/conda-store repo to update the docs. # diff --git a/test/playwright/test_ux.py b/test/playwright/test_ux.py index d571e4fc..066751e2 100644 --- a/test/playwright/test_ux.py +++ b/test/playwright/test_ux.py @@ -1,5 +1,11 @@ """Test suite for user interactions with the UI. It is designed to run both inside and outside of pytest to make future development easier. + +If screenshots=True, clipped images of the UI are taken and stored in +`test-results`. These images are used in the documentation. + +Note: Image clipping syntax includes the x & y coordinate of the upper left +corner of the clip area ((0,0) is at the top left of the page) and the width and height of the clip in pixels. """ import requests @@ -86,7 +92,7 @@ def _create_new_environment(page, screenshot=False): # fill in the description page.get_by_placeholder("Enter here the description of your environment").fill("description") if screenshot: - page.screenshot(path="test-results/add-package-button.png", clip={'x': 300, 'y': 385, 'width': 425, 'height': 170}) + page.screenshot(path="test-results/add-package-button.png", clip={'x': 305, 'y': 375, 'width': 445, 'height': 140}) page.screenshot(path="test-results/name-description.png") # add `rich` package @@ -101,6 +107,7 @@ def _create_new_environment(page, screenshot=False): # add version spec page.get_by_role("combobox").first.click() if screenshot: + time.sleep(0.2) # need time for the fade in to complete in CI page.screenshot(path="test-results/package-version-constraint.png") page.get_by_role("option", name=">", exact=True).click() page.get_by_role("combobox").nth(1).click() @@ -128,7 +135,7 @@ def _create_new_environment(page, screenshot=False): # fill in conda-forge as the new channel name page.get_by_label("Enter channel").fill("conda-forge") if screenshot: - page.screenshot(path="test-results/add-channel.png", clip={'x': 300, 'y': 440, 'width': 425, 'height': 202}) + page.screenshot(path="test-results/add-channel.png", clip={'x': 310, 'y': 410, 'width': 445, 'height': 220}) # press enter to submit the channel to the list page.get_by_label("Enter channel").press("Enter") # switch to yaml editor @@ -159,7 +166,7 @@ def _create_new_environment(page, screenshot=False): expect(page.get_by_text("Building")).to_be_visible() if screenshot: page.keyboard.press("PageUp") # ensure we are at the top of the page - page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 100}) + page.screenshot(path="test-results/environment-building.png", clip={'x': 300, 'y': 190, 'width': 285, 'height': 85}) # wait until the status is `Completed` completed = page.get_by_text("Completed", exact=False) completed.wait_for(state="attached", timeout=time_to_build_env) @@ -210,7 +217,7 @@ def _existing_environment_interactions( page.screenshot(path="test-results/edit-env.png") edit_button.click() if screenshot: - page.screenshot(path="test-results/switch-to-yaml.png", clip={'x': 280, 'y': 385, 'width': 985, 'height': 75}) + page.screenshot(path="test-results/switch-to-yaml.png", clip={'x': 295, 'y': 340, 'width': 970, 'height': 75}) page.keyboard.press("PageDown") # ensure we are at the bottom of the page page.keyboard.press("PageDown") page.screenshot(path="test-results/delete-env.png") From d48ba9abc865498e8471b9fdd716f0dda019992c Mon Sep 17 00:00:00 2001 From: Kim Pevey Date: Fri, 20 Sep 2024 11:47:02 -0500 Subject: [PATCH 33/33] update commit message that's actually being used, remove the other one --- .github/workflows/push_images.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/push_images.yml b/.github/workflows/push_images.yml index 38202f91..4701d0e2 100644 --- a/.github/workflows/push_images.yml +++ b/.github/workflows/push_images.yml @@ -80,7 +80,7 @@ jobs: git config user.name ${{ github.actor }} git config user.email '${{ github.actor }}@users.noreply.github.com' git add -A - git commit -m "commit all changes" + git commit -m "Copy updated screenshots from GitHub CI job for Conda Store docs. This commit was created by a script via GitHub Actions." - name: "Create PR on conda-store with updated screenshots" id: create-pull-request @@ -88,8 +88,6 @@ jobs: with: token: ${{ secrets.CONDA_STORE_SYNC }} path: conda-store-repo - committer: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> - commit-message: "Copy updated screenshots from GitHub CI job for Conda Store docs. This commit was created by a script via GitHub Actions." branch: update_screenshots delete-branch: true title: '[AUTO] - Update docs screenshots'