fix: refs #7187 e2e
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Pablo Natek 2024-05-21 09:13:31 +02:00
parent 1fef00789f
commit 6438ce3a16
1 changed files with 0 additions and 41 deletions

View File

@ -1,41 +0,0 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Worker pda path', () => {
let browser;
let page;
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('hr', 'worker');
await page.accessToSearchResult('employeeNick');
await page.accessToSection('worker.card.pda');
});
afterAll(async() => {
await browser.close();
});
it('should check if worker has already a PDA allocated', async() => {
expect(await page.waitToGetProperty(selectors.workerPda.currentPDA, 'value')).toContain('serialNumber1');
});
it('should deallocate the PDA', async() => {
await page.waitToClick(selectors.workerPda.delete);
let message = await page.waitForSnackbar();
expect(message.text).toContain('PDA deallocated');
});
it('should allocate a new PDA', async() => {
await page.autocompleteSearch(selectors.workerPda.newPDA, 'serialNumber2');
await page.waitToClick(selectors.workerPda.submit);
let message = await page.waitForSnackbar();
expect(message.text).toContain('PDA allocated');
});
it('should check if a new PDA has been allocated', async() => {
expect(await page.waitToGetProperty(selectors.workerPda.currentPDA, 'value')).toContain('serialNumber2');
});
});