fix: ci
parent
cbe5ed9386
commit
10ef97a4d4
|
@ -52,8 +52,8 @@ jobs:
|
||||||
run: yarn playground:build
|
run: yarn playground:build
|
||||||
# - name: Run unit tests
|
# - name: Run unit tests
|
||||||
# run: yarn test:unit
|
# run: yarn test:unit
|
||||||
# - name: Run integration tests
|
- name: Run integration tests
|
||||||
# run: yarn run -s test:integration
|
run: yarn run -s test:integration
|
||||||
- name: Run end-to-end tests
|
- name: Run end-to-end tests
|
||||||
uses: cypress-io/github-action@v6
|
uses: cypress-io/github-action@v6
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -53,16 +53,8 @@ Cypress.Commands.add('login', (path) => {
|
||||||
cy.get('input[name="password"]').type('Abc12345678');
|
cy.get('input[name="password"]').type('Abc12345678');
|
||||||
cy.get('button[type="submit"]').click();
|
cy.get('button[type="submit"]').click();
|
||||||
cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200);
|
cy.wait('@sessionCheck').its('response.statusCode').should('equal', 200);
|
||||||
|
}
|
||||||
|
|
||||||
// Sometimes the page hangs after logging in.
|
|
||||||
// If this happens we reload the page and log in again.
|
|
||||||
cy.reload();
|
|
||||||
cy.get('body').then(($b) => {
|
|
||||||
if ($b.text().includes('Log in to your Strapi account')) {
|
|
||||||
cy.login();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Register
|
// Register
|
||||||
if ($body.text().includes('Credentials are only used to authenticate in Strapi')) {
|
if ($body.text().includes('Credentials are only used to authenticate in Strapi')) {
|
||||||
cy.get('input[name="firstname"]').type('John');
|
cy.get('input[name="firstname"]').type('John');
|
||||||
|
|
Loading…
Reference in New Issue