Skip to content

Commit

Permalink
FAT-15224-C432313 (#4036)
Browse files Browse the repository at this point in the history
  • Loading branch information
TetianaParanich authored Aug 10, 2024
1 parent 42b1d7c commit d562ba8
Showing 1 changed file with 52 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Permissions } from '../../../support/dictionary';
import InventoryInstances from '../../../support/fragments/inventory/inventoryInstances';
import InventorySearchAndFilter from '../../../support/fragments/inventory/inventorySearchAndFilter';
import TopMenu from '../../../support/fragments/topMenu';
import Users from '../../../support/fragments/users/users';
import InventoryInstance from '../../../support/fragments/inventory/inventoryInstance';

describe('Inventory', () => {
describe('Instance', () => {
const testData = {
accordion: 'Suppress from discovery',
};

before('Create test data and login', () => {
cy.getAdminToken();
InventoryInstance.createInstanceViaApi().then(({ instanceData }) => {
testData.instance = instanceData;

cy.getInstanceById(testData.instance.instanceId).then((body) => {
body.discoverySuppress = true;
cy.updateInstance(body);
});
});

cy.createTempUser([Permissions.enableStaffSuppressFacet.gui]).then((userProperties) => {
testData.user = userProperties;

cy.login(testData.user.username, testData.user.password, {
path: TopMenu.inventoryPath,
waiter: InventoryInstances.waitContentLoading,
});
});
});

after('Delete test data', () => {
cy.getAdminToken().then(() => {
Users.deleteViaApi(testData.user.userId);
InventoryInstance.deleteInstanceViaApi(testData.instance.instanceId);
});
});

it(
'C432313 Check "Inventory: Enable staff suppress facet" permission in Inventory app (folijet)',
{ tags: ['extendedPath', 'folijet'] },
() => {
InventorySearchAndFilter.expandAccordion(testData.accordion);
InventorySearchAndFilter.verifyCheckboxInAccordion(testData.accordion, 'No', false);
InventorySearchAndFilter.verifyCheckboxInAccordion(testData.accordion, 'Yes', false);
},
);
});
});

0 comments on commit d562ba8

Please sign in to comment.