user
04/20/2021, 10:16 AMuser
04/20/2021, 10:17 AMastonishing-city-18705
04/22/2021, 12:26 PMuser
04/22/2021, 1:39 PMthis
). I could send you the full code I have now if you'd like (might be a bit long here)future-gold-77198
04/23/2021, 12:22 AMalert-photographer-39416
04/23/2021, 6:29 PMstocky-dream-36427
04/23/2021, 6:40 PMstocky-dream-36427
04/23/2021, 6:45 PMstocky-dream-36427
04/23/2021, 6:45 PMfuture-gold-77198
04/23/2021, 7:30 PMfuture-gold-77198
04/23/2021, 7:34 PMgray-kilobyte-89541
04/23/2021, 7:53 PMalert-photographer-39416
04/23/2021, 8:04 PMuser
04/25/2021, 9:37 PMCypress.Commands.add('login', (email, password, overrides = {}) => {
Cypress.log({
name: 'loginViaAuth0',
});
const options = {
method: 'POST',
url: Cypress.env('auth_url'),
body: {
grant_type: 'password',
username: email,
password: password,
audience: Cypress.env('auth_audience'),
scope: 'openid profile email',
client_id: Cypress.env('auth_client_id'),
client_secret: Cypress.env('auth_client_secret'),
},
};
cy.request(options)
.then((resp) => {
return resp.body;
})
.then((body) => {
const { access_token, id_token } = body;
const auth0State = {
nonce: '',
state: id_token
};
cy.visit(`/callback?code=${auth0State.state}state=${access_token}`,{
onBeforeLoad(win) {
win.document.cookie = 'auth0.is.authenticated', 'true';
win.document.cookie = '_legacy_auth0.is.authenticated', 'true';
}
}).as('login');
})
cy.wait('@login'. {timeout: 60000});
});
user
04/29/2021, 11:33 AMcy.get('.vl-data-table tbody').find('tr').contains('123456798').click();
Which worked fine, until we turned on throttling. Now we made some changes to instead do:
cy.get('.vl-data-table tbody').find(`tr:contains('123456789')`).click();
I guess this is because the table updates more slowly now, and the .find('tr')
actually returns old results, and does not get retried? (meaning the .contains'
get called on old values)
Is the solution we went for here the way to go (it feels a bit iffy), or is there another way this kind of thing should be done?user
04/29/2021, 11:40 AMstocky-dream-36427
04/29/2021, 12:23 PMtr
successfully finds the results before the update. It has no way of knowing what old/new are. You can do a
js
cy.get('.vl-data-table tbody').should(($tableBody) => { /* expect(....).to.contain(...) */ }
stocky-dream-36427
04/29/2021, 12:24 PMgray-kilobyte-89541
04/29/2021, 4:19 PMuser
04/29/2021, 5:55 PMuser
04/29/2021, 5:56 PMuser
04/29/2021, 5:57 PMuser
04/29/2021, 5:58 PMuser
04/29/2021, 5:59 PMuser
04/29/2021, 6:48 PMuser
04/29/2021, 6:50 PM.only
throughout our `describe`/`it`s for that, if that's what you mean.purple-afternoon-2408
05/02/2021, 1:58 AMcy.getCookie()
where it's timing out even though based on the documentation, it shouldn't. Anything I could be possibly missing?purple-afternoon-2408
05/02/2021, 2:05 AMalert-photographer-39416
05/03/2021, 4:07 PMalert-photographer-39416
05/03/2021, 4:07 PMhttps://www.google.com/search?tbm=isch&q=puppy
)