mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 05:01:10 +03:00
5a37227d14
* markdown files and env examples cleanup * components update * update jsonlines description * server refractor * update telemetry * add execute custom node * add ui refractor * add username and password authenticate * correctly retrieve past images in agentflowv2 * disable e2e temporarily * add existing username and password authenticate * update migration to default workspace * update todo * blob storage migrating * throw error on agent tool call error * add missing execution import * add referral * chore: add error message when importData is undefined * migrate api keys to db * fix: data too long for column executionData * migrate api keys from json to db at init * add info on account setup * update docstore missing fields --------- Co-authored-by: chungyau97 <chungyau97@gmail.com>
50 lines
2.0 KiB
JavaScript
50 lines
2.0 KiB
JavaScript
/*
|
|
* TODO: Disabling for now as we need to enable login first
|
|
*
|
|
describe('E2E suite for api/v1/apikey API endpoint', () => {
|
|
beforeEach(() => {
|
|
cy.visit('http://localhost:3000/apikey')
|
|
})
|
|
|
|
// DEFAULT TEST ON PAGE LOAD
|
|
it('displays 1 api key by default', () => {
|
|
cy.get('table.MuiTable-root tbody tr').should('have.length', 1)
|
|
cy.get('table.MuiTable-root tbody tr td').first().should('have.text', 'DefaultKey')
|
|
})
|
|
|
|
// CREATE
|
|
it('can add new api key', () => {
|
|
const newApiKeyItem = 'MafiKey'
|
|
cy.get('#btn_createApiKey').click()
|
|
cy.get('#keyName').type(`${newApiKeyItem}`)
|
|
cy.get('#btn_confirmAddingApiKey').click()
|
|
cy.get('table.MuiTable-root tbody tr').should('have.length', 2)
|
|
cy.get('table.MuiTable-root tbody tr').last().find('td').first().should('have.text', newApiKeyItem)
|
|
})
|
|
|
|
// READ
|
|
it('can retrieve all api keys', () => {
|
|
cy.get('table.MuiTable-root tbody tr').should('have.length', 2)
|
|
cy.get('table.MuiTable-root tbody tr').first().find('td').first().should('have.text', 'DefaultKey')
|
|
cy.get('table.MuiTable-root tbody tr').last().find('td').first().should('have.text', 'MafiKey')
|
|
})
|
|
|
|
// UPDATE
|
|
it('can update new api key', () => {
|
|
const UpdatedApiKeyItem = 'UpsertCloudKey'
|
|
cy.get('table.MuiTable-root tbody tr').last().find('td').eq(4).find('button').click()
|
|
cy.get('#keyName').clear().type(`${UpdatedApiKeyItem}`)
|
|
cy.get('#btn_confirmEditingApiKey').click()
|
|
cy.get('table.MuiTable-root tbody tr').should('have.length', 2)
|
|
cy.get('table.MuiTable-root tbody tr').last().find('td').first().should('have.text', UpdatedApiKeyItem)
|
|
})
|
|
|
|
// DELETE
|
|
it('can delete new api key', () => {
|
|
cy.get('table.MuiTable-root tbody tr').last().find('td').eq(5).find('button').click()
|
|
cy.get('.MuiDialog-scrollPaper .MuiDialogActions-spacing button').last().click()
|
|
cy.get('table.MuiTable-root tbody tr').should('have.length', 1)
|
|
})
|
|
})
|
|
*/
|