Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check non-existent cloud storage update page #7972

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright (C) 2023-2024 CVAT.ai Corporation
// Copyright (C) 2024 CVAT.ai Corporation

//
// SPDX-License-Identifier: MIT

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

context('Cloudstorages', () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, update existing file instead of making one more: tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js

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');
});
});
});
Loading