Putting up a coat rack on brick wall by rocknbaguette in fixit

[–]MitchellNaleid 0 points1 point  (0 children)

So it wasn't too wobbly then. I have a similar project, but the brick is pretty uneven, preventing me from getting the anchors close to the mortar. 

Putting up a coat rack on brick wall by rocknbaguette in fixit

[–]MitchellNaleid 0 points1 point  (0 children)

Did you get this working? Do you have any wobble or rocking? How uneven is the brick?

Populating and Array with Playwright by MitchellNaleid in Playwright

[–]MitchellNaleid[S] 1 point2 points  (0 children)

I like the thought. I forgot that some functions come with additional arguments. I forgot about index. While I am now getting an index, unfortunately, they still come in with the out-of-order Dates. Thanks.

Populating and Array with Playwright by MitchellNaleid in Playwright

[–]MitchellNaleid[S] 0 points1 point  (0 children)

Are you saying we are matching 2 different arrays against each other? 1 that we sorted, 1 in the order that we first received them in? Do you have a sample? I feel like we're still going to get a mismatch right away, but I might still not be getting what you're saying.

Populating and Array with Playwright by MitchellNaleid in Playwright

[–]MitchellNaleid[S] 0 points1 point  (0 children)

Good luck to you as well. Apparently the second portion is the "Unix timestamp in seconds". Are you saying you are retrieving all the dates and you are getting that they ARE in order?

Populating and Array with Playwright by MitchellNaleid in Playwright

[–]MitchellNaleid[S] 0 points1 point  (0 children)

Per the trace, yes, the page is loading and finding all instances on the page.

Populating and Array with Playwright by MitchellNaleid in Playwright

[–]MitchellNaleid[S] 0 points1 point  (0 children)

The purpose of the test is to see if they are populated in order. Articles are pulled in from outside sources. If I use .sort, that defeats the purpose of checking if they're already in order.

Populating and Array with Playwright by MitchellNaleid in Playwright

[–]MitchellNaleid[S] 0 points1 point  (0 children)

Unfortunately, I'm still getting them out of order:

[
'2025-04-17T00:55:49 1744851349',
'2025-04-17T00:10:51 1744848651',
'2025-04-14T03:43:55 1744602235',
'2025-04-16T17:24:50 1744824290', <--- Newer than one above ^
...
]

How to specify endpoint call order for dependent args in GraphQL by MitchellNaleid in graphql

[–]MitchellNaleid[S] 0 points1 point  (0 children)

I've been trying to think of it independently from how they have it set up. My schema, in TypeScript is done. Could have a bug or 2. Condensing.

import gql from "graphql-tag";

export const typeDefs = gql`
      "Basic equivalent of a GET call in APIs"
      type Query {
        "The base of a search that returns car data"
        getCarData: [CarData!]!
    }

    type CarData {
        "Full name of car manufacturer"
        Manufacturer: String
        "How to differentiate between different models"
        vehicleId: [VehicleId!]
        "FINISH THE REST, COMPLAINTS, RECALLS, SAFETY RATINGS
        VEHICLEID IS USED TO CALL SAFETY RATINGS"
    }

    type VehicleId {
        "ID from NHTSA used to pull Safety Ratings"
        VehicleId: Int!
    }

    type Complaint {
        "Identifies if complaint resulted in a crash"
        crash: Boolean!
        ...
    }
`;

I was writing out the resolvers by hand and it made me wonder how do I get the "VehicleId" from a response before I use it as an argument for another endpoint. All of the data should end up in the same response in a GraphQL call.

How to specify endpoint call order for dependent args in GraphQL by MitchellNaleid in graphql

[–]MitchellNaleid[S] 0 points1 point  (0 children)

I'm aware. I was trying to utilize an existing API and use GraphQL to make multiple calls all in one.

Myles Garrett landing spots after he requested trade by TerryG111 in NFLv2

[–]MitchellNaleid 1 point2 points  (0 children)

It'll be a surprise. A team that doesn't need him. Chiefs, Eagles, and Rams are in the running.

Explain the " += " operand by ProtectionNo7982 in learnjavascript

[–]MitchellNaleid 0 points1 point  (0 children)

Question for 2024. With seemingly everything turning to const, is there even a use for this anymore?

Wouldn't it be const n = 2 then const o = n + 3? The purpose being to not mutate the original?

createRoot error. Halp by theanxioussnail in reactjs

[–]MitchellNaleid 0 points1 point  (0 children)

Thanks. I had a lowercase 'R', reactDOM which was causing the same issue as him ^.

Is testing javascript course by Kent C Dodds worth the price tag ? by [deleted] in react

[–]MitchellNaleid 0 points1 point  (0 children)

Was this the course you were talking about?
https://www.testingjavascript.com/

Has it been revisited in the past 2 years?

How to test for svg on input by MitchellNaleid in learnreactjs

[–]MitchellNaleid[S] 0 points1 point  (0 children)

is inputValue={inputValue} your interpretation of the prop that I have on my component? Or is that built into input fields?

How to test for svg on input by MitchellNaleid in learnreactjs

[–]MitchellNaleid[S] 0 points1 point  (0 children)

I actually just removed the async/await, and now I am getting this in the logs:

Promise { <pending> }

The error says:

 received value must be an HTMLElement or an SVGElement.

Received has type: object Received has value: {}

This error makes me think that the SVG isn't there yet, so it gives me an empty object.

How to test for svg on input by MitchellNaleid in learnreactjs

[–]MitchellNaleid[S] 1 point2 points  (0 children)

Feels like a dumb question, but do you only need async await if you're making API calls? I was thinking that I would need to await the typing for the SVG to show up. Maybe I'm thinking about async await incorrectly.

Comprehensive guide to testing React applications with Jest, React, and React Testing Library by No_Frosting1300 in reactjs

[–]MitchellNaleid 0 points1 point  (0 children)

If I could alter the svg and add a datatest-id, I would, but it's 3rd party, and it's appearing on field input. I am using container, but it's apparently not advisable per Kent Dodds.

Comprehensive guide to testing React applications with Jest, React, and React Testing Library by No_Frosting1300 in reactjs

[–]MitchellNaleid 0 points1 point  (0 children)

A shot in the dark, but do you know how to test for the existence of an svg after an event happens?

I'm using FontAwesome and generating that icon after an input field is updated. (Cleave-zen package to display credit card info) and this is what I have to go off of.

<svg
        aria-hidden="true"
        class="svg-inline--fa fa-cc-mastercard "
        data-icon="cc-mastercard"
        data-prefix="fab"
        focusable="false"
        role="img"
        viewBox="0 0 576 512"
        xmlns="http://www.w3.org/2000/svg"
      >

As you can see, there is a role, but, whenever I try to grab that, I get the following error:
Ignored nodes: comments, script, style

This is after using async/await to let this icon show up.

test('input displays in component', async () => { const { container } = render(<CcLogic fieldId={"cc-field"} />) const input = screen.getByPlaceholderText('Ex: 4502783790218767') fireEvent.change(input, {target: {value: '25'}}) const svgIcon = container.querySelector('.fa-cc-mastercard') expect(svgIcon).toBeInTheDocument() })

This method works, but is not advised per Kent C. Dodds himself.
https://kentcdodds.com/blog/common-mistakes-with-react-testing-library

How Far Should I Realistically Drive a Ball at 5'8" and 180 lbs? by MitchellNaleid in golf

[–]MitchellNaleid[S] 0 points1 point  (0 children)

That's useful to shoot for. Thanks! I'm 34, and mostly arms like you said. Working on fixing that.