mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Updating cypress tests for new file group routes.
This commit is contained in:
parent
2dd834f2e9
commit
2bae99c6ef
5 changed files with 24 additions and 24 deletions
|
|
@ -56,9 +56,9 @@ describe('Domain Editing Workflow', () => {
|
|||
{key: 'description', label: 'Description', type: 'textarea', placeholder: 'Optional description'},
|
||||
],
|
||||
routes: {
|
||||
list: '/archive/domains',
|
||||
edit: '/archive/domain/:id/edit',
|
||||
search: '/archive',
|
||||
list: '/archives/domains',
|
||||
edit: '/archives/domain/:id/edit',
|
||||
search: '/archives',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ describe('Domain Editing Workflow', () => {
|
|||
}).as('getDomain');
|
||||
|
||||
// Start at domains list
|
||||
cy.visit('/archive/domains');
|
||||
cy.visit('/archives/domains');
|
||||
cy.wait('@getDomains');
|
||||
|
||||
// Click edit on first domain
|
||||
|
|
@ -93,7 +93,7 @@ describe('Domain Editing Workflow', () => {
|
|||
});
|
||||
|
||||
// Should navigate to edit page
|
||||
cy.url().should('include', '/archive/domain/1/edit');
|
||||
cy.url().should('include', '/archives/domain/1/edit');
|
||||
cy.wait('@getDomain');
|
||||
|
||||
// Page should load with domain name
|
||||
|
|
@ -142,7 +142,7 @@ describe('Domain Editing Workflow', () => {
|
|||
|
||||
// Should show success toast and stay on edit page (page refreshes data after save)
|
||||
cy.contains('Domain Updated').should('be.visible');
|
||||
cy.url().should('include', '/archive/domain/1/edit');
|
||||
cy.url().should('include', '/archives/domain/1/edit');
|
||||
});
|
||||
|
||||
it('shows validation errors for invalid data', () => {
|
||||
|
|
@ -163,7 +163,7 @@ describe('Domain Editing Workflow', () => {
|
|||
}
|
||||
}).as('getDomain');
|
||||
|
||||
cy.visit('/archive/domain/1/edit');
|
||||
cy.visit('/archives/domain/1/edit');
|
||||
cy.wait('@getDomain');
|
||||
|
||||
// Try to save with invalid directory
|
||||
|
|
@ -212,7 +212,7 @@ describe('Domain Editing Workflow', () => {
|
|||
body: {success: true, domain: {}}
|
||||
}).as('updateDomain');
|
||||
|
||||
cy.visit('/archive/domain/1/edit');
|
||||
cy.visit('/archives/domain/1/edit');
|
||||
cy.wait('@getDomain');
|
||||
|
||||
// Make some changes
|
||||
|
|
@ -241,7 +241,7 @@ describe('Domain Editing Workflow', () => {
|
|||
}
|
||||
}).as('getDomain');
|
||||
|
||||
cy.visit('/archive/domain/1/edit');
|
||||
cy.visit('/archives/domain/1/edit');
|
||||
|
||||
cy.wait('@getDomain');
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ describe('Domain Editing Workflow', () => {
|
|||
}
|
||||
}).as('domainNotFound');
|
||||
|
||||
cy.visit('/archive/domain/999/edit');
|
||||
cy.visit('/archives/domain/999/edit');
|
||||
cy.wait('@domainNotFound');
|
||||
|
||||
// Should show error message
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ describe('Domains List Page', () => {
|
|||
{key: 'description', label: 'Description', type: 'textarea', placeholder: 'Optional description'}
|
||||
],
|
||||
routes: {
|
||||
list: '/archive/domains',
|
||||
edit: '/archive/domain/:id/edit',
|
||||
search: '/archive'
|
||||
list: '/archives/domains',
|
||||
edit: '/archives/domain/:id/edit',
|
||||
search: '/archives'
|
||||
},
|
||||
messages: {
|
||||
no_directory: 'Set a directory to enable tagging',
|
||||
|
|
@ -55,7 +55,7 @@ describe('Domains List Page', () => {
|
|||
}).as('getDomains');
|
||||
|
||||
// Visit the domains page
|
||||
cy.visit('/archive/domains');
|
||||
cy.visit('/archives/domains');
|
||||
cy.wait('@getDomains');
|
||||
});
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ describe('Domains List Page', () => {
|
|||
cy.get('table tbody tr').first().within(() => {
|
||||
cy.get('a').contains('Edit').click();
|
||||
});
|
||||
cy.url().should('include', '/archive/domain/1/edit');
|
||||
cy.url().should('include', '/archives/domain/1/edit');
|
||||
});
|
||||
|
||||
it('filters domains with search', () => {
|
||||
|
|
@ -144,7 +144,7 @@ describe('Domains List Page', () => {
|
|||
}
|
||||
}).as('getEmptyDomains');
|
||||
|
||||
cy.visit('/archive/domains');
|
||||
cy.visit('/archives/domains');
|
||||
cy.wait('@getEmptyDomains');
|
||||
|
||||
cy.contains('No domains yet').should('exist');
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ describe('DirectorySearch Integration Tests', () => {
|
|||
}
|
||||
}).as('getDomain');
|
||||
|
||||
cy.visit('/archive/domain/1/edit');
|
||||
cy.visit('/archives/domain/1/edit');
|
||||
cy.wait('@getDomain');
|
||||
// Wait for initial directory search API call (component makes call on mount)
|
||||
cy.wait('@searchDirectories');
|
||||
|
|
@ -166,7 +166,7 @@ describe('DirectorySearch Integration Tests', () => {
|
|||
}
|
||||
}).as('getDomain');
|
||||
|
||||
cy.visit('/archive/domain/2/edit');
|
||||
cy.visit('/archives/domain/2/edit');
|
||||
cy.wait('@getDomain');
|
||||
// Wait for initial directory search API call (component makes call on mount)
|
||||
cy.wait('@searchDirectories');
|
||||
|
|
@ -230,7 +230,7 @@ describe('DirectorySearch Integration Tests', () => {
|
|||
}
|
||||
}).as('getDomain');
|
||||
|
||||
cy.visit('/archive/domain/3/edit');
|
||||
cy.visit('/archives/domain/3/edit');
|
||||
cy.wait('@getDomain');
|
||||
// Wait for initial directory search API call (component makes call on mount)
|
||||
cy.wait('@searchDirectories');
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ describe('Keyboard Shortcuts', () => {
|
|||
}
|
||||
}).as('getDomains');
|
||||
|
||||
cy.visit('/archive/domains');
|
||||
cy.visit('/archives/domains');
|
||||
cy.wait('@getDomains');
|
||||
|
||||
// Should have a filter input on page
|
||||
|
|
@ -221,7 +221,7 @@ describe('Keyboard Shortcuts', () => {
|
|||
}
|
||||
}).as('getDomains');
|
||||
|
||||
cy.visit('/archive/domains');
|
||||
cy.visit('/archives/domains');
|
||||
cy.wait('@getDomains');
|
||||
|
||||
// Focus on filter input
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@
|
|||
{"key": "description", "label": "Description", "type": "textarea", "placeholder": "Optional description"}
|
||||
],
|
||||
"routes": {
|
||||
"list": "/archive/domains",
|
||||
"edit": "/archive/domain/:id/edit",
|
||||
"search": "/archive",
|
||||
"list": "/archives/domains",
|
||||
"edit": "/archives/domain/:id/edit",
|
||||
"search": "/archives",
|
||||
"searchParam": "domain"
|
||||
},
|
||||
"messages": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue