Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:chore: Add steps, functions to test lazyload images -- #56 #61

Merged
merged 16 commits into from
Apr 8, 2024

Conversation

Khadreal
Copy link
Contributor

@Khadreal Khadreal commented Mar 28, 2024

Description

Add test for lazyloading images.

Fixes #56

Documentation

The command to run npm run test:llimages

User documentation

Explain how this code impacts users.

Technical documentation

Explain how this code works. Diagram & drawings are welcomed.

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

New dependencies

List any new dependencies that are required for this change.

Risks

List possible performance & security issues or risks, and explain how they have been mitigated.

Checklists

Feature validation

  • I validated all the Acceptance Criteria. If possible, provide sreenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Documentation

  • I prepared the user documentation for the feature/enhancement and shared it in the PR or the GitHub issue.
  • The user documentation covers new/changed entry points (endpoints, WP hooks, configuration files, ...).
  • I prepared the technical documentation if needed, and shared it in the PR or the GitHub issue.

Code style

  • I wrote self-explanatory code about what it does.
  • I wrote comments to explain why it does it.
  • I named variables and functions explicitely.
  • I protected entry points against unexpected inputs.
  • I did not introduce unecessary complexity.
  • I listed the introduced external dependencies explicitely on the PR.
  • I validated the repo-specific guidelines from CONTRIBUTING.md.

Observability

  • I handled errors when needed.
  •  I wrote user-facing messages that are understandable and provide actionable feedbacks.
  • I prepared ways to observe the implemented system (logs, data, etc.).

Risks

  •  I explicitely mentioned performance risks in the PR.
  • I explicitely mentioned security risks in the PR.

@Khadreal Khadreal requested a review from jeawhanlee April 2, 2024 13:02
@Khadreal Khadreal self-assigned this Apr 2, 2024
@Khadreal Khadreal marked this pull request as ready for review April 2, 2024 13:25
jeawhanlee
jeawhanlee previously approved these changes Apr 4, 2024
@jeawhanlee jeawhanlee dismissed their stale review April 4, 2024 10:53

Clicked on the approve button by mistake

config/wp.config.sample.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/features/lazy-load.feature Outdated Show resolved Hide resolved
utils/page-utils.ts Show resolved Hide resolved
utils/page-utils.ts Show resolved Hide resolved
jeawhanlee
jeawhanlee previously approved these changes Apr 4, 2024
// eslint-disable-next-line @typescript-eslint/naming-convention
lazyload_css_background_images: {
initialImages: [
'https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/test.png',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For images with e2e domain, can we read this from env variable so it can run on any e2e env? what do you think?

jeawhanlee
jeawhanlee previously approved these changes Apr 5, 2024
Copy link
Contributor

@hanna-meda hanna-meda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Khadreal, I've checked all 3 scenarios. Scenario for the /ll_bg_css_double_colon template is failing because expected images no longer correspond. Left you the correct list of images in review. Thank you.

src/support/steps/ll-css-bg-image.ts Show resolved Hide resolved
src/features/lazy-load.feature Outdated Show resolved Hide resolved
@Khadreal Khadreal requested a review from jeawhanlee April 6, 2024 12:10
@hanna-meda hanna-meda merged commit 18e39e8 into trunk Apr 8, 2024
1 check passed
@hanna-meda hanna-meda deleted the enhancement/56-build-lazyload-test branch April 8, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build a test that checks if content is Lazyloaded while scrolling the page
4 participants