fix: refs #8441 update button selectors in Vehicle DMS tests for improved consistency and functionality
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
parent
dc7338ee8a
commit
3eeb23f89d
|
@ -1,11 +1,12 @@
|
||||||
describe('Vehicle DMS', () => {
|
describe('Vehicle DMS', () => {
|
||||||
const getSelector = (btnPosition) =>
|
const getBtnSelector = (trPosition, btnPosition) =>
|
||||||
`tr:first-child > .text-right > .no-wrap > :nth-child(${btnPosition}) > .q-btn > .q-btn__content > .q-icon`;
|
`tr:${trPosition}-child > .text-right > .no-wrap > :nth-child(${btnPosition}) > .q-btn > .q-btn__content > .q-icon`;
|
||||||
|
|
||||||
const selectors = {
|
const selectors = {
|
||||||
firstRowDownloadBtn: getSelector(1),
|
firstRowDownloadBtn: getBtnSelector('first',1),
|
||||||
firstRowEditBtn: getSelector(2),
|
firstRowEditBtn: getBtnSelector('first', 2),
|
||||||
firstRowDeleteBtn: getSelector(3),
|
firstRowDeleteBtn: getBtnSelector('first', 3),
|
||||||
|
lastRowDeleteBtn: getBtnSelector('last', 3),
|
||||||
lastRowReference: 'tr:last-child > :nth-child(5) > .q-tr > :nth-child(1) > span',
|
lastRowReference: 'tr:last-child > :nth-child(5) > .q-tr > :nth-child(1) > span',
|
||||||
firstRowReference:
|
firstRowReference:
|
||||||
'tr:first-child > :nth-child(5) > .q-tr > :nth-child(1) > span',
|
'tr:first-child > :nth-child(5) > .q-tr > :nth-child(1) > span',
|
||||||
|
@ -95,6 +96,8 @@ describe('Vehicle DMS', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
cy.testDmsAction('import', formSelectors, data, 'Data saved', '1');
|
cy.testDmsAction('import', formSelectors, data, 'Data saved', '1');
|
||||||
|
cy.get(selectors.lastRowDeleteBtn).click();
|
||||||
|
cy.clickConfirm();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should edit DMS', () => {
|
it('Should edit DMS', () => {
|
||||||
|
|
Loading…
Reference in New Issue