Skip to content

Commit

Permalink
fixed links in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed Jun 7, 2023
1 parent 9d06efb commit d2333c6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cvat-core/src/frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function getFrameMeta(jobID, frame): FramesMetaData['frames'][0] {
if (mode === 'interpolation' && meta.frames.length === 1) {
// video tasks have 1 frame info, but image tasks will have many infos
[frameMeta] = meta.frames;
} else if ((mode === 'annotation' || mode === 'interpolation') && meta.frames.length > 1) {
} else if (mode === 'annotation' || (mode === 'interpolation' && meta.frames.length > 1)) {
if (frame > meta.stop_frame) {
throw new ArgumentError(`Meta information about frame ${frame} can't be received from the server`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ context('New organization pipeline.', () => {
cy.assignJobToUser(0, thirdUserName);
cy.renameTask(taskName, newTaskName);
cy.url().then((url) => {
taskID = Number(url.split('/').slice(-1)[0]);
const [link] = url.split('?');
taskID = Number(link.split('/').slice(-1)[0]);
});
cy.getJobNum(0).then(($jobID) => {
jobID = $jobID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ context('Export, import an annotation task.', { browser: '!firefox' }, () => {
cy.createZipArchive(directoryToArchive, archivePath);
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, archiveName);
cy.openTask(taskName);
cy.url().then((link) => {
cy.url().then((url) => {
const [link] = url.split('?');
taskId = Number(link.split('/').slice(-1)[0]);
});
cy.addNewLabel(newLabelName);
Expand Down Expand Up @@ -122,7 +123,8 @@ context('Export, import an annotation task.', { browser: '!firefox' }, () => {
cy.contains('The task has been restored successfully. Click here to open').should('exist').and('be.visible');
cy.closeNotification('.ant-notification-notice-info');
cy.openTask(taskName);
cy.url().then((link) => {
cy.url().then((url) => {
const [link] = url.split('?');
expect(Number(link.split('/').slice(-1)[0])).to.be.equal(taskId + 1);
});
cy.get('.cvat-constructor-viewer-item').then((labels) => {
Expand Down
3 changes: 2 additions & 1 deletion tests/cypress/e2e/actions_users/issue_1810_login_logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ context('When clicking on the Logout button, get the user session closed.', () =
cy.login();
cy.openTask(taskName);
// get id task
cy.url().then((link) => {
cy.url().then((url) => {
const [link] = url.split('?');
taskId = Number(link.split('/').slice(-1)[0]);
});
});
Expand Down

0 comments on commit d2333c6

Please sign in to comment.