Spaces:
Runtime error
Runtime error
Download cypress/e2e/documents.cy.ts from olipericles/ChatBotando: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/olipericles/ChatBotando/resolve/main/cypress/e2e/documents.cy.ts
- Command line
-
hf download hf://spaces/olipericles/ChatBotando/cypress/e2e/documents.cy.ts
-
curl -L -o documents.cy.ts https://huggingface.co/spaces/olipericles/ChatBotando/resolve/main/cypress/e2e/documents.cy.ts
1.13 kB
| // 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'); | |
| }); | |
| }); | |
| }); | |