Skip to content

Create test.spec.js#24

Open
wpscholar wants to merge 1 commit into
mainfrom
wpscholar-patch-1
Open

Create test.spec.js#24
wpscholar wants to merge 1 commit into
mainfrom
wpscholar-patch-1

Conversation

@wpscholar

@wpscholar wpscholar commented Nov 13, 2024

Copy link
Copy Markdown
Owner

Proposed changes

copilot:summary

Type of Change

  • [] Bugfix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)

Checklist

  • [] Linting and tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] I have added necessary documentation (if appropriate)

Further comments

@wpscholar wpscholar self-assigned this Nov 13, 2024
@wpscholar

Copy link
Copy Markdown
Owner Author

copilot:summary

@wpscholar

Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@wpscholar

Copy link
Copy Markdown
Owner Author

@copilot Add 5 intentional bugs to this PR

Copilot AI mentioned this pull request Feb 5, 2026
3 tasks

Copilot AI commented Feb 5, 2026

Copy link
Copy Markdown

@wpscholar I've opened a new pull request, #25, to work on those changes. Once the pull request is ready, I'll request review from you.

@wpscholar wpscholar left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Summary:

  • Test structure looks good; suggested using Cypress each for more predictable command sequencing.
  • Performance marks/measures can accumulate across visits; consider clearing or using unique marks to avoid stale entries.

.then(
(entries) => {
entries
.forEach(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Consider using cy.wrap(entries).each(...) instead of forEach. Cypress recommends each for command sequencing; forEach can make command ordering and failures harder to reason about when iterating.

.its('performance')
.then((performance) => {
performance.measure('pageLoad', 'start-loading', 'end-loading');
const measure = performance.getEntriesByName('pageLoad')[0];

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Since this runs multiple cy.visit calls, the performance entries will accumulate. Either clear marks/measures before each visit (performance.clearMarks()/clearMeasures()), use unique mark names per URL, or grab the last entry from getEntriesByName instead of [0] to avoid stale measurements.

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.

2 participants