Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
63d8287
toSnakeCase util, selfId cypress command
Oct 29, 2025
99d57a6
move user registration from the test case
Oct 29, 2025
0b6184f
test profile tab, change info, add classes
Oct 29, 2025
9878f68
wip: create and copy token, refactor before hooks for isolation
Oct 31, 2025
c414b99
token is sent and copied case, apply clipboard ctx
Oct 31, 2025
da85d8e
ensure modal is closed
Oct 31, 2025
d692343
add cypress-repeat plugin for debugging
Nov 3, 2025
36b66df
rework password change flow, remove self delete user
Nov 3, 2025
5a8c7b5
refactor
Nov 3, 2025
91d6fd0
add first token test
Nov 3, 2025
c0abcf5
add class names to elements under test
Nov 4, 2025
174b313
sync date formats between expiration date form and table view
Nov 4, 2025
7847032
test edit token and table view
Nov 4, 2025
dc77d4a
add cy.clock for Date determinism
Nov 4, 2025
d765f58
add classes, refactor create, revoke every token
Nov 5, 2025
6635092
move date utils to utils file, refactor
Nov 5, 2025
d2caa4f
wip: test token requests
Nov 5, 2025
d8fba7d
Merge branch 'develop' into ov/test-e2e-user-page-tokens
Nov 5, 2025
969d5a4
finish token tests
Nov 6, 2025
da3e362
finish test suite on user page
Nov 6, 2025
fce7f82
add changelog for datetime format change
Nov 6, 2025
c8d7ff1
rename test suite
Nov 6, 2025
84b2053
add pr number
archibald1418 Nov 6, 2025
ce7210e
Merge branch 'develop' into ov/test-e2e-user-page-tokens
Nov 6, 2025
5dbe6fb
fix assertion: last used is always updaed on use
Nov 6, 2025
da9cb78
update date entry class name
archibald1418 Nov 7, 2025
64492b1
update expiry date entry's class name
archibald1418 Nov 7, 2025
d27ebd1
action -> actions in class name
archibald1418 Nov 7, 2025
a140a88
remove comment
archibald1418 Nov 7, 2025
008d6b6
apply comments
Nov 7, 2025
0203ea1
merge develop, fix minor conflicts with #9981
Nov 7, 2025
498b5ac
use snake copy instead of reassign
Nov 7, 2025
cdc29a0
let the month increment wrap around the date
archibald1418 Nov 7, 2025
62af64f
add logs
Nov 7, 2025
3a8f7fb
fix typing of personal info
Nov 7, 2025
2654205
lint
Nov 7, 2025
2a20a7a
remove extra classname
Nov 11, 2025
a3854e0
remove extra comment
Nov 11, 2025
3cd35b1
Merge branch 'develop' into ov/test-e2e-user-page-tokens
Nov 11, 2025
eb423d3
remove deleted commands
Nov 11, 2025
d1428c1
fix titles
Nov 12, 2025
9dabe1d
Merge branch 'develop' into ov/test-e2e-user-page-tokens
Nov 12, 2025
12d133b
remove skips
Nov 12, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Changed

- Change expiration date format view in 'Security' -> 'Create API Token'
from default ISO to DD/MM/YYYY so that it matches the dates in the token table
(<https://github.com/cvat-ai/cvat/pull/9975>)
7 changes: 4 additions & 3 deletions cvat-ui/src/components/profile-page/profile-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { CombinedState } from 'reducers';
import { UserOutlined, LockOutlined } from '@ant-design/icons';
import { Col, Row } from 'antd/lib/grid';
import Typography from 'antd/lib/typography';
import Text from 'antd/lib/typography/Text';
import Menu from 'antd/lib/menu';

import { getTabFromHash } from 'utils/location-utils';
Expand All @@ -35,12 +36,12 @@ function ProfilePageComponent(): JSX.Element {
{
key: 'profile',
icon: <UserOutlined />,
label: 'Profile',
label: <Text className='cvat-profile-page-menu-item-profile'>Profile</Text>,
},
{
key: 'security',
icon: <LockOutlined />,
label: 'Security',
label: <Text className='cvat-profile-page-menu-item-security'>Security</Text>,
},
];

Expand Down Expand Up @@ -73,7 +74,7 @@ function ProfilePageComponent(): JSX.Element {
{ fetching ? <CVATLoadingSpinner size='large' /> : null }
<Row justify='center' align='middle'>
<Col {...dimensions}>
<Title level={1}>
<Title level={1} className='cvat-profile-page-welcome'>
{`Welcome, ${user?.username}`}
</Title>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ function ApiTokenCreatedModal({
open={visible}
onCancel={onClose}
footer={[
<Button key='close' type='primary' onClick={onClose} style={{ background: '#faad14' }}>
<Button
key='close'
type='primary'
onClick={onClose}
style={{ background: '#faad14' }}
className='cvat-api-token-created-modal-confirm-saved-button'
>
I have&nbsp;
<strong>securely</strong>
&nbsp;saved my token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function ApiTokenForm({
style={{ width: '100%' }}
placeholder='Select expiration date'
disabledDate={(current) => current && current.valueOf() < Date.now()}
format='DD/MM/YYYY'
/>
</Form.Item>
<Form.Item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ function ApiTokensCard(): JSX.Element {
okButtonProps: {
type: 'primary',
danger: true,
className: 'cvat-api-token-revoke-button',
},
cancelText: 'Cancel',
onOk: () => {
dispatch(revokeApiTokenAsync(token, () => {
dispatch(getApiTokensAsync());
}));
},
className: 'cvat-modal-confirm-revoke-token',
});
}, [dispatch]);

Expand Down Expand Up @@ -131,6 +133,7 @@ function ApiTokensCard(): JSX.Element {
key: 'name',
width: 250,
sorter: (a: RowData, b: RowData) => a.name.localeCompare(b.name),
className: 'cvat-api-token-name',
},
{
title: 'Permissions',
Expand All @@ -151,13 +154,15 @@ function ApiTokensCard(): JSX.Element {
{readOnly ? 'Read Only' : 'Read/Write'}
</Tag>
),
className: 'cvat-api-token-permissions',
},
{
title: 'Created',
dataIndex: 'createdDate',
key: 'createdDate',
sorter: (a: RowData, b: RowData) => new Date(a.createdDate).getTime() - new Date(b.createdDate).getTime(),
render: (date: string) => new Date(date).toLocaleDateString(),
className: 'cvat-api-token-created-date',
},
{
title: 'Expires',
Expand All @@ -172,6 +177,7 @@ function ApiTokensCard(): JSX.Element {
render: (date: string | null) => (
date ? new Date(date).toLocaleDateString() : <Text underline>Never</Text>
),
className: 'cvat-api-token-expire-date',
},
{
title: 'Last Used',
Expand All @@ -184,6 +190,7 @@ function ApiTokensCard(): JSX.Element {
return new Date(a.lastUsedDate).getTime() - new Date(b.lastUsedDate).getTime();
},
render: (date: string | null) => (date ? new Date(date).toLocaleDateString() : 'Never'),
className: 'cvat-api-token-last-used',
},
{
title: 'Actions',
Expand All @@ -207,6 +214,7 @@ function ApiTokensCard(): JSX.Element {
},
],
}}
className='cvat-api-token-actions-menu'
trigger={['click']}
>
<Button type='text' icon={<MoreOutlined />} />
Expand Down
1 change: 1 addition & 0 deletions cvat-ui/src/reducers/notifications-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ export default function (state = defaultState, action: AnyAction): Notifications
...state.messages.auth,
changePasswordDone: {
message: 'New password has been saved.',
className: 'cvat-notification-notice-change-password-success',
},
},
},
Expand Down
31 changes: 6 additions & 25 deletions tests/cypress/e2e/actions_objects2/case_copy_frame_filename.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,33 @@

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

import { taskName } from '../../support/const';

Cypress.automation('remote:debugger:protocol', {
command: 'Browser.grantPermissions',
params: {
permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'],
origin: window.location.origin,
},
});
import { taskName, ClipboardCtx } from '../../support/const';

context('Copy frame filename in job', () => {
const clipboard = new ClipboardCtx('.cvat-player-copy-frame-name-icon');

before(() => {
cy.prepareUserSession();
cy.openTaskJob(taskName);
});
beforeEach(() => {
cy.window()
.its('navigator.clipboard')
.then((clipboard) => {
cy.spy(clipboard, 'writeText').as('copyTextToClipboard');
});
clipboard.init();
});
describe('Open job, trigger events that change clipboard content', () => {
function scrapeFrameFilename() {
return cy.get('.cvat-player-filename-wrapper').invoke('text');
}

function copyToclipboard() {
cy.get('.cvat-player-copy-frame-name-icon').click();
return cy.get('@copyTextToClipboard').should('be.called')
.then((stub) => {
const last = stub.args.length - 1;
return cy.wrap(stub.args[last][0]);
});
}

it('Check that frame filename can be copied to clipboard', () => {
scrapeFrameFilename().then((fileName) => {
copyToclipboard().should('equal', fileName);
clipboard.copy().should('equal', fileName);
});
});

it('Check clipboard after switching frames', () => {
cy.goToNextFrame(1);
scrapeFrameFilename().then((fileName) => {
copyToclipboard().should('equal', fileName);
clipboard.copy().should('equal', fileName);
});
});
});
Expand Down

This file was deleted.

Loading
Loading