Skip to content

Commit

Permalink
check non-existent cloud storage update page
Browse files Browse the repository at this point in the history
  • Loading branch information
novda committed May 31, 2024
1 parent ab636fb commit fc9e3eb
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/cypress/e2e/features/cloudstorages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (C) 2023-2024 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT

/// <reference types="cypress" />

context('Cloudstorages', () => {
before(() => {
cy.visit('auth/login');
cy.login();
cy.visit('/cloudstorages');
});

const nonExistCloudstorageId = 99;

describe('Cloudstorage page', () => {
it('Verify that attempting to update a non-existent cloud storage displays an error message', () => {
cy.intercept({
method: 'GET',
url: `/api/cloudstorages/${nonExistCloudstorageId}`,
}).as('cloudstorageRequest');

cy.visit(`/cloudstorages/update/${nonExistCloudstorageId}`);
cy.wait('@cloudstorageRequest').its('response.statusCode').should('eq', 404);
cy.get('.cvat-spinner').should('not.exist');
cy.contains('Sorry, but the requested cloud storage was not found');
});
});
});

0 comments on commit fc9e3eb

Please sign in to comment.