mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
chore: rm documents
This commit is contained in:
@@ -1,46 +1,2 @@
|
||||
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
/// <reference path="../support/index.d.ts" />
|
||||
|
||||
describe('Documents', () => {
|
||||
const timestamp = Date.now();
|
||||
|
||||
before(() => {
|
||||
cy.uploadTestDocument(timestamp);
|
||||
});
|
||||
|
||||
after(() => {
|
||||
cy.deleteTestDocument(timestamp);
|
||||
});
|
||||
|
||||
context('Admin', () => {
|
||||
beforeEach(() => {
|
||||
// Login as the admin user
|
||||
cy.loginAdmin();
|
||||
// Visit the home page
|
||||
cy.visit('/workspace/documents');
|
||||
cy.get('button').contains('#cypress-test').click();
|
||||
});
|
||||
|
||||
it('can see documents', () => {
|
||||
cy.get('div').contains(`document-test-initial-${timestamp}.txt`).should('have.length', 1);
|
||||
});
|
||||
|
||||
it('can see edit button', () => {
|
||||
cy.get('div')
|
||||
.contains(`document-test-initial-${timestamp}.txt`)
|
||||
.get("button[aria-label='Edit Doc']")
|
||||
.should('exist');
|
||||
});
|
||||
|
||||
it('can see delete button', () => {
|
||||
cy.get('div')
|
||||
.contains(`document-test-initial-${timestamp}.txt`)
|
||||
.get("button[aria-label='Delete Doc']")
|
||||
.should('exist');
|
||||
});
|
||||
|
||||
it('can see upload button', () => {
|
||||
cy.get("button[aria-label='Add Docs']").should('exist');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user