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

[CLA Received] wrote an e2e test for can create a notebook object #7236

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

saram7619
Copy link
Contributor

@saram7619 saram7619 commented Nov 14, 2023

Closes #7226

Describe your changes:

I created a domain object and confirmed that the newly created notebook has one section and one page, using playwright.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

Copy link

deploysentinel bot commented Nov 14, 2023

Current Playwright Test Results Summary

✅ 163 Passing - ⚠️ 6 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 12/04/2023 10:02:01pm UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: eb24dc4

Started: 12/04/2023 09:53:46pm UTC

⚠️ Flakes

📄   functional/plugins/plot/logPlot.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Log plot tests Log Plot ticks are functionally correct in regular and log mode and after refresh
Retry 1Initial Attempt
0% (0) 0 / 46 runs
failed over last 7 days
28.26% (13) 13 / 46 runs
flaked over last 7 days

📄   functional/plugins/telemetryTable/telemetryTable.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Telemetry Table unpauses and filters data when paused by button and user changes bounds
Retry 1Initial Attempt
0% (0) 0 / 43 runs
failed over last 7 days
27.91% (12) 12 / 43 runs
flaked over last 7 days

📄   functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Restricted Notebook with a page locked and with an embed @addinit Allows embeds to be deleted if page unlocked @addinit
Retry 1Initial Attempt
0% (0) 0 / 45 runs
failed over last 7 days
28.89% (13) 13 / 45 runs
flaked over last 7 days
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1Initial Attempt
2.22% (1) 1 / 45 run
failed over last 7 days
40% (18) 18 / 45 runs
flaked over last 7 days

📄   functional/planning/timelist.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Time List Create a Time List, add a single Plan to it and verify all the activities are displayed with no milliseconds
Retry 1Initial Attempt
1.47% (1) 1 / 68 run
failed over last 7 days
54.41% (37) 37 / 68 runs
flaked over last 7 days

📄   functional/plugins/notebook/notebookSnapshots.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Snapshot image tests Can drop an image onto a notebook and create a new entry
Retry 1Initial Attempt
2.17% (1) 1 / 46 run
failed over last 7 days
56.52% (26) 26 / 46 runs
flaked over last 7 days

View Detailed Build Results


Copy link

codecov bot commented Nov 14, 2023

Codecov Report

Merging #7236 (eb24dc4) into master (72e0621) will increase coverage by 0.12%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7236      +/-   ##
==========================================
+ Coverage   55.92%   56.05%   +0.12%     
==========================================
  Files         654      654              
  Lines       26265    26265              
  Branches     2538     2538              
==========================================
+ Hits        14688    14722      +34     
+ Misses      10864    10837      -27     
+ Partials      713      706       -7     
Flag Coverage Δ *Carryforward flag
e2e-full 41.85% <ø> (-0.02%) ⬇️ Carriedforward from 31c5b36
e2e-stable 58.42% <ø> (+0.10%) ⬆️
unit 49.31% <ø> (+0.10%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

see 13 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72e0621...eb24dc4. Read the comment docs.

@ozyx ozyx added the source:community Community contribution or request label Nov 14, 2023
@ozyx ozyx self-requested a review November 14, 2023 17:42
@ozyx ozyx changed the title wrote an e2e test for can create a notebook object [CLA Received] wrote an e2e test for can create a notebook object Nov 14, 2023
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Awesome job so far! I've left a few comments to shape this one up a bit. Let us know if you have any questions or run into any issues.

@ozyx ozyx added the type:maintenance tests, chores, or project maintenance label Nov 14, 2023
@ozyx ozyx self-requested a review November 16, 2023 19:28
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Nice work! Almost there. Just a couple more assertions to add and this will be g2g.

@saram7619
Copy link
Contributor Author

@ozyx I made the changes and I'm trying to push to the repository, but I keep getting this error.
Saras-MacBook-Air:openmct saramcclelland$ git add e2e/tests/functional/plugins/notebook/notebook.e2e.spec.js Saras-MacBook-Air:openmct saramcclelland$ git commit -m 'made suggested changes to notebook.e2e.spec.js' [notebook-e2e-test 0f95cfe9f] made suggested changes to notebook.e2e.spec.js 1 file changed, 4 insertions(+), 1 deletion(-)

Everything is fine until I push

Saras-MacBook-Air:openmct saramcclelland$ git push origin notebook-e2e-test To https://github.com/saram7619/openmct.git ! [rejected] notebook-e2e-test -> notebook-e2e-test (fetch first) error: failed to push some refs to 'https://github.com/saram7619/openmct.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I went to my forked repository and synced it incase it was the problem. Have you any suggestions that I can try?

@ozyx
Copy link
Contributor

ozyx commented Nov 20, 2023

@ozyx I made the changes and I'm trying to push to the repository, but I keep getting this error. Saras-MacBook-Air:openmct saramcclelland$ git add e2e/tests/functional/plugins/notebook/notebook.e2e.spec.js Saras-MacBook-Air:openmct saramcclelland$ git commit -m 'made suggested changes to notebook.e2e.spec.js' [notebook-e2e-test 0f95cfe9f] made suggested changes to notebook.e2e.spec.js 1 file changed, 4 insertions(+), 1 deletion(-)

Everything is fine until I push

Saras-MacBook-Air:openmct saramcclelland$ git push origin notebook-e2e-test To https://github.com/saram7619/openmct.git ! [rejected] notebook-e2e-test -> notebook-e2e-test (fetch first) error: failed to push some refs to 'https://github.com/saram7619/openmct.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I went to my forked repository and synced it incase it was the problem. Have you any suggestions that I can try?

Hi Sara,

Could you try the following:

  1. git stash -- store any local changes
  2. git pull origin notebook-e2e-test -- fetch/merge latest changes from your fork
  3. if you've already made your commit locally: git push origin notebook-e2e-test -- push your commit
  4. otherwise, git stash pop to restore your local changes, then make your commit and push the same way in step 3

@saram7619
Copy link
Contributor Author

@ozyx , I tried the suggestions. This is what I'm getting in my terminal

Saras-MacBook-Air:openmct saramcclelland$ git stash
No local changes to save
Saras-MacBook-Air:openmct saramcclelland$ git pull origin notebook-e2e-test
remote: Enumerating objects: 101, done.
remote: Counting objects: 100% (101/101), done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 101 (delta 43), reused 83 (delta 35), pack-reused 0
Receiving objects: 100% (101/101), 91.42 KiB | 1.43 MiB/s, done.
Resolving deltas: 100% (43/43), done.
From https://github.com/saram7619/openmct

  • branch notebook-e2e-test -> FETCH_HEAD
    cd28416..d5f95b9 notebook-e2e-test -> origin/notebook-e2e-test
    hint: You have divergent branches and need to specify how to reconcile them.
    hint: You can do so by running one of the following commands sometime before
    hint: your next pull:
    hint:
    hint: git config pull.rebase false # merge
    hint: git config pull.rebase true # rebase
    hint: git config pull.ff only # fast-forward only
    hint:
    hint: You can replace "git config" with "git config --global" to set a default
    hint: preference for all repositories. You can also pass --rebase, --no-rebase,
    hint: or --ff-only on the command line to override the configured default per
    hint: invocation.
    fatal: Need to specify how to reconcile divergent branches.
    Saras-MacBook-Air:openmct saramcclelland$

@ozyx
Copy link
Contributor

ozyx commented Nov 20, 2023

@saram7619

Give git pull origin notebook-e2e-test --merge a shot. That should create a merge commit that you can then push up

@saram7619
Copy link
Contributor Author

@ozyx, I tried git merge and got this
Saras-MacBook-Air:openmct saramcclelland$ git pull origin notebook-e2e-test --merge
error: unknown option `merge'

I ran git status and got this

Saras-MacBook-Air:openmct saramcclelland$ git status
On branch notebook-e2e-test
nothing to commit, working tree clean
Saras-MacBook-Air:openmct saramcclelland$ git push
fatal: The current branch notebook-e2e-test has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin notebook-e2e-test

To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.

Saras-MacBook-Air:openmct saramcclelland$

@ozyx
Copy link
Contributor

ozyx commented Nov 20, 2023

@saram7619 Could you try the suggestions in the error messages? Sorry, without your working space in front of me it's hard to debug this asynchronously. You might need to do some Googling (or ChatGPT-ing) for this one.

@ozyx ozyx self-requested a review December 1, 2023 17:34
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks!

@ozyx ozyx added this to the Target:3.3.0 milestone Dec 4, 2023
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Dec 4, 2023
@ozyx ozyx enabled auto-merge (squash) December 4, 2023 21:51
@ozyx ozyx disabled auto-merge December 4, 2023 21:51
@ozyx ozyx enabled auto-merge (squash) December 4, 2023 21:52
@ozyx ozyx merged commit cfb190f into nasa:master Dec 4, 2023
12 of 13 checks passed
@saram7619 saram7619 deleted the notebook-e2e-test branch December 12, 2023 13:21
@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:e2e:couchdb npm run test:e2e:couchdb source:community Community contribution or request type:maintenance tests, chores, or project maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[e2e test] in notebook.e2e.spec.js
3 participants