Skip to content

Commit

Permalink
deleted dublicate function
Browse files Browse the repository at this point in the history
  • Loading branch information
TetianaParanich committed Jan 23, 2025
1 parent 9241bac commit b4a3400
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions cypress/support/fragments/data-export/exportFile.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import { HTML } from '@interactors/html';
import { recurse } from 'cypress-recurse';
import {
Button,
Modal,
MultiColumnListCell,
Pane,
Select,
TextField,
} from '../../../../interactors';
import { Button, Modal, MultiColumnListCell, Pane, Select } from '../../../../interactors';
import { getLongDelay } from '../../utils/cypressTools';
import FileManager from '../../utils/fileManager';

const paneResults = Pane({ id: 'pane-results' });
const searchButton = Button('Search');
const searchField = TextField({ id: 'input-search-field' });
import SelectJobProfile from './selectJobProfile';

const downloadCSVFile = (fileName, mask) => {
// retry until file has been downloaded
Expand Down Expand Up @@ -131,30 +121,20 @@ const uploadFile = (fileName) => {
cy.get('input[type=file]', getLongDelay()).attachFile(fileName);
};

const search = (jobProfileTitle) => {
cy.wait(1500);
cy.do(paneResults.find(searchField).focus());
cy.wait(1500);
cy.expect(paneResults.find(searchField).exists());
cy.wait(1500);
cy.do([paneResults.find(searchField).fillIn(jobProfileTitle), searchButton.click()]);
};

export default {
downloadCSVFile,
downloadExportedMarcFile,
downloadExportedMarcFileWithRecordHrid,
waitLandingPageOpened,
uploadFile,
search,

exportWithDefaultJobProfile: (
fileName,
jobType = 'instances',
selectType = 'Instances',
fileType = '.csv',
) => {
search(`Default ${jobType} export job profile`);
SelectJobProfile.searchForAJobProfile(`Default ${jobType} export job profile`);
cy.do([
MultiColumnListCell({
content: `Default ${jobType} export job profile`,
Expand Down

0 comments on commit b4a3400

Please sign in to comment.