Skip to content

Commit f856fbf

Browse files
fix: change script name because yarn create tries to run create-client and fail (#342)
1 parent 19ef9d9 commit f856fbf

File tree

5 files changed

+604
-571
lines changed

5 files changed

+604
-571
lines changed

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
2626
"@babel/plugin-transform-runtime": "^7.0.0",
2727
"@babel/preset-env": "^7.6.0",
28-
"@playwright-testing-library/test": "4.4.0-beta.1",
28+
"@playwright-testing-library/test": "4.5.0",
2929
"@playwright/test": "^1.25.0",
3030
"babel-jest": "^29.0.0",
3131
"eslint": "^8.22.0",
@@ -40,7 +40,7 @@
4040
"tmp": "^0.2.0"
4141
},
4242
"dependencies": {
43-
"@api-platform/api-doc-parser": "^0.15.0",
43+
"@api-platform/api-doc-parser": "^0.16.0",
4444
"@babel/runtime": "^7.0.0",
4545
"chalk": "^5.0.0",
4646
"commander": "^9.4.0",
@@ -67,13 +67,13 @@
6767
"test-react-app": "rm -rf ./tmp/app && mkdir -p ./tmp/app && yarn create react-app --template typescript ./tmp/app/reactapp && yarn --cwd ./tmp/app/reactapp add react-router-dom react-hook-form && cp -R ./tmp/react/* ./tmp/app/reactapp/src && cp ./templates/react/index.tsx ./tmp/app/reactapp/src && start-server-and-test 'BROWSER=none yarn --cwd ./tmp/app/reactapp start' http://127.0.0.1:3000/books/ 'yarn playwright test'",
6868
"test-next-app": "rm -rf ./tmp/app && mkdir -p ./tmp/app && yarn create next-app --typescript ./tmp/app/next && yarn --cwd ./tmp/app/next add isomorphic-unfetch formik react-query && cp -R ./tmp/next/* ./tmp/app/next && rm ./tmp/app/next/pages/index.tsx && rm -rf ./tmp/app/next/pages/api && yarn --cwd ./tmp/app/next build && start-server-and-test 'yarn --cwd ./tmp/app/next start' http://127.0.0.1:3000/books/ 'yarn playwright test'",
6969
"test-vue-app": "rm -rf ./tmp/app && mkdir -p ./tmp/app && cd ./tmp/app && npm init -y vue@2 -- --router vue && cd ../.. && yarn --cwd ./tmp/app/vue add vuex@3 vuex-map-fields lodash && cp -R ./tmp/vue/* ./tmp/app/vue/src && cp ./templates/vue/main.js ./tmp/app/vue/src && yarn --cwd ./tmp/app/vue build && start-server-and-test 'yarn --cwd ./tmp/app/vue vite preview --host 127.0.0.1 --port 3000' http://127.0.0.1:3000/books/ 'yarn playwright test'",
70-
"test-nuxt-app": "rm -rf ./tmp/app && mkdir -p ./tmp/app && yarn create nuxt-app --answers \"'{\\\"name\\\":\\\"nuxt\\\",\\\"language\\\":\\\"js\\\",\\\"pm\\\":\\\"yarn\\\",\\\"ui\\\":\\\"vuetify\\\",\\\"features\\\":[],\\\"linter\\\":[],\\\"test\\\":\\\"none\\\",\\\"mode\\\":\\\"spa\\\",\\\"target\\\":\\\"static\\\",\\\"devTools\\\":[],\\\"vcs\\\":\\\"none\\\"}'\" ./tmp/app/nuxt && yarn --cwd ./tmp/app/nuxt add moment lodash vuelidate vuex-map-fields && cp -R ./tmp/nuxt/* ./tmp/app/nuxt && NUXT_TELEMETRY_DISABLED=1 yarn --cwd ./tmp/app/nuxt generate && start-server-and-test 'yarn --cwd ./tmp/app/nuxt start --hostname 127.0.0.1' http://127.0.0.1:3000/books/ 'yarn playwright test'"
70+
"test-nuxt-app": "rm -rf ./tmp/app && mkdir -p ./tmp/app && yarn create nuxt-app --answers \"'{\\\"name\\\":\\\"nuxt\\\",\\\"language\\\":\\\"js\\\",\\\"pm\\\":\\\"yarn\\\",\\\"ui\\\":\\\"vuetify\\\",\\\"template\\\":\\\"html\\\",\\\"features\\\":[],\\\"linter\\\":[],\\\"test\\\":\\\"none\\\",\\\"mode\\\":\\\"spa\\\",\\\"target\\\":\\\"static\\\",\\\"devTools\\\":[],\\\"vcs\\\":\\\"none\\\"}'\" ./tmp/app/nuxt && yarn --cwd ./tmp/app/nuxt add moment lodash vuelidate vuex-map-fields && cp -R ./tmp/nuxt/* ./tmp/app/nuxt && NUXT_TELEMETRY_DISABLED=1 yarn --cwd ./tmp/app/nuxt generate && start-server-and-test 'yarn --cwd ./tmp/app/nuxt start --hostname 127.0.0.1' http://127.0.0.1:3000/books/ 'yarn playwright test'"
7171
},
7272
"lint-staged": {
7373
"src/**/*.js": "yarn lint --fix"
7474
},
7575
"bin": {
76-
"generate-api-platform-client": "./lib/index.js"
76+
"create-client": "./lib/index.js"
7777
},
7878
"publishConfig": {
7979
"access": "public"

tests/edit.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { test as baseTest, expect } from '@playwright/test';
2-
import { locatorFixtures as fixtures, within } from '@playwright-testing-library/test/fixture.js';
2+
import { locatorFixtures as fixtures } from '@playwright-testing-library/test/fixture.js';
33
import type { LocatorFixtures as TestingLibraryFixtures } from '@playwright-testing-library/test/fixture.js';
44

55
const test = baseTest.extend<TestingLibraryFixtures>(fixtures)
66

7-
test('resource edit', async ({ page, queries: { getAllByRole, getByLabelText, getByRole, getByText, queryByRole, queryByText } }) => {
7+
test('resource edit', async ({ page, within, queries: { getAllByRole, getByLabelText, getByRole, getByText, queryByRole, queryByText } }) => {
88
await page.goto('http://localhost:3000/books/');
99

1010
await expect(queryByText('Loading...')).not.toBeVisible();

tests/list.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { test as baseTest, expect } from '@playwright/test';
2-
import { locatorFixtures as fixtures, within } from '@playwright-testing-library/test/fixture.js';
2+
import { locatorFixtures as fixtures } from '@playwright-testing-library/test/fixture.js';
33
import type { LocatorFixtures as TestingLibraryFixtures } from '@playwright-testing-library/test/fixture.js';
44

55
const test = baseTest.extend<TestingLibraryFixtures>(fixtures)
66

7-
test('resource list', async ({ page, queries: { getAllByRole, getByLabelText, getByRole, queryByRole, queryByText } }) => {
7+
test('resource list', async ({ page, within, queries: { getAllByRole, getByLabelText, getByRole, queryByRole, queryByText } }) => {
88
await page.goto('http://localhost:3000/books/');
99

1010
await expect(queryByText('Loading...')).not.toBeVisible();

tests/show.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { test as baseTest, expect } from '@playwright/test';
2-
import { locatorFixtures as fixtures, within } from '@playwright-testing-library/test/fixture.js';
2+
import { locatorFixtures as fixtures } from '@playwright-testing-library/test/fixture.js';
33
import type { LocatorFixtures as TestingLibraryFixtures } from '@playwright-testing-library/test/fixture.js';
44

55
const test = baseTest.extend<TestingLibraryFixtures>(fixtures)
66

7-
test('resource show', async ({ page, queries: { getAllByRole, getByRole, queryByRole, queryByText } }) => {
7+
test('resource show', async ({ page, within, queries: { getAllByRole, getByRole, queryByRole, queryByText } }) => {
88
await page.goto('http://localhost:3000/books/');
99

1010
await expect(queryByText('Loading...')).not.toBeVisible();

0 commit comments

Comments
 (0)