-
Notifications
You must be signed in to change notification settings - Fork 77
/
change-language-search-result.b2c.e2e-spec.ts
52 lines (45 loc) · 1.45 KB
/
change-language-search-result.b2c.e2e-spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { at } from '../../framework';
import { SearchResultPage } from '../../pages/shopping/search-result.page';
const _ = {
catalog: {
id: 'Cameras-Camcorders',
englishName: 'Cameras',
germanName: 'Kameras',
},
product: {
sku: '457595',
dollarPrice: '33.75',
euroPrice: '25,00',
},
searchTerm: 'lens',
};
describe('Language Changing User', () => {
describe('starting at search result page', () => {
before(() => SearchResultPage.navigateTo(_.searchTerm));
it('should see dollar prices', () => {
at(SearchResultPage, page => {
page.productList.productTile(_.product.sku).should('contain', _.product.dollarPrice).should('contain', '$');
});
});
it('should see english categories', () => {
at(SearchResultPage, page => {
page.header.topLevelCategoryLink(_.catalog.id).should('contain', _.catalog.englishName);
});
});
it('when switching to german', () => {
at(SearchResultPage, page => {
page.header.switchLanguage('Deutsch');
});
});
it('should see euro prices', () => {
at(SearchResultPage, page => {
page.productList.productTile(_.product.sku).should('contain', _.product.euroPrice).should('contain', '€');
});
});
it('should see german categories', () => {
at(SearchResultPage, page => {
page.header.topLevelCategoryLink(_.catalog.id).should('contain', _.catalog.germanName);
});
});
});
});