e2e paths updated to endpoints refactors

This commit is contained in:
Carlos Jimenez Ruiz 2021-05-14 19:22:04 +02:00
parent d83d3b6765
commit 799a3c6c36
5 changed files with 7 additions and 9 deletions

View File

@ -43,7 +43,7 @@ describe('Client add address notes path', () => {
it('should create two new observations', async() => {
await page.write(selectors.clientAddresses.firstObservationDescription, 'first description');
await page.waitToClick(selectors.clientAddresses.addObservationButton);
await page.autocompleteSearch(selectors.clientAddresses.secondObservationType, 'observation one');
await page.autocompleteSearch(selectors.clientAddresses.secondObservationType, 'Sacador');
await page.write(selectors.clientAddresses.secondObservationDescription, 'second description');
await page.waitToClick(selectors.clientAddresses.saveButton);
const message = await page.waitForSnackbar();

View File

@ -19,7 +19,7 @@ describe('Ticket Create notes path', () => {
it('should create a new note', async() => {
await page.waitToClick(selectors.ticketNotes.addNoteButton);
await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'observation one');
await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'sacador');
await page.write(selectors.ticketNotes.firstDescription, 'description');
await page.waitToClick(selectors.ticketNotes.submitNotesButton);
const message = await page.waitForSnackbar();
@ -32,7 +32,7 @@ describe('Ticket Create notes path', () => {
const result = await page
.waitToGetProperty(selectors.ticketNotes.firstNoteType, 'value');
expect(result).toEqual('observation one');
expect(result).toEqual('Sacador');
const firstDescription = await page
.waitToGetProperty(selectors.ticketNotes.firstDescription, 'value');

View File

@ -24,7 +24,7 @@ describe('Ticket log path', () => {
it('should create a new note for the test', async() => {
await page.waitToClick(selectors.ticketNotes.addNoteButton);
await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'observation one');
await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'Sacador');
await page.write(selectors.ticketNotes.firstDescription, 'description');
await page.waitToClick(selectors.ticketNotes.submitNotesButton);
const message = await page.waitForSnackbar();

View File

@ -17,7 +17,6 @@ describe('Entry lastest buys path', () => {
it('should access the latest buys seccion and search not seeing the edit buys button yet', async() => {
await page.waitToClick(selectors.entryLatestBuys.latestBuysSectionButton);
await page.waitToClick(selectors.globalItems.searchButton);
await page.waitForSelector(selectors.entryLatestBuys.editBuysButton, {visible: false});
});

View File

@ -8,7 +8,6 @@ describe('Entry observations path', () => {
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
// await page.loginAndModule('buyer', 'entry'); // access denied, awaiting role confirmation
await page.loginAndModule('developer', 'entry');
await page.accessToSearchResult('2');
await page.accessToSection('entry.card.observation');
@ -32,7 +31,7 @@ describe('Entry observations path', () => {
});
it('should set the 2nd observation of a different one and successfully save both', async() => {
await page.autocompleteSearch(selectors.entryObservations.secondObservationType, 'delivery');
await page.autocompleteSearch(selectors.entryObservations.secondObservationType, 'repartidor');
await page.waitToClick(selectors.entryObservations.saveObservationsButton);
const message = await page.waitForSnackbar();
@ -43,7 +42,7 @@ describe('Entry observations path', () => {
await page.reloadSection('entry.card.observation');
const result = await page.waitToGetProperty(selectors.entryObservations.firstObservationType, 'value');
expect(result).toEqual('comercial');
expect(result).toEqual('Comercial');
});
it('should make sure the first observation description was saved correctly', async() => {
@ -55,7 +54,7 @@ describe('Entry observations path', () => {
it('should make sure the second observation type was saved correctly', async() => {
const result = await page.waitToGetProperty(selectors.entryObservations.secondObservationType, 'value');
expect(result).toEqual('delivery');
expect(result).toEqual('Repartidor');
});
it('should make sure the second observation description was saved correctly', async() => {