handsome-dress-30825
07/18/2022, 10:11 AMgreen-flag-2140
07/18/2022, 11:40 AMgray-kilobyte-89541
07/18/2022, 2:10 PMlimited-lawyer-57746
07/18/2022, 2:32 PM// commands.js
Cypress.Commands.add('login', (email, password, { cacheSession = true } = {}) => {
const args = { email, password }
Cypress.log({
name: 'loginViaAuth0',
});
const login = () => {
cy.visit("/auth/login")
cy.origin('https://myDomain.us.auth0.com', {args}, ({ email, password }) => {
cy.get('[id=organizationName]').type("orgNameHere")
cy.get('button').contains('Continue').click()
cy.get('[id=username]').type(email)
cy.get('[id=password]').type(password)
cy.get('[name=action]').click()
})
}
if (cacheSession) {
cy.session('login', login)
} else {
login()
}
})
// test.spec.ts
describe("home page tests", () => {
beforeEach(() => {
cy.login(Cypress.env("auth_username"), Cypress.env("auth_password"));
cy.visit("/app/dashboard");
});
it("should navigate to dashboard manage sets", () => {
cy.wait(3000);
cy.get("div").contains("drawer1").click();
cy.get("div").contains("Manage Sets").click();
cy.get("p").contains("Select Set to Login");
});
it("should navigate to dashboard manage sets", () => {
cy.wait(3000);
cy.get("div").contains("drawer2").click();
cy.get("div").contains("Manage Sets2").click();
cy.get("p").contains("Select Set to Login2");
});
});
green-flag-2140
07/18/2022, 4:14 PMearly-computer-34425
07/19/2022, 6:18 AMquick-helicopter-52253
07/19/2022, 7:57 AMblockHosts
working in Cypress 10.3.0 - am I handling something wrong?
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
baseUrl: 'http://X.myshopify.com',
},
env: {
SHOPIFY_THEME_ID: 'X',
},
blockHosts: [
'*.google-analytics.com',
'*google-analytics.com',
'*.ipgeolocation.io',
'*ipgeolocation.io',
]
});
quick-helicopter-52253
07/19/2022, 8:21 AMblockHosts
working inwooden-teacher-96595
07/19/2022, 10:24 AMadventurous-afternoon-66082
07/19/2022, 11:13 AMcuddly-orange-98458
07/19/2022, 11:41 AMcuddly-orange-98458
07/19/2022, 11:44 AMwonderful-salesclerk-27570
07/19/2022, 11:44 AMwonderful-salesclerk-27570
07/19/2022, 11:45 AMwonderful-salesclerk-27570
07/19/2022, 11:45 AMwonderful-salesclerk-27570
07/19/2022, 11:45 AMwonderful-salesclerk-27570
07/19/2022, 11:46 AMbrash-ghost-16880
07/19/2022, 1:51 PMcuddly-orange-98458
07/19/2022, 3:19 PMadamant-rose-16948
07/19/2022, 3:23 PMfamous-restaurant-30435
07/19/2022, 3:31 PMadamant-rose-16948
07/19/2022, 3:48 PMwonderful-salesclerk-27570
07/19/2022, 4:53 PMmelodic-account-9605
07/19/2022, 5:22 PMcy.wait('@GraphQL')
at the beginning of the test, and it moves past that just fine. It stays here forever and never moves onto the next test.wonderful-salesclerk-27570
07/19/2022, 5:39 PMwonderful-salesclerk-27570
07/19/2022, 5:40 PMsquare-smartphone-88014
07/19/2022, 8:01 PMsquare-smartphone-88014
07/19/2022, 8:02 PMfamous-restaurant-30435
07/20/2022, 12:57 AMrhythmic-agency-74865
07/20/2022, 12:58 AM