Compare commits

...

4 Commits

Author SHA1 Message Date
Chris Raible
de49f096b1 Added a comment for posterity 2024-08-30 11:56:20 -07:00
Chris Raible
4dc2f2f267 Fixed admin-x-settings tests failing because postData was not JSON 2024-08-30 11:56:20 -07:00
Chris Raible
d959bdb914 Closed a modal that was left open in a test, which caused the next test to fail 2024-08-30 11:56:20 -07:00
renovate[bot]
f95e06bccd Update dependency @playwright/test to v1.46.1 2024-08-30 11:56:20 -07:00
8 changed files with 28 additions and 20 deletions

View File

@ -32,7 +32,7 @@
"preview": "vite preview"
},
"devDependencies": {
"@playwright/test": "1.38.1",
"@playwright/test": "1.46.1",
"@testing-library/react": "14.3.1",
"@tryghost/admin-x-design-system": "0.0.0",
"@tryghost/admin-x-framework": "0.0.0",

View File

@ -186,7 +186,14 @@ export async function mockApi<Requests extends Record<string, MockRequestConfig>
});
}
const requestBody = JSON.parse(route.request().postData() || 'null');
let requestBody = null;
try {
// Try to parse the post data as JSON
requestBody = JSON.parse(route.request().postData() || 'null');
} catch {
// Post data isn't JSON (e.g. file upload) — use the raw post data
requestBody = route.request().postData();
}
lastApiRequests[matchingMock.name] = {
body: requestBody,

View File

@ -48,7 +48,7 @@
"validator": "7.2.0"
},
"devDependencies": {
"@playwright/test": "1.38.1",
"@playwright/test": "1.46.1",
"@testing-library/react": "14.3.1",
"@tryghost/admin-x-design-system": "0.0.0",
"@tryghost/admin-x-framework": "0.0.0",

View File

@ -59,7 +59,7 @@
"react-string-replace": "1.1.1"
},
"devDependencies": {
"@playwright/test": "1.38.1",
"@playwright/test": "1.46.1",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "14.5.2",

View File

@ -39,7 +39,7 @@
"react-dom": "18.3.1"
},
"devDependencies": {
"@playwright/test": "1.38.1",
"@playwright/test": "1.46.1",
"@storybook/addon-essentials": "7.6.20",
"@storybook/addon-interactions": "7.6.20",
"@storybook/addon-links": "7.6.20",

View File

@ -233,7 +233,7 @@
},
"devDependencies": {
"@actions/core": "1.10.1",
"@playwright/test": "1.38.1",
"@playwright/test": "1.46.1",
"@tryghost/express-test": "0.13.15",
"@tryghost/webhook-mock-receiver": "0.2.14",
"@types/common-tags": "1.8.4",

View File

@ -265,6 +265,7 @@ test.describe('Admin', () => {
const success = await sharedPage.locator('div[data-test-state="add-complete"] > div > p').innerText();
expect(success).toEqual('Label added to 3 members successfully');
labelFilterUrl = await sharedPage.url();
await sharedPage.locator('button[data-test-button="close-modal"]').click();
});
test('A filtered list of members can have a label removed from them', async ({sharedPage}) => {

View File

@ -4313,12 +4313,12 @@
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
"@playwright/test@1.38.1":
version "1.38.1"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.38.1.tgz#8ef4263e355cd1d8ad7905d471d268e8acb82ed6"
integrity sha512-NqRp8XMwj3AK+zKLbZShl0r/9wKgzqI/527bkptKXomtuo+dOjU9NdMASQ8DNC9z9zLOMbG53T4eihYr3XR+BQ==
"@playwright/test@1.46.1":
version "1.46.1"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.46.1.tgz#a8dfdcd623c4c23bb1b7ea588058aad41055c188"
integrity sha512-Fq6SwLujA/DOIvNC2EL/SojJnkKf/rAwJ//APpJJHRyMi1PdKrY3Az+4XNQ51N4RTbItbIByQ0jgd1tayq1aeA==
dependencies:
playwright "1.38.1"
playwright "1.46.1"
"@polka/url@^1.0.0-next.20":
version "1.0.0-next.21"
@ -25170,17 +25170,17 @@ pkg-up@^3.1.0:
dependencies:
find-up "^3.0.0"
playwright-core@1.38.1:
version "1.38.1"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.38.1.tgz#75a3c470aa9576b7d7c4e274de3d79977448ba08"
integrity sha512-tQqNFUKa3OfMf4b2jQ7aGLB8o9bS3bOY0yMEtldtC2+spf8QXG9zvXLTXUeRsoNuxEYMgLYR+NXfAa1rjKRcrg==
playwright-core@1.46.1:
version "1.46.1"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.46.1.tgz#28f3ab35312135dda75b0c92a3e5c0e7edb9cc8b"
integrity sha512-h9LqIQaAv+CYvWzsZ+h3RsrqCStkBHlgo6/TJlFst3cOTlLghBQlJwPOZKQJTKNaD3QIB7aAVQ+gfWbN3NXB7A==
playwright@1.38.1:
version "1.38.1"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.38.1.tgz#82ecd9bc4f4f64dbeee8a11c31793748e2528130"
integrity sha512-oRMSJmZrOu1FP5iu3UrCx8JEFRIMxLDM0c/3o4bpzU5Tz97BypefWf7TuTNPWeCe279TPal5RtPPZ+9lW/Qkow==
playwright@1.46.1:
version "1.46.1"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.46.1.tgz#ea562bc48373648e10420a10c16842f0b227c218"
integrity sha512-oPcr1yqoXLCkgKtD5eNUPLiN40rYEM39odNpIb6VE6S7/15gJmA1NzVv6zJYusV0e7tzvkU/utBFNa/Kpxmwng==
dependencies:
playwright-core "1.38.1"
playwright-core "1.46.1"
optionalDependencies:
fsevents "2.3.2"