Skip to content

Commit

Permalink
feat: replacing SauceLabs with Playwright (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart authored Mar 22, 2022
1 parent 78c2865 commit 0cd313d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 80 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ npm init @brightspace-ui
### Default

* Project boilerplate including: README, .editorconfig, .gitignore, package.json, CODEOWNERS and LICENSE (Apache-2.0)
* LitElement component scaffold
* Lit component scaffold
* Demo
* Linting (JavaScript, Style, Lit)
* Unit tests with SauceLabs cross-browser testing
* Unit tests with cross-browser testing
* Continuous Integration using GitHub Actions
* Dependabot
* Publish to NPM
Expand Down
17 changes: 8 additions & 9 deletions src/generators/default-content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ export function run(templateData) {
const replacementsREADME = templateData;
replacementsREADME.labsChecklist = templateData.org === 'labs' ? `\n> Note: this is a ["labs" component](https://github.com/BrightspaceUI/guide/wiki/Component-Tiers). While functional, these tasks are prerequisites to promotion to BrightspaceUI "official" status:
>
> - [ ] [Design organization buy-in](https://github.com/BrightspaceUI/guide/wiki/Before-you-build#working-with-design)
> - [ ] [design.d2l entry](http://design.d2l/)
> - [ ] [Architectural sign-off](https://github.com/BrightspaceUI/guide/wiki/Before-you-build#web-component-architecture)
> - [ ] [Continuous integration](https://github.com/BrightspaceUI/guide/wiki/Testing#testing-continuously-with-travis-ci)
> - [ ] [Cross-browser testing](https://github.com/BrightspaceUI/guide/wiki/Testing#cross-browser-testing-with-sauce-labs)
> - [ ] [Unit tests](https://github.com/BrightspaceUI/guide/wiki/Testing#testing-with-polymer-test) (if applicable)
> - [ ] [Accessibility tests](https://github.com/BrightspaceUI/guide/wiki/Testing#automated-accessibility-testing-with-axe)
> - [ ] [Visual diff tests](https://github.com/BrightspaceUI/visual-diff)
> - [ ] [Localization](https://github.com/BrightspaceUI/guide/wiki/Localization) with Serge (if applicable)
> - [ ] [Design organization buy-in](https://daylight.d2l.dev/developing/creating-component/before-building/#working-with-design)
> - [ ] [Architectural sign-off](https://daylight.d2l.dev/developing/creating-component/before-building/#web-component-architecture)
> - [ ] [Continuous integration](https://daylight.d2l.dev/developing/testing/tools/#continuous-integration)
> - [ ] [Cross-browser testing](https://daylight.d2l.dev/developing/testing/cross-browser/)
> - [ ] [Unit tests](https://daylight.d2l.dev/developing/testing/tools/) (if applicable)
> - [ ] [Accessibility tests](https://daylight.d2l.dev/developing/testing/accessibility/)
> - [ ] [Visual diff tests](https://daylight.d2l.dev/developing/testing/visual-difference/)
> - [ ] Localization with Serge (if applicable)
> - [ ] Demo page
> - [ ] README documentation\n` : '';

Expand Down
6 changes: 0 additions & 6 deletions src/generators/test-unit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,5 @@ export function run(templateData) {
);
replaceText(`${getDestinationPath(templateData.hyphenatedName)}/test/${templateData.hyphenatedName}.test.js`, templateData);

copyFile(
`${__dirname}/templates/configured/_web-test-runner.sauce.config.js`,
`${getDestinationPath(templateData.hyphenatedName)}/web-test-runner.sauce.config.js`
);
replaceText(`${getDestinationPath(templateData.hyphenatedName)}/web-test-runner.sauce.config.js`, templateData);

copyFilesInDir(`${__dirname}/templates/static`, getDestinationPath(templateData.hyphenatedName));
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ jobs:
- name: Install dependencies
run: |
npm install
npm install @web/test-runner-saucelabs --no-save
npm install @web/test-runner-playwright --no-save
npx playwright install-deps
- name: Lint (JavaScript)
run: npm run lint:eslint
- name: Lint (CSS)
run: npm run lint:style
- name: Lint (Lit)
run: npm run lint:lit
- name: Unit Tests (SauceLabs)
run: npx web-test-runner --config web-test-runner.sauce.config.js
env:
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY_DESIRE2LEARN }}
SAUCE_USERNAME: Desire2Learn
- name: Unit Tests (cross-browser)
run: npx web-test-runner --config web-test-runner.config.js --group default --playwright --browsers chromium firefox webkit
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
}
},
testRunnerHtml: testFramework =>
`<html>
`<html lang="en">
<body>
<script src="node_modules/@brightspace-ui/core/tools/resize-observer-test-error-handler.js"></script>
<script type="module" src="${testFramework}"></script>
Expand Down

0 comments on commit 0cd313d

Please sign in to comment.