-
-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tests/e2e' into feature/tests-end-to-end
- Loading branch information
Showing
18 changed files
with
1,610 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,4 @@ jobs: | |
|
||
- run: npm run build --if-present | ||
|
||
- run: npm run test | ||
- run: npm run test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head lang="en"> | ||
<meta charset="UTF-8" /> | ||
<title>Vanilla LazyLoad - Demo Page</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<style> | ||
ul, | ||
li { | ||
list-style-type: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
li { | ||
min-height: 280px; | ||
} | ||
|
||
a, | ||
img { | ||
display: block; | ||
} | ||
|
||
img { | ||
border: 0; | ||
width: 220px; | ||
height: 280px; | ||
} | ||
|
||
img:not([src]):not([srcset]) { | ||
visibility: hidden; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Demo list</h1> | ||
<a href="async.html">async</a> | ||
<a href="async_multiple.html">async_multiple</a> | ||
<a href="background_images.html">background_images</a> | ||
<a href="background_images_image-set.html">background_images_image</a> | ||
<a href="background_images_multi.html">background_images_multi</a> | ||
<a href="container_multiple.html">container_multiple</a> | ||
<a href="container_single.html">container_single</a> | ||
<a href="dynamic_content.html">dynamic_content</a> | ||
<a href="dynamic_content_nodeset.html">dynamic_content_nodeset</a> | ||
<a href="embedded.html">embedded</a> | ||
<a href="error_no_restore.html">error_no_restore</a> | ||
<a href="error_restore.html">error_restore</a> | ||
<a href="esm.html">esm</a> | ||
<a href="fade_in.html">fade_in</a> | ||
<a href="hundreds.html">hundreds</a> | ||
<a href="iframes.html">iframes</a> | ||
<a href="image_basic.html">image_basic</a> | ||
<a href="image_hidden.html">image_hidden</a> | ||
<a href="image_no_classes.html">image_no_classes</a> | ||
<a href="image_ph_external.html">image_ph_external</a> | ||
<a href="image_ph_inline.html">image_ph_inline</a> | ||
<a href="image_srcset.html">image_srcset</a> | ||
<a href="image_srcset_lazy_sizes.html">image_srcset_lazy_sizes</a> | ||
<a href="image_srcset_sizes.html">image_srcset_sizes</a> | ||
<a href="lazily_load_lazyLoad.html">lazily_load_lazyLoad</a> | ||
<a href="lazy_functions.html">lazy_functions</a> | ||
<a href="load.html">load</a> | ||
<a href="load_all.html">load_all</a> | ||
<a href="native_lazyload.html">native_lazyload</a> | ||
<a href="native_lazyload_conditional.html">native_lazyload_conditional</a> | ||
<a href="object.html">object</a> | ||
<a href="picture_media.html">picture_media</a> | ||
<a href="picture_type_webp.html">picture_type_webp</a> | ||
<a href="popup_layer.html">popup_layer</a> | ||
<a href="print.html">print</a> | ||
<a href="restore_destroy.html">restore_destroy</a> | ||
<a href="sliders_css_only.html">sliders_css_only</a> | ||
<a href="swiper.html">swiper</a> | ||
<a href="thresholds.html">thresholds</a> | ||
<a href="video.html">video</a> | ||
<a href="video_autoplay.html">video_autoplay</a> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
// jest.config.js | ||
/** @type {import('jest').Config} */ | ||
module.exports = { | ||
//verbose: true, | ||
testMatch: ["**/__tests__/*.js"], | ||
testEnvironment: "jsdom" | ||
verbose: true, | ||
testMatch: ["<rootDir>/tests/unit/**/*.test.js"], | ||
testEnvironment: 'jsdom', | ||
collectCoverage: true, | ||
collectCoverageFrom: [ | ||
'src/**/*.js', | ||
] | ||
}; |
Oops, something went wrong.