Randy424 / console

The user interface for the cluster management portion of open-cluster-management.
Apache License 2.0
0 stars 0 forks source link

Credential testing #18

Closed Randy424 closed 10 months ago

Randy424 commented 1 year ago

Currently debugging my yaml parsing in commands.ts

Randy424 commented 1 year ago

@dtthuynh Hey! I think I figured out the best way to deal with the issue.

cy.fixture and cy.readfile are intended to be used for client-side file streaming in Cypress. fs, I guess, is only for server/node(?). So I hooked up cy.fixture, and now we asynchronously pull in the fixtures. There is a .then( ) callback where the input actions for each test will have to be placed...It's not the prettiest way to do this, but I think it's very clear what's happening within the code, and it adhere's to cypress' recommendations, so that's a win.

One other cool thing that's finally been added is typing for our provider-connection resource. If you throw the dot operator at the credentialObject: ProviderConnection you can see that the credential is strongly typed and it's fields can be spread by vsCode. My implementation for this is still a bit dumb. I just started our own Resource folder, which is skeleton copy of the one at frontend/src/resources. Take a look at it when you get a chance! I will continue thinking about how to optimize the use of the original resource directory, but for now I think this will do.

I will probably merge this when I fill out the testing for each provider, but I think this latest commit represents a hurdle over the challenging part of the story. Thanks!

Randy424 commented 1 year ago

Hey @dtthuynh, This is ready for review. I'll merge (into the larger feature branch) when I hear back from you. Feel free to comment if you feel there's anything missing. Thank you!