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

Attempt to fix failing tests in current main #153

Merged
merged 6 commits into from
Jun 15, 2023
Merged

Attempt to fix failing tests in current main #153

merged 6 commits into from
Jun 15, 2023

Conversation

GlobalMin
Copy link
Contributor

@GlobalMin GlobalMin commented Jun 15, 2023

THIS IS SOMEWHERE BETWEEN A DRAFT AND A NORMAL PR

Note: This pull request is created to address the current integration test failure on the main branch. I'm fairly sure that the edits here do fix it but I can't verify fully until someone reruns the checks for the updates to the original PR. I will modify this note if that happens and it works as I intended.



Hi EB team. πŸ‘‹

What is the issue

The current main branch is failing the UI-integration tests which leads to noticeable ❌ as the status of passing required checks. This is likely not an issue for the core functionality but it's always nice to be able to keep main βœ… , so here's my attempt to help with that.

Reproducing/context

When I clone the latest main branch which comes PR #147 and I run the UI tests locally with this flow taken from the README in the ui-tests folder I get a failing test.

cd ./ui-tests
jlpm install
jlpm playwright install

jlpm playwright test -u

I get this error:

      26 |     const nbPanel = await page.notebook.getNotebookInPanel();
      27 |
    > 28 |     expect(await nbPanel!.screenshot()).toMatchSnapshot();
         |                                         ^
      29 |   });
      30 | });
      31 |

which looks to be the exact line and issue with the failing test right now. Nice.

Fix (maybe)

Simply changing that to jlpm playwright test --update-snapshots locally fixes this and the tests pass but from my reading around this repo I think the way to handle it within a Github PR is to use the comment please update playwright snapshots and then rerunning the tests. I was able to do this successfully on a forked repo so I'm hopeful this works.

Screenshot 2023-06-15 at 2 37 35 AM

@github-actions
Copy link
Contributor

Binder πŸ‘ˆ Launch a Binder on branch GlobalMin/jupyterlab-myst/main

@GlobalMin
Copy link
Contributor Author

Hi πŸ‘‹ @rowanc1 @agoose77.

Could one of you approve the blocked workflows so I can verify the modification I made is fixing a failed test?

@GlobalMin
Copy link
Contributor Author

This is the exact scenario I outlined here: #154 . I think there are other key checks that matter for this PR but the failure is something I can't control or prevent unless I'm missing something.

@GlobalMin
Copy link
Contributor Author

please update playwright snapshots

@GlobalMin GlobalMin closed this Jun 15, 2023
@GlobalMin GlobalMin reopened this Jun 15, 2023
@rowanc1 rowanc1 added the bug Something isn't working label Jun 15, 2023
@rowanc1
Copy link
Member

rowanc1 commented Jun 15, 2023

Looks like the placement of the JupyterLab alert changed! Thanks for the help!

Could you delete the darwin screenshot? My thinking so far on that is that we should only keep the snapshots that are created on CI tracked in the git repo.

@GlobalMin
Copy link
Contributor Author

Looks like the placement of the JupyterLab alert changed! Thanks for the help!

Could you delete the darwin screenshot? My thinking so far on that is that we should only keep the snapshots that are created on CI tracked in the git repo.

Sure, happy to make an effort to learn and adopt the development guidelines and I agree that your comment is the best way to go to avoid any weird local machine glitches creating more problems if they get pushed. So I would just remove the darwin addition which is really just reverting to the current main right? If so, then...

I'm trying to decide the cleanest way to handle this between:

  • Continue with this PR - for simplicity and time the proper fixes can be continued here and either the roundabout commits are fine or we can clean them up.
  • Close this PR and build off of current main - My current understanding of how to fix this is actually no code changes need to happen. It just needs an empty commit to create a PR, then adding please update playwright snapshots as a comment should update and fix.

I would choose the 2nd idea. Do you agree?

@rowanc1
Copy link
Member

rowanc1 commented Jun 15, 2023

I would say continue with this PR is the easiest!

We will squash the history when we merge, such that there is only a single commit to the main branch.

@rowanc1
Copy link
Member

rowanc1 commented Jun 15, 2023

please update playwright snapshots

@rowanc1 rowanc1 merged commit 840733a into executablebooks:main Jun 15, 2023
@welcome
Copy link

welcome bot commented Jun 15, 2023

Congrats on your first merged pull request in this project! πŸŽ‰
congrats

Thank you for contributing, we are very proud of you! ❀️

@rowanc1
Copy link
Member

rowanc1 commented Jun 15, 2023

Thanks for your help with this @GlobalMin!

@GlobalMin
Copy link
Contributor Author

@rowanc1

I am excited to contribute something to this project! πŸ’» I plan on trying to help with low hanging fruit like this for the next few months at least while I'm on sabbatical. Really love the mission of EB and I'll get to stretch my skills as well.

Squash syntax question

I spent way too long trying to do the squashing from my fork and got myself into some infinite loop. Just for my education, did you use this syntax just now to squash?

git reset --soft HEAD~2

or git merge --squash?

@rowanc1
Copy link
Member

rowanc1 commented Jun 15, 2023

There is a button in the github UI:

image

I actually have no idea how to squash via the command line. :)

Thanks again for your help, help on docs and READMEs and tests are very helpful! Excited to have you on board!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants