mysterious-belgium-25713
10/18/2022, 3:24 PMgentle-mechanic-42608
10/18/2022, 3:26 PMcy.contains('.Mui-selected.MuiTableRow-root')
.children()
.find('p')
.should('have.text', 'Neue Position');
boundless-camera-50857
10/18/2022, 3:37 PMacceptable-hamburger-48790
10/18/2022, 3:45 PMbetter-engineer-26463
10/18/2022, 4:08 PMacceptable-hamburger-48790
10/18/2022, 4:09 PMrefined-raincoat-56329
10/18/2022, 4:19 PMtype NewAccountCredentials = {
username: string,
password: string,
vcode: number,
uid: string
};
credentials = await new Promise<NewAccountCredentials>((resolve) => {
cy.request(serverUrl + '/test-accounts/free').then(response => {
expect(response.body).to.have.property("username");
resolve(response.body);
})
});
await new Promise<void>((resolve, reject) => {
cy.request("DELETE", `${serverUrl}/test-accounts/uid/${credentials.uid}`).then(response => {
expect(response.status).to.be.equal(200);
resolve();
})
});
adorable-smartphone-87280
10/18/2022, 4:26 PMso your code looks like this {
even across multiple lines
}
refined-raincoat-56329
10/18/2022, 4:35 PMmysterious-belgium-25713
10/18/2022, 4:43 PMrefined-raincoat-56329
10/18/2022, 5:18 PMnarrow-artist-87113
10/18/2022, 5:49 PMnarrow-artist-87113
10/18/2022, 5:50 PMstale-optician-85950
10/18/2022, 6:29 PMcypress.config.js
narrow-artist-87113
10/18/2022, 6:34 PMstale-optician-85950
10/18/2022, 6:36 PM.env
file and installed the cypress-dotenv package, and then tried to call env vars in your code?
Actually, I can see the 'configure' notes in that package README are out of date for Cypress v10. So you can do this if you are using v10:
In your cypress.config.js
add to the top of file:
import cypressDotenv from 'cypress-dotenv';
Then within e2e > setupNodeEvents
section add:
e2e: {
setupNodeEvents: async (on, config) => {
// Use .env file to load local environment variables
config = cypressDotenv(config, {});
Then follow the example in `What does this thing do?' section as that is still relevant.brave-river-4142
10/18/2022, 8:12 PMstale-optician-85950
10/18/2022, 9:23 PM.trigger()
I just moved a card on a Trello board now and the sequence was:
- mouseover
- mousemove
- mouseout
- mousedown
- mouseup
Here's a custom command I have in previous project:
const buttonAttributes = [{
button: 0,
force: true,
}];
Cypress.Commands.add('dragAndDrop', (subject, target, toElPositionX, toElPositionY) => {
Cypress.log({
name: 'Drag & Drop',
message: 'Performing drag and drog',
});
cy.get(target.get(0)).then(($target) => {
cy.get(subject.get(0)).then(($subject) => {
cy.wrap($subject)
.trigger('mousedown', 'center', buttonAttributes)
.trigger('mousemove', 'center', buttonAttributes);
cy.wrap($target)
.trigger('mousemove', toElPositionX, toElPositionY, buttonAttributes)
.click(toElPositionX, toElPositionY, { force: true });
});
});
});
wonderful-whale-44360
10/19/2022, 12:29 AMgray-kilobyte-89541
10/19/2022, 2:24 AMrefined-raincoat-56329
10/19/2022, 2:40 AMbland-football-57990
10/19/2022, 4:22 AMbland-football-57990
10/19/2022, 4:22 AMwonderful-whale-44360
10/19/2022, 5:05 AMancient-tailor-59288
10/19/2022, 7:43 AMbitter-dress-1440
10/19/2022, 7:51 AMacceptable-hamburger-48790
10/19/2022, 7:57 AMfresh-doctor-14925
10/19/2022, 8:18 AMbitter-dress-1440
10/19/2022, 8:29 AM