Skip to content

Commit

Permalink
Stabilized cypress test features/ground_truth_jobs.js (#8279)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Aug 8, 2024
1 parent 478f670 commit 3fe8645
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions cvat-ui/src/components/job-item/job-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function JobItem(props: Props): JSX.Element {
</Row>
<Select
className='cvat-job-item-stage'
popupClassName='cvat-job-item-stage-dropdown'
value={stage}
onChange={(newValue: JobStage) => {
onJobUpdate(job, { stage: newValue });
Expand All @@ -198,6 +199,7 @@ function JobItem(props: Props): JSX.Element {
</Row>
<Select
className='cvat-job-item-state'
popupClassName='cvat-job-item-state-dropdown'
value={job.state}
onChange={(newValue: JobState) => {
onJobUpdate(job, { state: newValue });
Expand Down
1 change: 1 addition & 0 deletions cvat-ui/src/components/task-page/user-selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export default function UserSelector(props: Props): JSX.Element {
onSelect={handleSelect}
onBlur={onBlur}
className={combinedClassName}
popupClassName='cvat-user-search-dropdown'
options={users.map((user) => ({
value: user.id.toString(),
label: user.username,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ context('Value must be a user instance.', () => {
cy.get('.cvat-task-details-user-block').within(() => {
cy.get('.cvat-user-search-field').click();
});
cy.get('.ant-select-dropdown')
cy.get('.cvat-user-search-dropdown')
.not('.ant-select-dropdown-hidden')
.within(() => {
cy.get(`.ant-select-item-option[title="${Cypress.env('user')}"]`).click();
Expand All @@ -30,7 +30,7 @@ context('Value must be a user instance.', () => {
cy.get('.cvat-task-details-user-block').within(() => {
cy.get('.cvat-user-search-field').click();
});
cy.get('.ant-select-dropdown')
cy.get('.cvat-user-search-dropdown')
.not('.ant-select-dropdown-hidden')
.within(() => {
cy.get(`.ant-select-item-option[title="${Cypress.env('user')}"]`).click();
Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ Cypress.Commands.add('setJobState', (jobID, state) => {
.contains('a', `Job #${jobID}`)
.parents('.cvat-job-item')
.find('.cvat-job-item-state').click();
cy.get('.ant-select-dropdown')
cy.get('.cvat-job-item-state-dropdown')
.should('be.visible')
.not('.ant-select-dropdown-hidden')
.within(() => {
Expand All @@ -1187,7 +1187,7 @@ Cypress.Commands.add('setJobStage', (jobID, stage) => {
.contains('a', `Job #${jobID}`)
.parents('.cvat-job-item')
.find('.cvat-job-item-stage').click();
cy.get('.ant-select-dropdown')
cy.get('.cvat-job-item-stage-dropdown')
.should('be.visible')
.not('.ant-select-dropdown-hidden')
.within(() => {
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/support/commands_projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Cypress.Commands.add('assignProjectToUser', (user) => {
cy.get('.cvat-user-search-field').click();
cy.get('.cvat-user-search-field').type(user);
});
cy.get('.ant-select-dropdown')
cy.get('.cvat-user-search-dropdown')
.not('.ant-select-dropdown-hidden')
.within(() => {
cy.get(`.ant-select-item-option[title="${user}"]`).click();
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/support/commands_review_pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Cypress.Commands.add('assignJobToUser', (jobID, user) => {
cy.intercept('GET', `/api/users?**search=${user}**`).as('searchUsers');
cy.get(`.cvat-job-item[data-row-id="${jobID}"]`).find('.cvat-job-assignee-selector input').type(user);
cy.wait('@searchUsers').its('response.statusCode').should('equal', 200);
cy.get('.ant-select-dropdown')
cy.get('.cvat-user-search-dropdown')
.should('be.visible')
.not('.ant-select-dropdown-hidden')
.contains(new RegExp(`^${user}$`, 'g'))
Expand Down

0 comments on commit 3fe8645

Please sign in to comment.