Skip to content

Commit

Permalink
test: add unit test pass to CI with --enable-experimental-web-platfor…
Browse files Browse the repository at this point in the history
…m-features flag
  • Loading branch information
Westbrook committed Mar 7, 2023
1 parent 9b2617e commit 1e28cf8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@ jobs:
name: Are there changes?
command: git diff --exit-code

test-chromium-flags:
executor: node

steps:
- downstream
- run:
name: Run tests
command: yarn test:ci --config web-test-runner.config.ci-chromium-flags.js --group unit
- store_test_results:
path: /root/project/results/
- store_artifacts:
path: coverage
- run:
name: Are there changes?
command: git diff --exit-code

test-firefox:
executor: node

Expand Down Expand Up @@ -286,6 +302,7 @@ workflows:
build:
jobs:
- test-chromium
- test-chromium-flags
- test-firefox
- test-webkit
- hcm-visual:
Expand Down
17 changes: 17 additions & 0 deletions web-test-runner.config.ci-chromium-flags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright 2020 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { chromiumWithFlags } from './web-test-runner.utils.js';
import standard from './web-test-runner.config.ci.js';

standard.browsers = [chromiumWithFlags];

export default standard;
11 changes: 11 additions & 0 deletions web-test-runner.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ export const chromium = playwrightLauncher({
}),
});

export const chromiumWithFlags = playwrightLauncher({
product: 'chromium',
launchOptions: {
args: ['--enable-experimental-web-platform-features'],
},
createBrowserContext: ({ browser }) =>
browser.newContext({
ignoreHTTPSErrors: true,
}),
});

export const firefox = playwrightLauncher({
product: 'firefox',
createBrowserContext: ({ browser }) =>
Expand Down

0 comments on commit 1e28cf8

Please sign in to comment.