-
Notifications
You must be signed in to change notification settings - Fork 81
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
Upgrade frontend-build to v14 #1052
Conversation
Thanks for the pull request, @pomegranited! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
src/studio-home/StudioHome.test.jsx
Outdated
@@ -49,7 +49,7 @@ const RootWrapper = () => ( | |||
</AppProvider> | |||
); | |||
|
|||
describe('<StudioHome />', async () => { | |||
describe('<StudioHome />', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, were these tests even running? Probably not...
@pomegranited If you'd like, it might make sense to cherry-pick some of these commits into separate PRs that can be merged ASAP and independently, like "warnings about Duplicate message id" or "ensure all act() calls are async" |
[WARN] [FormatJS CLI] Duplicate message id: "course-authoring.content-tags-drawer.content-tags-collapsible.custom-menu.placeholder-text", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "authoring.alert.error.connection", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.import.page.title", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.card.menu.delete", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.page-alerts.discussionNotificationLearnMore", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.status-bar.video-sharing.title", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.subsection.button.new-unit", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-team.member.button.remove", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.files-and-uploads..deleteConfirmation.message", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.files-and-videos.sort-and-filter.modal.filter.activeCheckbox.label", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.files-and-videos.sort-and-filter.modal.filter.inactiveCheckbox.label", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.configure-modal.advanced-tab.timed-description", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.configure-modal.advanced-tab.timed-description", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.course-outline.configure-modal.advanced-tab.timed-description", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "course-authoring.export.stepper.header.title", but the `description` and/or `defaultMessage` are different. [WARN] [FormatJS CLI] Duplicate message id: "authoring.loading", but the `description` and/or `defaultMessage` are different.
Returning a Promise from "describe" is not supported.
Previous commit revealed several issues with these tests: * Don't nest userAction.click in act() -- nested act() statements have indeterminent behaviour. * Use getBy* instead of findBy* with userAction to avoid nested act() statements * Always await userEvent.click * Use fireEvent.click when the onClick handlers need to be called * Use queryBy* instead of getBy* when using .toBeInTheDocument or waitForElementToBeRemoved queryBy* return null when the element is not found.
Warning: React does not recognize the `data-testId` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `data-testid` instead.
* Don't nest userAction.click in act() -- nested act() statements have indeterminent behaviour.
test: Use useLocation to test route changes
…jill/frontend-build-14
…ai-translations to support frontend-build v14 Depends on: openedx/frontend-lib-content-components#475 openedx-unsupported/frontend-component-ai-translations#16 Commands used: npm install "git+https://github.com/open-craft/frontend-lib-content-components.git#jill/bilalqamar95/jest-v29-upgrade" npm install "git+https://github.com/open-craft/frontend-component-ai-translations.git#jill/frontend-platform-v8"
* remove "indent" setting from .eslintrc.js Using default config for indent instead of our custom setting. * add @typescript-eslint/ prefix to eslint-disable-line statements where flagged by linter * changed stylelint setting import-notation to "string" The alternative "url" setting doesn't work for all of our imports.
c68e81a
to
48cda53
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1052 +/- ##
=======================================
Coverage 92.59% 92.60%
=======================================
Files 710 710
Lines 12683 12683
Branches 2764 2764
=======================================
+ Hits 11744 11745 +1
+ Misses 903 902 -1
Partials 36 36 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 @pomegranited Great work on this! Things seems to be working smoothly. Just had a small non-blocker question about some test.
- I tested this: Ran locally and npm installed everything, enabled all new_studio_mfe flags, then navigated through all the pages to confirm nothing is broken.
- I read through the code
-
I checked for accessibility issues -
Includes documentation
@pomegranited Though I'm not sure how to go about the coverage issue in the CI. My hunch is that this is probably because many files were changed, and some code might not have had tests previously, hence the in the patch coverage it falls under the required limit. |
Hi @yusuf-musleh ,
I think if we merge the smaller PRs and then rebase this one, the coverage will fix itself. |
better than we did in the previous commit.
fb86d8a
to
3f53e96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a couple of await useEvent
instances. I assume they were from the other PR in which case this will eb fixed with a rebase, otherwise some of the points from the test warnign fix PR will apply here as well.
@@ -23,8 +23,7 @@ | |||
.configuration-card-header { | |||
display: flex; | |||
align-items: center; | |||
align-content: center; | |||
justify-content: space-between; | |||
place-content: center space-between; | |||
|
|||
.configuration-card-header__button { | |||
display: flex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I meat you can use those classes instead of using a custom class to apply the same styles.
i.e. do a search-replace with:
search className="configuration-card-header"
replace className="configuration-card-header d-flex align-items-start p-0 h-auto text-black "
Then these can be removed from the custom css
@pomegranited Thank you for working on this PR! TnL is looking to get this moved in asap so please let me know if there's anything I can do to help. |
@rayzhou-bit Could you help us get openedx-unsupported/frontend-component-ai-translations#16 merged? That's blocking this PR so that would definitely be a big help in getting this over the line sooner. Thanks :) |
I thought that the codecov/patch would fix itself when we merged those other PRs, but it hasn't. But now I'm worried that it will take too much more time to fix. Is there any way we can ignore this test failure for this particular case, and merge anyway? |
@pomegranited Yes I believe it will be fine just to ignore that and merge anyways. You're not responsible for increasing the test coverage of unrelated components that the diff happens to touch, which already weren't meeting the requirement. IMHO. It would be a different story if you added a bunch of new code without tests. As you can see, the overall coverage % of the project is not affected at all. |
Hi @rayzhou-bit , thank you for your help! Could we also get a release created for https://github.com/openedx/frontend-lib-content-components ? I need to update the dependency here now that openedx/frontend-lib-content-components#475 has been merged. |
@pomegranited 2.2.0 should work for |
df7b0fe
to
21924cb
Compare
@pomegranited @xitij2000 What's left before we can merge this? Merge the |
@bradenmacdonald Yep, we need openedx-unsupported/frontend-component-ai-translations#16 merged & tagged, that's all that's blocking us now. |
@xitij2000 There's an issue with the codecov token:
The validate workflow looks like it's configured correctly, so maybe that secret got removed? Or maybe these tokens expire? I don't know.. CC @bradenmacdonald @arbrandes in case you can help. |
Since the tests are passing and this PR doesn't have a coverage impact, I think it's safe to merge. However, I don't see any option to merge. As you said, it's probably an expired or missing token. Rerunning didn't help and I don't have the ability or access to fix the token issue. |
@pomegranited @xitij2000 I've seen this error happen sometimes, generally repushing/rerunning the tests after some time fixes the issue and the coverage gets uploaded. |
a63bfa0
to
0197c1d
Compare
@pomegranited @xitij2000 I believe the token is only available for PRs that come from the |
I had already rerun the tests. I also pushed this branch to this repo, but didn't want to create another PR from it, I remember sometimes having the same commits in a branch on the same repo helps. |
@pomegranited 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
Upgrades dependencies for frontend-build, frontend-package.
Supporting information
#1034
Private-ref: FAL-3750
Dependencies
Blocked by:
Based on these PRs, which are likely to merge quickly:
Testing instructions
CI should cover most of the functionality, but manual testing is needed to ensure essential features are not broken.
new_studio
toggles.