ci: cypres test setup(#274)

* fix: font size broken

* add first cypress test

* save onboarding language

* load language

* get first test to work

* update command

* install pnpm

* update workflow

* install

* update

* test

* increase timeout

* another update

* update 2

* update 3

* upsdada 4

* sfgsfgf 5

* add def supabase url

* fix supabase issue

* add ci

* fix ci

* update .env.example

* update port

* tired

* prepare

* preview

* this is it

* ?????

* 99999900

* fix log issue

* ci

* nkkh

* =====

* 200000
This commit is contained in:
Rotimi Best
2024-04-20 04:39:16 +01:00
committed by GitHub
parent 4f9844bdd2
commit a95be6d620
19 changed files with 827 additions and 65 deletions
@@ -0,0 +1,32 @@
describe('classroomio dashboard', () => {
beforeEach(() => {
cy.visit('http://localhost:4173');
});
it('shows the signup and login button', () => {
cy.get('nav button').should('have.length', 2);
cy.get('nav button').first().contains('Login');
cy.get('nav button').last().contains('Sign Up');
});
it('can redirect to login page', () => {
cy.get('nav button').contains('Login').click();
cy.url().should('contain', '/login');
cy.contains('Welcome back').should('be.visible');
cy.get('form button[type="submit"]').contains('Log In').should('be.visible');
});
it('can redirect to signup page', () => {
cy.get('nav button').contains('Sign Up').click();
cy.url().should('contain', '/signup');
cy.contains('Create a free account').should('be.visible');
cy.get('form button[type="submit"]').contains('Create Account').should('be.visible');
});
});
+5
View File
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
+25
View File
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
+20
View File
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')