Newbie question here,
For Cypress test of a web project, I generated a random name for an item creation. I want to “store” the resultat as “const” in order to check that folder is created.
Here is my function:
function testFolderName() {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_"
for (var i = 0; i < 10; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
In the next cy.get I want to check the folder list contains a folder with random folder name that have been generated. But I have no idea where to start with.
thomas diana is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.