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

chore: Migrate updateProfile to ts #3607

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

chore: Migrate updateProfile to ts #3607

wants to merge 1 commit into from

Conversation

suejung-sentry
Copy link
Contributor

@codecov-staging
Copy link

codecov-staging bot commented Dec 23, 2024

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
2737 6 2731 0
View the top 3 failed tests by shortest run time
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when not running in self-hosted > when calling the mutation > returns new user
Stack Traces | 1.01s run time
AssertionError: expected undefined to strictly equal { …(5) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected: 
Object {
  "avatarUrl": "http://127.0.0.1/avatar-url",
  "email": "[email protected]",
  "name": "new name",
  "onboardingCompleted": false,
  "username": "TerrySmithDC",
}

+ Received: 
undefined

 ❯ .../services/user/useUpdateProfile.test.tsx:155:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when running in self-hosted > when calling the mutation > returns new user
Stack Traces | 1.01s run time
AssertionError: expected undefined to strictly equal { …(5) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected: 
Object {
  "avatarUrl": "http://127.0.0.1/avatar-url",
  "email": "[email protected]",
  "name": "new name",
  "onboardingCompleted": false,
  "username": "TerrySmithDC",
}

+ Received: 
undefined

 ❯ .../services/user/useUpdateProfile.test.tsx:110:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when not running in self-hosted > when calling the mutation > returns success
Stack Traces | 1.01s run time
AssertionError: expected false to be truthy

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected
+ Received

- true
+ false

 ❯ .../services/user/useUpdateProfile.test.tsx:142:62runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Dec 23, 2024

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
2737 6 2731 0
View the top 3 failed tests by shortest run time
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when not running in self-hosted > when calling the mutation > returns new user
Stack Traces | 1.01s run time
AssertionError: expected undefined to strictly equal { …(5) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected: 
Object {
  "avatarUrl": "http://127.0.0.1/avatar-url",
  "email": "[email protected]",
  "name": "new name",
  "onboardingCompleted": false,
  "username": "TerrySmithDC",
}

+ Received: 
undefined

 ❯ .../services/user/useUpdateProfile.test.tsx:155:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when running in self-hosted > when calling the mutation > returns new user
Stack Traces | 1.01s run time
AssertionError: expected undefined to strictly equal { …(5) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected: 
Object {
  "avatarUrl": "http://127.0.0.1/avatar-url",
  "email": "[email protected]",
  "name": "new name",
  "onboardingCompleted": false,
  "username": "TerrySmithDC",
}

+ Received: 
undefined

 ❯ .../services/user/useUpdateProfile.test.tsx:110:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when not running in self-hosted > when calling the mutation > returns success
Stack Traces | 1.01s run time
AssertionError: expected false to be truthy

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected
+ Received

- true
+ false

 ❯ .../services/user/useUpdateProfile.test.tsx:142:62runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Dec 23, 2024

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
3431 6 3425 0
View the top 3 failed tests by shortest run time
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when not running in self-hosted > when calling the mutation > returns new user
Stack Traces | 1.01s run time
AssertionError: expected undefined to strictly equal { …(5) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected: 
Object {
  "avatarUrl": "http://127.0.0.1/avatar-url",
  "email": "[email protected]",
  "name": "new name",
  "onboardingCompleted": false,
  "username": "TerrySmithDC",
}

+ Received: 
undefined

 ❯ .../services/user/useUpdateProfile.test.tsx:155:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when running in self-hosted > when calling the mutation > returns new user
Stack Traces | 1.01s run time
AssertionError: expected undefined to strictly equal { …(5) }

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected: 
Object {
  "avatarUrl": "http://127.0.0.1/avatar-url",
  "email": "[email protected]",
  "name": "new name",
  "onboardingCompleted": false,
  "username": "TerrySmithDC",
}

+ Received: 
undefined

 ❯ .../services/user/useUpdateProfile.test.tsx:110:39runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/services/user/useUpdateProfile.test.tsx > useUpdateProfile > when not running in self-hosted > when calling the mutation > returns success
Stack Traces | 1.01s run time
AssertionError: expected false to be truthy

Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div />
  </body>
</html>

- Expected
+ Received

- true
+ false

 ❯ .../services/user/useUpdateProfile.test.tsx:142:62runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
2433 2 2431 0
View the top 2 failed tests by shortest run time
src/pages/AccountSettings/tabs/Admin/DetailsSection/DetailsSection.test.jsx > DetailsSection > when submitting correct data > when mutation is successful > adds a success notification
Stack Traces | 1.08s run time
AssertionError: expected "spy" to be called with arguments: [ { type: 'success', …(1) } ]

Received: 

  1st spy call:

  Array [
    Object {
-     "text": "Information successfully updated",
-     "type": "success",
+     "text": "Something went wrong",
+     "type": "error",
    },
  ]


Number of calls: 1


Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div>
      <form
        class="mt-2 flex flex-col gap-4"
      >
        <h3
          class="text-lg font-semibold"
        >
          Your details
        </h3>
        <hr />
        <div
          class="flex flex-col gap-1 md:w-1/2"
        >
          <div>
            <label
              class="mb-2 block font-semibold"
              for="text-input53"
            >
              Name
            </label>
            <div
              class="relative"
            >
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border"
                data-marketing="email-card-edit-name"
                data-testid="name-input"
                id="name-edit"
                name="name"
                placeholder="Your name"
                type="text"
              />
            </div>
          </div>
        </div>
        <div
          class="flex flex-col gap-1 md:w-1/2"
        >
          <div>
            <label
              class="mb-2 block font-semibold"
              for="text-input54"
            >
              Email
            </label>
            <div
              class="relative"
            >
              <input
                class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border"
                data-marketing="email-card-edit-email"
                data-testid="email-input"
                id="email-edit"
                name="email"
                placeholder="Your email"
                type="text"
              />
            </div>
          </div>
        </div>
        <div>
          <button
            class="
  flex items-center gap-1
  rounded py-1 px-4
  transition-colors duration-150 motion-reduce:transition-none

  focus:outline-none focus:ring

  disabled:cursor-not-allowed 
 disabled:text-ds-gray-quaternary disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary 
    justify-center font-semibold
    text-ds-gray-octonary bg-ds-gray-primary border-ds-gray-quaternary
    border-solid border shadow

    hover:bg-ds-gray-secondary
  "
            data-cy="Update personal information"
            data-marketing="Update personal information"
            data-testid="Update personal information"
            type="submit"
          >
            Save changes
          </button>
        </div>
      </form>
    </div>
  </body>
</html>
 ❯ .../Admin/DetailsSection/DetailsSection.test.jsx:214:35runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16
src/pages/AccountSettings/tabs/Profile/NameEmailCard/NameEmailCard.test.jsx > NameEmailCard > when submitting correct data > when mutation is successful > adds a success notification
Stack Traces | 1.09s run time
AssertionError: expected "spy" to be called with arguments: [ { type: 'success', …(1) } ]

Received: 

  1st spy call:

  Array [
    Object {
-     "text": "Information successfully updated",
-     "type": "success",
+     "text": "Something went wrong",
+     "type": "error",
    },
  ]


Number of calls: 1


Ignored nodes: comments, script, style
<html>
  <head />
  <body>
    <div>
      <article
        class="border border-ds-gray-secondary bg-ds-container rounded-md p-10"
      >
        <form
          class="flex flex-col gap-8"
        >
          <div
            class="flex items-center justify-between"
          >
            <h1
              class="text-2xl"
            >
              Your details
            </h1>
            <button
              class="
  flex items-center gap-1
  rounded py-1 px-4
  transition-colors duration-150 motion-reduce:transition-none

  focus:outline-none focus:ring

  disabled:cursor-not-allowed 
 disabled:text-ds-gray-quaternary disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary 
    justify-center font-semibold
    text-ds-gray-octonary bg-ds-gray-primary border-ds-gray-quaternary
    border-solid border shadow

    hover:bg-ds-gray-secondary
  "
              data-cy="Update personal information"
              data-marketing="Update personal information"
              data-testid="Update personal information"
              type="submit"
            >
              Save changes
            </button>
          </div>
          <div
            class="flex flex-col justify-between gap-2 md:flex-row md:gap-4"
          >
            <div
              class="w-full md:w-1/2"
            >
              <label
                class="bold"
                for="name-edit"
              >
                Name
              </label>
              <div>
                <label
                  class="mb-2 block font-semibold sr-only"
                  for="text-input45"
                >
                  Your name
                </label>
                <div
                  class="relative"
                >
                  <input
                    class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border"
                    data-marketing="self-hosted-email-card-edit-name"
                    id="name-edit"
                    name="name"
                    placeholder="Your name"
                    type="text"
                  />
                </div>
              </div>
            </div>
            <div
              class="w-full md:mt-0 md:w-1/2"
            >
              <label
                class="bold"
                for="email-edit"
              >
                Email
              </label>
              <div>
                <label
                  class="mb-2 block font-semibold sr-only"
                  for="text-input46"
                >
                  Your email
                </label>
                <div
                  class="relative"
                >
                  <input
                    class="block h-8 w-full border-ds-gray-tertiary bg-ds-container px-3 text-sm disabled:border-ds-gray-tertiary disabled:bg-ds-gray-primary disabled:text-ds-gray-quaternary rounded border"
                    data-marketing="self-hosted-email-card-edit-email"
                    id="email-edit"
                    name="email"
                    placeholder="Your email"
                    type="text"
                  />
                </div>
              </div>
            </div>
          </div>
        </form>
      </article>
    </div>
  </body>
</html>
 ❯ .../Profile/NameEmailCard/NameEmailCard.test.jsx:248:35runWithExpensiveErrorDiagnosticsDisabled node_modules/@.../dom/dist/config.js:47:12checkCallback node_modules/@.../dom/dist/wait-for.js:124:77Timeout.checkRealTimersCallback node_modules/@.../dom/dist/wait-for.js:118:16

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant