-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check non-existent cloud storage update page
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); | ||
}); | ||
}); |