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

[frontend] e2e tests on dashbaords - chunk 2 (#6704) #7135

Merged
merged 5 commits into from
Jun 13, 2024
Merged

Conversation

lndrtrbn
Copy link
Member

@lndrtrbn lndrtrbn commented May 27, 2024

Proposed changes

  • Add tests on dashboard CRUD operations

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

@lndrtrbn lndrtrbn changed the title Issue/6704 2 [frontend] e2e tests on dashbaords - chunk 2 (#6704) Jun 10, 2024
@lndrtrbn lndrtrbn marked this pull request as ready for review June 10, 2024 16:12
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.75%. Comparing base (eb9a2c1) to head (99390c0).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7135   +/-   ##
=======================================
  Coverage   67.74%   67.75%           
=======================================
  Files         561      561           
  Lines       68824    68824           
  Branches     5870     5872    +2     
=======================================
+ Hits        46628    46633    +5     
+ Misses      22196    22191    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lndrtrbn lndrtrbn added the filigran team use to identify PR from the Filigran team label Jun 11, 2024
Copy link
Member

@marieflorescontact marieflorescontact left a comment

Choose a reason for hiding this comment

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

error when I run dashboards CRUD tests:

image

@lndrtrbn
Copy link
Member Author

error when I run dashboards CRUD tests:

image

Run insert:dev:e2e, you don't have label e2e because you have no data with this label right now

Copy link
Member

@jpkha jpkha left a comment

Choose a reason for hiding this comment

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

Great PR there. Many good examples for the e2e test. Very informative 👍.

await expect(dashboardDetailsPage.getTitle(updateDashboardName)).toBeVisible();
await dashboardDetailsPage.getActionsPopover().click();
await dashboardDetailsPage.getActionButton('Update').click();
// expect(await dashboardForm.descriptionField.value()).toEqual('New description');
Copy link
Member

Choose a reason for hiding this comment

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

Should it be kept as comments?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh no indeed, I forgot this one thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@@ -20,7 +20,7 @@
"start:cluster": "NODE_ENV=cluster node build/back.js",
"serv": "node build/back.js",
"insert:dev": "node build/script-insert-dataset.js --datasets=DATA-TEST-STIX2_v2,poisonivy",
"insert:dev:e2e": "ELASTICSEARCH__INDEX_PREFIX=e2e node build/script-insert-dataset.js --datasets=DATA-TEST-STIX2_v2,data-test-stix-e2e",
"insert:dev:e2e": "ELASTICSEARCH__INDEX_PREFIX=e2e node build/script-insert-dataset.js --datasets=DATA-TEST-STIX2_v2,data-test-stix-e2e,poisonivy",
Copy link
Member

Choose a reason for hiding this comment

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

Is the script used elsewhere? Would it be better to write the dataset directly into the script?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is the same script used for insert data for testing purpose and for local environment (cf insert:dev) that's why now we have an argument to tell which dataset to use

@lndrtrbn lndrtrbn merged commit e2c647f into master Jun 13, 2024
5 checks passed
@lndrtrbn lndrtrbn deleted the issue/6704-2 branch June 13, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants