-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[GH-21322] - Migrate /enterprise/guest_accounts Tests to TS #11327
Conversation
extended_commands.d.ts - add missing typedWithForce function definition email.d.ts - fix getRecentEmail param typedef common.d.ts - add missing uiGetButton param definition sidebar_left.ts - fix uiOpenTeamMenu item param optional user.d.ts - add missing apiAdminLoginWithMFA param definition - made apiCreateUser options param optional - made apiCreateGuestUser options param optional ui_commands.ts - change clickPostCommentIcon location param to optional
due to module.exports being typed as any, resulting in the error below. Fixes Error Message in guest_add_spec.ts: Module '"../elasticsearch_autocomplete/helpers"' has no exported member 'createPrivateChannel'.ts(2305)
Files moved to TS: - guest_add_spec - guest_experience_ui_spec - guest_identification_spec - guest_identification_ui_not_cloud_spec - guest_identification_ui_spec - guest_invitation_ui_more_spec - guest_invitation_ui_spec - guest_popover_ui_spec - guest_removal_ui_spec - member_invitation_ui_spec - system_console_guest_access_ui_spec - system_console_manage_guest_not_cloud_spec - system_console_manage_guest_spec
Not too sure about putting an empty function there. Please provide feedback on the best way to approach it.
@davidtaing: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. I understand the commands that are listed here |
Hello @davidtaing, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. |
E2E tests not automatically triggered, because PR has no approval yet. Please ask a developer to review and then try again to attach the QA label. |
e2e/cypress/tests/integration/enterprise/guest_accounts/guest_feature_spec.ts
Show resolved
Hide resolved
@@ -205,7 +205,7 @@ declare namespace Cypress { | |||
* @example | |||
* cy.apiCreateUser(options); | |||
*/ | |||
apiCreateUser(options: Record<string, any>): Chainable<{user: UserProfile}>; | |||
apiCreateUser(options?: Record<string, any>): Chainable<UserProfile>; |
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.
Moving to Chainable<UserProfile>
will probably break the other tests.
This was changed in PR #10910 - a.k.a the Support Migration PR
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.
Right. It should match the actual implementation. Please update to latest master.
Thanks @davidtaing! Please update to latest master then I'll take a look again. Ping whenever ready for review. |
That's great @saturninoabril! Thanks for the feedback. I get this in motion when I get the chance later. ETA: ~4ish hours. 🙂 |
@saturninoabril, all done mate! Edit: sorry, not done, I found a few errors via check-types. Fixing them now! Edit 2: Now I should be done! |
@davidtaing |
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.
@davidtaing thanks for updating! Several tests failed due to the changes made here. Before committing the changes, please make sure that the tests are passing on your local.
e2e/cypress/tests/integration/enterprise/guest_accounts/guest_add_spec.ts
Show resolved
Hide resolved
e2e/cypress/tests/integration/enterprise/guest_accounts/guest_feature_spec.ts
Show resolved
Hide resolved
e2e/cypress/tests/integration/enterprise/guest_accounts/guest_identification_ui_spec.ts
Show resolved
Hide resolved
e2e/cypress/tests/integration/enterprise/guest_accounts/guest_popover_ui_spec.ts
Show resolved
Hide resolved
Sorry, I will fix some of the linting errors and check the tests on my local before resubmitting. I hope I didn't use up too much of your time. |
No worries and thanks for your contribution! |
I'd like to unassign myself from this issue for the following two reasons:
But first things first, a sincere thank you for this opportunity. I have gained a lot of value from this PR, I have learnt a lot and you have made me a better Software Engineer. 👍 This was my gameplan:
Note: I was running a fresh Ubuntu 22.04.1 install. But
|
cd $(BUILD_SERVER_DIR) && [[ -f config/config.json ]] && \ | |
cp config/config.json config/config-backup.json && make config-reset || \ | |
echo "config.json not found" && make config-reset |
Running $ npm run cypress:run
in the e2e/cypress
folder
I'm assuming that 107 of the failed test suites were the enterprise tests.
I'd still like to contribute to Mattermost in the future and I'll be back, but this isn't a battle that I want to fight. Moving forward for all of my work in the future, I will be running tests and linting as part of my workflow.
Just wanted to ask some stupid questions as well.
|
@davidtaing |
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
Heads up that as part of our efforts to move to a monorepo, we're closing out a number of older pull requests like this one to help streamline the effort. If you'd like to preserve these changes -- even if you're not the original author! -- feel free to resubmit the pull request against the monorepo once it's ready. You can subscribe to mattermost-server-issue-22420 for status updates on this effort. |
Summary
Migrates the following integration tests to TS:
Updated Type Definitions:
/enterprise/elasticsearch_autocomplete/helpers/index.js
extended_commands.d.ts
email.d.ts
common.d.ts
sidebar_left.ts
user.d.ts
ui_commands.ts
Ticket Link
mattermost/mattermost#21322
Related Pull Requests
N/A
Screenshots
Release Note