ticket e2e fixes
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0a7ce19fb9
commit
6dcee3516d
|
@ -369,7 +369,7 @@ export default {
|
||||||
newTicketButton: 'vn-ticket-index a',
|
newTicketButton: 'vn-ticket-index a',
|
||||||
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||||
searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr',
|
searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr',
|
||||||
searchResultDate: 'vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(5)',
|
searchResultDate: 'vn-ticket-summary [label=Landed] span',
|
||||||
topbarSearch: 'vn-searchbar',
|
topbarSearch: 'vn-searchbar',
|
||||||
advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
|
advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
|
||||||
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
searchButton: 'vn-searchbar vn-icon[icon="search"]',
|
||||||
|
|
|
@ -63,16 +63,7 @@ describe('Ticket descriptor path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now search for the ticket 11', async() => {
|
it('should now search for the ticket 11', async() => {
|
||||||
await page.write(selectors.ticketsIndex.topbarSearch, '11');
|
await page.accessToSearchResult('11');
|
||||||
await page.waitToClick(selectors.ticketsIndex.searchButton);
|
|
||||||
await page.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1);
|
|
||||||
const result = await page.countElement(selectors.ticketsIndex.searchResult);
|
|
||||||
|
|
||||||
expect(result).toEqual(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket`, async() => {
|
|
||||||
await page.waitToClick(selectors.ticketsIndex.searchResult);
|
|
||||||
let url = await page.expectURL('/summary');
|
let url = await page.expectURL('/summary');
|
||||||
|
|
||||||
expect(url).toBe(true);
|
expect(url).toBe(true);
|
||||||
|
|
|
@ -58,8 +58,7 @@ describe('Ticket descriptor path', () => {
|
||||||
it(`should search for the deleted ticket and check it's date`, async() => {
|
it(`should search for the deleted ticket and check it's date`, async() => {
|
||||||
await page.write(selectors.ticketsIndex.topbarSearch, '18');
|
await page.write(selectors.ticketsIndex.topbarSearch, '18');
|
||||||
await page.waitToClick(selectors.ticketsIndex.searchButton);
|
await page.waitToClick(selectors.ticketsIndex.searchButton);
|
||||||
await page.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1);
|
await page.expectURL('/summary');
|
||||||
await page.wait(selectors.ticketsIndex.searchResultDate);
|
|
||||||
const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText');
|
const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain(2000);
|
expect(result).toContain(2000);
|
||||||
|
|
|
@ -239,6 +239,8 @@ export default class Searchbar extends Component {
|
||||||
|
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
|
|
||||||
|
if (!filter && this.model)
|
||||||
|
this.model.clear();
|
||||||
if (source != 'state')
|
if (source != 'state')
|
||||||
this.transition = this.$state.go(state, params, opts).transition;
|
this.transition = this.$state.go(state, params, opts).transition;
|
||||||
if (source != 'bar')
|
if (source != 'bar')
|
||||||
|
|
Loading…
Reference in New Issue