diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index b78e644a785d..4fe00fbcd6e2 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -58,7 +58,7 @@ jobs: - name: Setup sample database run: dispatch database restore --dump-file data/dispatch-sample-data.dump && dispatch database upgrade - name: Run tests - run: npx playwright test + run: npx playwright test --project=chromium --project=firefox - uses: actions/upload-artifact@v3 if: always() with: diff --git a/requirements-base.txt b/requirements-base.txt index 736c93befb82..fece2b2366ae 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -95,9 +95,7 @@ cymem==2.0.7 # spacy # thinc decorator==5.1.1 - # via - # jsonpath-ng - # validators + # via validators defusedxml==0.7.1 # via jira deprecated==1.2.14 @@ -124,7 +122,7 @@ frozenlist==1.4.0 # aiosignal google-api-core==2.11.1 # via google-api-python-client -google-api-python-client==2.98.0 +google-api-python-client==2.99.0 # via -r requirements-base.in google-auth==2.22.0 # via @@ -184,7 +182,7 @@ jira==2.0.0 # via -r requirements-base.in joblib==1.3.2 # via -r requirements-base.in -jsonpath-ng==1.5.3 +jsonpath-ng==1.6.0 # via -r requirements-base.in jsonschema==4.17.3 # via @@ -209,7 +207,7 @@ markupsafe==2.1.3 # jinja2 # mako # werkzeug -msal==1.23.0 +msal==1.24.0 # via -r requirements-base.in multidict==6.0.4 # via @@ -257,7 +255,7 @@ patsy==0.5.3 # via statsmodels pbr==5.11.1 # via jira -pdpyras==5.1.1 +pdpyras==5.1.2 # via -r requirements-base.in pluggy==1.2.0 # via pytest @@ -368,7 +366,7 @@ scipy==1.11.2 # via statsmodels sentry-asgi==0.2.0 # via -r requirements-base.in -sentry-sdk==1.30.0 +sentry-sdk==1.31.0 # via # -r requirements-base.in # sentry-asgi @@ -382,7 +380,6 @@ six==1.16.0 # google-auth # google-auth-httplib2 # jira - # jsonpath-ng # junit-xml # oauth2client # patsy diff --git a/src/dispatch/plugins/dispatch_slack/case/interactive.py b/src/dispatch/plugins/dispatch_slack/case/interactive.py index c0662e3ce702..e4797c36d368 100644 --- a/src/dispatch/plugins/dispatch_slack/case/interactive.py +++ b/src/dispatch/plugins/dispatch_slack/case/interactive.py @@ -1156,16 +1156,21 @@ def handle_edit_submission_event( if form_data.get(DefaultBlockIds.case_type_select): case_type = {"name": form_data[DefaultBlockIds.case_type_select]["name"]} + assignee_email = None if form_data.get(DefaultBlockIds.case_assignee_select): assignee_email = client.users_info( user=form_data[DefaultBlockIds.case_assignee_select]["value"] )["user"]["profile"]["email"] + resolution_reason = None + if form_data.get(DefaultBlockIds.case_resolution_reason_select): + resolution_reason = form_data[DefaultBlockIds.case_resolution_reason_select]["value"] + case_in = CaseUpdate( title=form_data[DefaultBlockIds.title_input], description=form_data[DefaultBlockIds.description_input], resolution=form_data[DefaultBlockIds.resolution_input], - resolution_reason=form_data[DefaultBlockIds.case_resolution_reason_select]["value"], + resolution_reason=resolution_reason, status=form_data[DefaultBlockIds.case_status_select]["name"], visibility=case.visibility, case_priority=case_priority, diff --git a/src/dispatch/plugins/dispatch_slack/feedback/interactive.py b/src/dispatch/plugins/dispatch_slack/feedback/interactive.py index fadaa04a4f22..f0ba81afdb54 100644 --- a/src/dispatch/plugins/dispatch_slack/feedback/interactive.py +++ b/src/dispatch/plugins/dispatch_slack/feedback/interactive.py @@ -397,7 +397,8 @@ def handle_oncall_shift_feedback_submission_event( # if there's a reminder id, delete the reminder if len(metadata) > 4: reminder_id = metadata[4] - reminder_service.delete(db_session=db_session, reminder_id=reminder_id) + if reminder_id.isnumeric(): + reminder_service.delete(db_session=db_session, reminder_id=reminder_id) individual = ( None diff --git a/src/dispatch/static/dispatch/package-lock.json b/src/dispatch/static/dispatch/package-lock.json index bd905bfa9868..1be988761dd3 100644 --- a/src/dispatch/static/dispatch/package-lock.json +++ b/src/dispatch/static/dispatch/package-lock.json @@ -816,22 +816,18 @@ } }, "node_modules/@playwright/test": { - "version": "1.37.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.37.1.tgz", - "integrity": "sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.38.0.tgz", + "integrity": "sha512-xis/RXXsLxwThKnlIXouxmIvvT3zvQj1JE39GsNieMUrMpb3/GySHDh2j8itCG22qKVD4MYLBp7xB73cUW/UUw==", "dev": true, "dependencies": { - "@types/node": "*", - "playwright-core": "1.37.1" + "playwright": "1.38.0" }, "bin": { "playwright": "cli.js" }, "engines": { "node": ">=16" - }, - "optionalDependencies": { - "fsevents": "2.3.2" } }, "node_modules/@rollup/pluginutils": { @@ -991,7 +987,8 @@ "version": "18.11.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.7.tgz", "integrity": "sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/@types/sizzle": { "version": "2.3.3", @@ -4822,10 +4819,28 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/playwright": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.0.tgz", + "integrity": "sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A==", + "dev": true, + "dependencies": { + "playwright-core": "1.38.0" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, "node_modules/playwright-core": { - "version": "1.37.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.37.1.tgz", - "integrity": "sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.0.tgz", + "integrity": "sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -7233,14 +7248,12 @@ } }, "@playwright/test": { - "version": "1.37.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.37.1.tgz", - "integrity": "sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.38.0.tgz", + "integrity": "sha512-xis/RXXsLxwThKnlIXouxmIvvT3zvQj1JE39GsNieMUrMpb3/GySHDh2j8itCG22qKVD4MYLBp7xB73cUW/UUw==", "dev": true, "requires": { - "@types/node": "*", - "fsevents": "2.3.2", - "playwright-core": "1.37.1" + "playwright": "1.38.0" } }, "@rollup/pluginutils": { @@ -7376,7 +7389,8 @@ "version": "18.11.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.7.tgz", "integrity": "sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==", - "dev": true + "dev": true, + "peer": true }, "@types/sizzle": { "version": "2.3.3", @@ -10285,10 +10299,20 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, + "playwright": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.38.0.tgz", + "integrity": "sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A==", + "dev": true, + "requires": { + "fsevents": "2.3.2", + "playwright-core": "1.38.0" + } + }, "playwright-core": { - "version": "1.37.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.37.1.tgz", - "integrity": "sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.0.tgz", + "integrity": "sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g==", "dev": true }, "postcss": {