test: remove useless navigation to /login while logging in via command

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/1795>
environments/review-docs-merge-hoc7bt/deployments/18064
Kasper Seweryn 2023-06-20 11:37:47 +02:00
rodzic f346b04b42
commit 6f282f984d
1 zmienionych plików z 0 dodań i 5 usunięć

Wyświetl plik

@ -1,13 +1,8 @@
// Currently we cannot login purely programmatically, so we need to use the
// graphical login until the vue3 branch is merged
Cypress.Commands.add('login', () => {
cy.fixture('testuser.json').then(({ username, password }) => {
// We need to request a page that sets the csrf cookie
cy.request('/api/v1/instance/nodeinfo/2.0/')
// Then we can login
cy.visit('/login')
cy.getCookie('csrftoken').then(($cookie) => {
cy.request({
method: 'POST',