[ACS-5645] added unit test cases

This commit is contained in:
Yasa-Nataliya
2023-09-18 12:45:01 +05:30
parent 5121ad09c0
commit 341d7c41e2
7 changed files with 95 additions and 4 deletions

View File

@@ -225,6 +225,38 @@ describe('navigation.evaluators', () => {
});
});
describe('isDetails', () => {
it('should return [true] if url ends with `/details`', () => {
const context: any = {
navigation: {
url: '/path/details'
}
};
expect(app.isDetails(context)).toBe(true);
});
it('should return [true] if url starts with `/details`', () => {
const context: any = {
navigation: {
url: '/details/path'
}
};
expect(app.isDetails(context)).toBe(true);
});
it('should return [true] if url includes with `/details`', () => {
const context: any = {
navigation: {
url: '/details/path'
}
};
expect(app.isDetails(context)).toBe(true);
});
});
describe('isRecentFiles', () => {
it('should return [true] if url starts with `/recent-files`', () => {
const context: any = {