mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
test(tabs): uncomment tabs e2e and add colors test
This commit is contained in:
@ -1,20 +1,20 @@
|
|||||||
// 'use strict';
|
'use strict';
|
||||||
|
|
||||||
// const { register, Page, platforms } = require('../../../../../scripts/e2e');
|
const { register, Page, platforms } = require('../../../../../scripts/e2e');
|
||||||
// const { getElement, waitAndGetElementById, waitForTransition } = require('../../../../../scripts/e2e/utils');
|
const { getElement, waitAndGetElementById, waitForTransition } = require('../../../../../scripts/e2e/utils');
|
||||||
|
|
||||||
// class E2ETestPage extends Page {
|
class E2ETestPage extends Page {
|
||||||
// constructor(driver, platform) {
|
constructor(driver, platform) {
|
||||||
// super(driver, `http://localhost:3333/src/components/tabs/test/basic?ionic:mode=${platform}`);
|
super(driver, `http://localhost:3333/src/components/tabs/test/basic?ionic:mode=${platform}`);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// platforms.forEach(platform => {
|
platforms.forEach(platform => {
|
||||||
// describe('tabs/basic', () => {
|
describe('tabs/basic', () => {
|
||||||
// register('should init', driver => {
|
register('should init', driver => {
|
||||||
// const page = new E2ETestPage(driver, platform);
|
const page = new E2ETestPage(driver, platform);
|
||||||
// return page.navigate();
|
return page.navigate();
|
||||||
// });
|
});
|
||||||
|
|
||||||
// register('should check each tab', async (driver, testContext) => {
|
// register('should check each tab', async (driver, testContext) => {
|
||||||
// testContext.timeout(60000);
|
// testContext.timeout(60000);
|
||||||
@ -30,5 +30,5 @@
|
|||||||
// tabThreeButton.click();
|
// tabThreeButton.click();
|
||||||
// await waitForTransition(600);
|
// await waitForTransition(600);
|
||||||
// });
|
// });
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
|
|||||||
34
core/src/components/tabs/test/colors/e2e.js
Normal file
34
core/src/components/tabs/test/colors/e2e.js
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const { register, Page, platforms } = require('../../../../../scripts/e2e');
|
||||||
|
const { getElement, waitAndGetElementById, waitForTransition } = require('../../../../../scripts/e2e/utils');
|
||||||
|
|
||||||
|
class E2ETestPage extends Page {
|
||||||
|
constructor(driver, platform) {
|
||||||
|
super(driver, `http://localhost:3333/src/components/tabs/test/colors?ionic:mode=${platform}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
platforms.forEach(platform => {
|
||||||
|
describe('tabs/colors', () => {
|
||||||
|
register('should init', driver => {
|
||||||
|
const page = new E2ETestPage(driver, platform);
|
||||||
|
return page.navigate();
|
||||||
|
});
|
||||||
|
|
||||||
|
// register('should check each tab', async (driver, testContext) => {
|
||||||
|
// testContext.timeout(60000);
|
||||||
|
// const page = new E2ETestPage(driver, platform);
|
||||||
|
|
||||||
|
// await waitForTransition(300);
|
||||||
|
|
||||||
|
// const tabTwoButton = await waitAndGetElementById(driver, 'tab-t-0-1');
|
||||||
|
// tabTwoButton.click();
|
||||||
|
// await waitForTransition(600);
|
||||||
|
|
||||||
|
// const tabThreeButton = await waitAndGetElementById(driver, 'tab-t-0-2');
|
||||||
|
// tabThreeButton.click();
|
||||||
|
// await waitForTransition(600);
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
});
|
||||||
97
core/src/components/tabs/test/colors/index.html
Normal file
97
core/src/components/tabs/test/colors/index.html
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html dir="ltr">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Tab - Colors</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||||
|
<script src="/dist/ionic.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/ionic.min.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<ion-app>
|
||||||
|
|
||||||
|
<!-- Default -->
|
||||||
|
<ion-tabs>
|
||||||
|
<ion-tab label="Recents"></ion-tab>
|
||||||
|
<ion-tab label="Favorites"></ion-tab>
|
||||||
|
<ion-tab label="Settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Icons -->
|
||||||
|
<ion-tabs selected-index="1" color="primary">
|
||||||
|
<ion-tab icon="call"></ion-tab>
|
||||||
|
<ion-tab icon="heart"></ion-tab>
|
||||||
|
<ion-tab icon="settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Icons on top of text -->
|
||||||
|
<ion-tabs selected-index="2" color="secondary">
|
||||||
|
<ion-tab label="Location" icon="navigate"></ion-tab>
|
||||||
|
<ion-tab label="Favorites" icon="star"></ion-tab>
|
||||||
|
<ion-tab label="Radio" icon="musical-notes"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Icons below text -->
|
||||||
|
<ion-tabs tabbar-layout="icon-bottom" selected-index="1" color="dark">
|
||||||
|
<ion-tab label="Recents" icon="call"></ion-tab>
|
||||||
|
<ion-tab label="Favorites" icon="heart"></ion-tab>
|
||||||
|
<ion-tab label="Settings" icon="settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Icons right of text -->
|
||||||
|
<ion-tabs tabbar-layout="icon-end" selected-index="0" color="danger">
|
||||||
|
<ion-tab label="Recents" icon="call"></ion-tab>
|
||||||
|
<ion-tab label="Favorites" icon="heart"></ion-tab>
|
||||||
|
<ion-tab label="Settings" icon="settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Icons left of text -->
|
||||||
|
<ion-tabs tabbar-layout="icon-start" color="light">
|
||||||
|
<ion-tab label="Recents" icon="call"></ion-tab>
|
||||||
|
<ion-tab label="Favorites" icon="heart"></ion-tab>
|
||||||
|
<ion-tab label="Settings" icon="settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- No icons -->
|
||||||
|
<ion-tabs tabbar-layout="icon-hide" color="primary">
|
||||||
|
<ion-tab label="Recents" icon="call"></ion-tab>
|
||||||
|
<ion-tab label="Favorites" icon="heart"></ion-tab>
|
||||||
|
<ion-tab label="Settings" icon="settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- No label -->
|
||||||
|
<ion-tabs tabbar-layout="label-hide" color="secondary">
|
||||||
|
<ion-tab label="Recents" icon="call"></ion-tab>
|
||||||
|
<ion-tab label="Favorites" icon="heart"></ion-tab>
|
||||||
|
<ion-tab label="Settings" icon="settings"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- No overflow text -->
|
||||||
|
<ion-tabs color="danger">
|
||||||
|
<ion-tab label="Indiana Jones and the Raiders of the Lost Ark"></ion-tab>
|
||||||
|
<ion-tab label="Indiana Jones and the Temple of Doom"></ion-tab>
|
||||||
|
<ion-tab label="Indiana Jones and the Last Crusade"></ion-tab>
|
||||||
|
</ion-tabs>
|
||||||
|
|
||||||
|
</ion-app>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
ion-tabs {
|
||||||
|
position: relative;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@ -1,20 +1,20 @@
|
|||||||
// 'use strict';
|
'use strict';
|
||||||
|
|
||||||
// const { register, Page, platforms } = require('../../../../../scripts/e2e');
|
const { register, Page, platforms } = require('../../../../../scripts/e2e');
|
||||||
// const { getElement, waitAndGetElementById, waitForTransition } = require('../../../../../scripts/e2e/utils');
|
const { getElement, waitAndGetElementById, waitForTransition } = require('../../../../../scripts/e2e/utils');
|
||||||
|
|
||||||
// class E2ETestPage extends Page {
|
class E2ETestPage extends Page {
|
||||||
// constructor(driver, platform) {
|
constructor(driver, platform) {
|
||||||
// super(driver, `http://localhost:3333/src/components/tabs/test/basic?ionic:mode=${platform}`);
|
super(driver, `http://localhost:3333/src/components/tabs/test/placements?ionic:mode=${platform}`);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// platforms.forEach(platform => {
|
platforms.forEach(platform => {
|
||||||
// describe('tabs/basic', () => {
|
describe('tabs/placements', () => {
|
||||||
// register('should init', driver => {
|
register('should init', driver => {
|
||||||
// const page = new E2ETestPage(driver, platform);
|
const page = new E2ETestPage(driver, platform);
|
||||||
// return page.navigate();
|
return page.navigate();
|
||||||
// });
|
});
|
||||||
|
|
||||||
// register('should check each tab', async (driver, testContext) => {
|
// register('should check each tab', async (driver, testContext) => {
|
||||||
// testContext.timeout(60000);
|
// testContext.timeout(60000);
|
||||||
@ -30,5 +30,5 @@
|
|||||||
// tabThreeButton.click();
|
// tabThreeButton.click();
|
||||||
// await waitForTransition(600);
|
// await waitForTransition(600);
|
||||||
// });
|
// });
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user