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

Fix/issue 97 fix future date test from articles post file #102

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kat-kan
Copy link
Owner

@kat-kan kat-kan commented Jun 1, 2024

Resolves #97

Scope of changes:

Started as fix, evolved into testing more date formats.
This is a draft as I want Your opinion if You like this idea.

How to use it:

N/A

Any other comments?

...

Before submitting Pull Request, I've ensured that:

  • The PR is associated with the relevant Issue before its creation.
  • All new and existing tests passed
  • My commit messages follow the kawqa-gad-playwright project's git commit message format.

@kat-kan kat-kan requested a review from Slawomir-DKl June 1, 2024 20:29
@kat-kan kat-kan linked an issue Jun 1, 2024 that may be closed by this pull request
3 tasks
@kat-kan kat-kan marked this pull request as draft June 1, 2024 20:29
@kat-kan kat-kan changed the title [DRAT] Fix/issue 97 fix future date test from articles post file [DRAFT] Fix/issue 97 fix future date test from articles post file Jun 1, 2024
@kat-kan kat-kan self-assigned this Jun 1, 2024
@Justyna-KO
Copy link
Collaborator

@kat-kan
I think it's a good idea to perform our tets for different dates.
I like that we don't duplicate the code for these tests thanks to the loop.
One test fails with me:
Returns 201 Created after creating article with date 2023-06-24T13:05:45.155Z
Expected: 201
Received: 422
There is a problem with the appropriate assertions for different dates.

Copy link
Collaborator

@Slawomir-DKl Slawomir-DKl left a comment

Choose a reason for hiding this comment

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

@kat-kan Great changes! BTW, acc. to https://github.com/jaktestowac/gad-gui-api-demo/releases/tag/v2.6.6, the new version brings fixes in validation of article creation date. The fixes cause both tests "Returns 201 Created after creating article with date" to fail (the tests pass in 2.6.5). I'll try to investigate this today evening and maybe ask Krzysztof about this.

tests/api/articles/articles-post.spec.ts Outdated Show resolved Hide resolved
@Slawomir-DKl
Copy link
Collaborator

@kat-kan I think it's a good idea to perform our tets for different dates. I like that we don't duplicate the code for these tests thanks to the loop. One test fails with me: Returns 201 Created after creating article with date 2023-06-24T13:05:45.155Z Expected: 201 Received: 422 There is a problem with the appropriate assertions for different dates.

@Justyna-KO @kat-kan I've found the reason. Please take look at the comment to the line 16

@kat-kan kat-kan requested a review from Slawomir-DKl July 5, 2024 20:00
Justyna-KO
Justyna-KO previously approved these changes Jul 7, 2024
@kat-kan kat-kan marked this pull request as ready for review July 7, 2024 17:02
@kat-kan kat-kan force-pushed the fix/ISSUE-97_fix_future_date_test_from_articles_post_file branch from 1245220 to 8b23ff5 Compare July 7, 2024 17:15
@kat-kan kat-kan requested a review from Justyna-KO July 7, 2024 17:22
@kat-kan
Copy link
Owner Author

kat-kan commented Jul 7, 2024

@Justyna-KO @Slawomir-DKl and any others who'd like to contribute in code review:
as the idea to run tests against different data formats is approved, I removed draft type from PR. I believe it is ready to merge. I added Your suggestions.
The tests parameterization is yet to be introduced in comments tests - I will create another issue for this task.
I will also create issue for unique article titles (new validation in GAD that was mentioned by @Slawomir-DKl)

@kat-kan kat-kan changed the title [DRAFT] Fix/issue 97 fix future date test from articles post file Fix/issue 97 fix future date test from articles post file Jul 22, 2024
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.

Fix future-date test from articles-post file
3 participants