diff --git a/.circleci/config.yml b/.circleci/config.yml index f30fa0076..0494705b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,42 +32,42 @@ jobs: - run: clj-kondo --version - run: - name: "fmt check backend [clj]" + name: "backend fmt check" working_directory: "./backend" command: | yarn install yarn run fmt:clj:check - run: - name: "fmt check exporter [clj]" + name: "exporter fmt check" working_directory: "./exporter" command: | yarn install yarn run fmt:clj:check - run: - name: "fmt check common [clj]" + name: "common fmt check" working_directory: "./common" command: | yarn install yarn run fmt:clj:check - run: - name: "fmt check frontend [clj]" + name: "frontend fmt check" working_directory: "./frontend" command: | yarn install yarn run fmt:clj:check - run: - name: common lint + name: "common linter check" working_directory: "./common" command: | yarn install yarn run lint:clj - run: - name: frontend lint + name: "frontend linter check" working_directory: "./frontend" command: | yarn install @@ -75,14 +75,14 @@ jobs: yarn run lint:clj - run: - name: backend lint + name: "backend linter check" working_directory: "./backend" command: | yarn install yarn run lint:clj - run: - name: exporter lint + name: "exporter linter check" working_directory: "./exporter" command: | yarn install @@ -102,15 +102,15 @@ jobs: yarn install yarn test - # - run: - # name: "frontend integration tests" - # working_directory: "./frontend" - # command: | - # yarn install - # yarn run compile - # clojure -M:dev:shadow-cljs compile main - # yarn playwright install --with-deps chromium - # yarn e2e:test + - run: + name: "frontend integration tests" + working_directory: "./frontend" + command: | + yarn install + yarn run compile + yarn run compile:cljs + yarn playwright install --with-deps chromium + yarn e2e:test - run: name: "backend tests" diff --git a/docker/devenv/Dockerfile b/docker/devenv/Dockerfile index e8eae9eeb..c67d3cc82 100644 --- a/docker/devenv/Dockerfile +++ b/docker/devenv/Dockerfile @@ -160,6 +160,7 @@ RUN set -eux; \ chown -R root /usr/local/nodejs; \ corepack enable; \ corepack install -g yarn@4.2.2; \ + npx playwright install --with-deps chromium; \ rm -rf /tmp/nodejs.tar.gz; RUN set -ex; \ diff --git a/frontend/package.json b/frontend/package.json index 06fb6ae7a..5138fa133 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -29,6 +29,7 @@ "translations:validate": "node ./scripts/validate-translations.js", "translations:find-unused": "node ./scripts/find-unused-translations.js", "compile": "node ./scripts/compile.js", + "compile:cljs": "clojure -M:dev:shadow-cljs compile main", "watch": "node ./scripts/watch.js", "e2e:server": "node ./scripts/e2e-server.js", "e2e:test": "playwright test", @@ -50,7 +51,7 @@ "animate.css": "^4.1.1", "autoprefixer": "^10.4.17", "concurrently": "^8.2.2", - "draft-js": "git+https://github.com/penpot/draft-js.git", + "draft-js": "git+https://github.com/penpot/draft-js.git#commit=4a99b2a6020b2af97f6dc5fa1b4275ec16b559a0", "express": "^4.19.2", "fancy-log": "^2.0.0", "gettext-parser": "^8.0.0", diff --git a/frontend/playwright.config.js b/frontend/playwright.config.js index c5a16ddb1..5446e6967 100644 --- a/frontend/playwright.config.js +++ b/frontend/playwright.config.js @@ -19,6 +19,10 @@ export default defineConfig({ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests by default; can be overriden with --workers */ workers: 1, + /* Timeout for expects (longer in CI) */ + expect: { + timeout: process.env.CI ? 20000 : 5000, + }, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: "html", /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ diff --git a/frontend/yarn.lock b/frontend/yarn.lock index e300b6aa2..2087b29ae 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -6680,9 +6680,9 @@ __metadata: languageName: node linkType: hard -"draft-js@git+https://github.com/penpot/draft-js.git": +"draft-js@git+https://github.com/penpot/draft-js.git#commit=4a99b2a6020b2af97f6dc5fa1b4275ec16b559a0": version: 0.11.7 - resolution: "draft-js@https://github.com/penpot/draft-js.git#commit=3119afbfa3efb80da6a7b232b0ae873a31e7acc0" + resolution: "draft-js@https://github.com/penpot/draft-js.git#commit=4a99b2a6020b2af97f6dc5fa1b4275ec16b559a0" dependencies: fbjs: "npm:^3.0.4" immutable: "npm:~3.7.4" @@ -6690,7 +6690,7 @@ __metadata: peerDependencies: react: ">=0.14.0" react-dom: ">=0.14.0" - checksum: 10c0/46f3dd133b174feeefe2f8cbd7b943385448727c375d0d75dc49651979cfd89d2a64347283749bc75dd789b095ce6747122c5822328f4ea15ba02ca5663ffb4b + checksum: 10c0/dcd6fd9481b445c0df31a414d5bf0b84ad691d50ac90d805b65c36fb4d26b1ada787f37a63cb437e2a1b6d8dc0f95b4f3c41f6a8082480235ab48b391900a43b languageName: node linkType: hard @@ -7926,7 +7926,7 @@ __metadata: autoprefixer: "npm:^10.4.17" concurrently: "npm:^8.2.2" date-fns: "npm:^3.3.1" - draft-js: "git+https://github.com/penpot/draft-js.git" + draft-js: "git+https://github.com/penpot/draft-js.git#commit=4a99b2a6020b2af97f6dc5fa1b4275ec16b559a0" eventsource-parser: "npm:^1.1.2" express: "npm:^4.19.2" fancy-log: "npm:^2.0.0"