Conversation
It's similar to the current way this file is doing
Member
Author
|
In case, it helps, here is my screen record for the specific failed test with this fix: |
nielslange
previously approved these changes
Jun 10, 2021
Contributor
nielslange
left a comment
There was a problem hiding this comment.
LGTM!
I tested this PR using the following steps:
- Start Docker
- Run
npm run wp-env start - Run
npm run test-e2e - One test case is failing
> edit-flow@2.0.0 test-e2e
> wp-scripts test-e2e --config tests/e2e/jest.config.js
FAIL tests/e2e/specs/calendar-body.test.js (25.717s)
● Calendar Body › expects a scheduled post can be dragged and dropped
expect(received).not.toContain(expected) // indexOf
Expected value: not "Scheduled Post"
Received array: ["Scheduled Post", "Published Post"]
94 | expect(await scheduledPostDay.evaluate((node) => {
95 | return Array.prototype.slice.call(node.querySelectorAll('.item-headline.post-title strong')).map((n) => n.innerText)
> 96 | })).not.toContain('Scheduled Post');
| ^
97 | });
98 | });
at _callee3$ (specs/calendar-body.test.js:96:17)
at asyncGeneratorStep (specs/calendar-body.test.js:7:103)
at _next (specs/calendar-body.test.js:9:194)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (../../node:internal/process/task_queues:96:5)
PASS tests/e2e/specs/editorial-comments.test.js (7.023s)
PASS tests/e2e/specs/calendar-header.test.js (5.558s)
PASS tests/e2e/specs/simple.test.js
Test Suites: 1 failed, 3 passed, 4 total
Tests: 1 failed, 5 passed, 6 total
Snapshots: 0 total
Time: 39.61s, estimated 40s
Ran all test suites.
- Check out this PR
- Run
npm run test-e2e - All test cases are successful
> edit-flow@2.0.0 test-e2e
> wp-scripts test-e2e --config tests/e2e/jest.config.js
PASS tests/e2e/specs/calendar-body.test.js (25.829s)
PASS tests/e2e/specs/calendar-header.test.js (5.989s)
PASS tests/e2e/specs/simple.test.js
PASS tests/e2e/specs/editorial-comments.test.js (6.472s)
Test Suites: 4 passed, 4 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: 39.641s
Ran all test suites.
Member
Author
|
Thanks @nielslange and @mikeyarce! I've merged this PR after updating the comment :D |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #652
Description
The root cause is described here #652 (comment)
To fix this issue, I am changing the way selecting a future date for schedulePost:
Some notes:
e2e-test-utils. I pulled Gutenberg and searched on this specific folderpackages/e2e-test-utils/src, which hosts this package.Steps to Test
If possible, we can use the diff in this comment #652 (comment) to generate new screenshots with this fix.
With this fix, the date of the post is expected now: