Skip to content

Commit

Permalink
baseURL '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
jipsonminibhavan committed Jan 25, 2024
1 parent ac23064 commit 0295e44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { defineConfig } from 'cypress'
export default defineConfig({
e2e: {
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:5173'
baseUrl: 'http://localhost:4000'
}
})
22 changes: 11 additions & 11 deletions frontend/cypress/e2e/link-test.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Szenario: Suriya Project Tests', () => {
it('should display the login form, show the logged page, create a new link and logout ', () => {
// Einloggen
cy.visit('http://localhost:5173/login')
cy.visit('/login')
cy.get('input[type="email"]').type('[email protected]')
cy.get('input[type="password"]').type('password1234')
cy.get('button[type="submit"]').click()
Expand All @@ -25,7 +25,7 @@ describe('Szenario: Suriya Project Tests', () => {
cy.contains('Successfully created new link').should('be.visible')
cy.wait(3000)

cy.visit('http://localhost:5173/link-list')
cy.visit('/link-list')
cy.get('[data-cy="logout-button"]').click()
cy.url().should('include', '/login')
cy.get('input[type="email"]').should('be.visible')
Expand All @@ -35,12 +35,12 @@ describe('Szenario: Suriya Project Tests', () => {

it('should create a new link and then delete it', () => {
// Neuen Link erstellen
cy.visit('http://localhost:5173/login')
cy.visit('/login')
cy.get('input[type="email"]').type('[email protected]')
cy.get('input[type="password"]').type('password1234')
cy.get('button[type="submit"]').click()
cy.wait(2000)
cy.visit('http://localhost:5173/')
cy.visit('/')
cy.wait(2000)
cy.contains('button', 'Create Link').click()

Expand All @@ -53,36 +53,36 @@ describe('Szenario: Suriya Project Tests', () => {

cy.wait(3000)
cy.on('window:confirm', () => true)
cy.visit('http://localhost:5173/link-list')
cy.visit('/link-list')
cy.get('.q-table').should('exist')
cy.contains('tr', 'test-slug2').find('[data-cy="delete-button"]').click()
cy.wait(2000)
})
it('should edit an existing link', () => {
cy.visit('http://localhost:5173/login')
cy.visit('/login')
cy.get('input[type="email"]').type('[email protected]')
cy.get('input[type="password"]').type('password1234')
cy.get('button[type="submit"]').click()
cy.wait(2000)
cy.visit('http://localhost:5173/')
cy.visit('/')
cy.wait(2000)
cy.on('window:confirm', () => true)
cy.get('.q-table').should('exist')
cy.contains('tr', 'test-slug1').find('[data-cy="edit-button"]').click()
cy.get('.q-placeholder[aria-label="Slug"]').should('be.visible').clear().type('editiert')
cy.contains('Save').click()
cy.visit('http://localhost:5173/link-list')
cy.visit('/link-list')
cy.get('.q-table').should('exist')
cy.wait(2000)
cy.contains('tr', 'editiert').find('[data-cy="delete-button"]').click()
})
it('should reset the form when the reset button is clicked', () => {
cy.visit('http://localhost:5173/login')
cy.visit('/login')
cy.get('input[type="email"]').type('[email protected]')
cy.get('input[type="password"]').type('password1234')
cy.get('button[type="submit"]').click()
cy.wait(2000)
cy.visit('http://localhost:5173/')
cy.visit('/')
cy.wait(2000)
cy.contains('button', 'Create Link').click()

Expand All @@ -95,7 +95,7 @@ describe('Szenario: Suriya Project Tests', () => {
cy.get('.q-placeholder[aria-label="Slug"]').should('have.value', '')
cy.contains('Successfully created new link').should('not.exist')

cy.visit('http://localhost:5173/link-list')
cy.visit('/link-list')
cy.get('[data-cy="logout-button"]').click()
cy.url().should('include', '/login')
cy.get('input[type="email"]').should('be.visible')
Expand Down

0 comments on commit 0295e44

Please sign in to comment.