rich-eye-60315
12/30/2022, 9:46 PMrich-eye-60315
12/30/2022, 9:46 PMgray-kilobyte-89541
12/31/2022, 2:43 PMstraight-rose-89671
01/02/2023, 3:16 PMinstall:
runs-on: ubuntu-latest
steps:
...
- name: Cypress install
uses: cypress-io/github-action@v5
with:
runTests: false
build: npm run build
run-tests:
needs: install
runs-on: ubuntu-latest
steps:
- name: Run tests
uses: cypress-io/github-action@v5
with:
install: false
record: true
parallel: true
ripe-traffic-15039
01/02/2023, 3:46 PMripe-traffic-15039
01/03/2023, 8:25 AMaloof-petabyte-2674
01/03/2023, 8:56 AMaloof-petabyte-2674
01/03/2023, 8:58 AMaloof-petabyte-2674
01/03/2023, 8:59 AMstraight-rose-89671
01/03/2023, 9:00 AMpurple-afternoon-2408
01/03/2023, 10:09 AMbeforeEach(() => {
cy.login()
})
it('should test something on the /home page', () => {
cy.visit() // user is not logged in
})
where `cy.login`:
cy.session(
'default',
() => {
cy.visit('account/login');
cy.doLogin(email, pass);
},
{
validate: () => {
cy.getCookies().should('have.length', 2);
},
cacheAcrossSpecs: true,
},
);
gray-kilobyte-89541
01/03/2023, 11:32 AMacceptable-hamburger-48790
01/03/2023, 11:41 AMpurple-afternoon-2408
01/03/2023, 11:54 AMit('should test something on the /home page', () => {
cy.visit() // user is not logged in
})
That part of the code is not loading the page with the session, as if no login has been performed.acceptable-hamburger-48790
01/03/2023, 11:55 AMpurple-afternoon-2408
01/03/2023, 11:56 AMmelodic-egg-83620
01/03/2023, 2:08 PMbumpy-insurance-8581
01/03/2023, 2:20 PMbumpy-insurance-8581
01/03/2023, 2:25 PMinput().selectFile('cypress/fixtures/fileName.csv', { force: true }); // Working fine for each case
bumpy-insurance-8581
01/03/2023, 2:26 PMcy.fixture('fileName.csv').as('fileToUpload');
input().selectFile('@fileToUpload', { force: true }); // Not working for each case
bumpy-insurance-8581
01/03/2023, 2:26 PMcurved-thailand-93694
01/03/2023, 3:04 PMgray-kilobyte-89541
01/03/2023, 3:08 PMtitle
attributes? Or some custom tooltip library?curved-thailand-93694
01/03/2023, 3:14 PMgray-kilobyte-89541
01/03/2023, 4:18 PMcurved-thailand-93694
01/03/2023, 4:21 PMcurved-thailand-93694
01/03/2023, 4:38 PMgray-kilobyte-89541
01/03/2023, 7:08 PMpurple-afternoon-2408
01/03/2023, 7:09 PMit('should test something on the /home page', () => {
cy.visit() // user is not logged in
})
That part of the code is not loading the page with the session, as if no login has been performed.purple-afternoon-2408
01/03/2023, 7:46 PMcy
command with session
like this:
beforeEach(() => {
cy.login() // I had to take whatever in that function and put it here instead which works
})
it('should test something on the /home page', () => {
cy.visit() // user is not logged in
})