mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
test(button) add anchor e2e test
This commit is contained in:
@ -30,6 +30,7 @@ $button-round-border-radius: 64px !default;
|
|||||||
|
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
||||||
|
text-decoration: none;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export class Button {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TagType class={buttonClasses} disabled={this.disabled}>
|
<TagType class={buttonClasses} disabled={this.disabled} href={this.href}>
|
||||||
<span class='button-inner'>
|
<span class='button-inner'>
|
||||||
<slot name='icon-only'></slot>
|
<slot name='icon-only'></slot>
|
||||||
<slot name='start'></slot>
|
<slot name='start'></slot>
|
||||||
|
|||||||
7
packages/core/src/components/button/test/anchor/e2e.js
Normal file
7
packages/core/src/components/button/test/anchor/e2e.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
const { register, navigate } = require('../../../../../scripts/e2e');
|
||||||
|
|
||||||
|
describe('button: anchor', () => {
|
||||||
|
|
||||||
|
register('navigates', navigate('http://localhost:3333/src/components/button/test/anchor'));
|
||||||
|
|
||||||
|
});
|
||||||
50
packages/core/src/components/button/test/anchor/index.html
Normal file
50
packages/core/src/components/button/test/anchor/index.html
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Button - Anchor</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||||
|
<script src="/dist/ionic.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<ion-app>
|
||||||
|
<ion-page>
|
||||||
|
<ion-header>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title>Button - Anchor</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content padding no-bounce>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#">Default</ion-button>
|
||||||
|
<ion-button href="#" class="activated">Default.activated</ion-button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#" color="primary">Primary</ion-button>
|
||||||
|
<ion-button href="#" color="primary" class="activated">Primary.activated</ion-button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#" color="secondary">Secondary</ion-button>
|
||||||
|
<ion-button href="#" color="secondary" class="activated">Secondary.activated</ion-button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#" color="danger">Danger</ion-button>
|
||||||
|
<ion-button href="#" color="danger" class="activated">Danger.activated</ion-button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#" color="light">Light</ion-button>
|
||||||
|
<ion-button href="#" color="light" class="activated">Light.activated</ion-button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#" color="dark">Dark</ion-button>
|
||||||
|
<ion-button href="#" color="dark" class="activated">Dark.activated</ion-button>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ion-button href="#" disabled>Disabled</ion-button>
|
||||||
|
</p>
|
||||||
|
</ion-content>
|
||||||
|
</ion-page>
|
||||||
|
</ion-app>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button href="./">
|
<ion-button href="#">
|
||||||
<ion-icon name="home" slot="start"></ion-icon>
|
<ion-icon name="home" slot="start"></ion-icon>
|
||||||
Left Icon
|
Left Icon
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button href="./">
|
<ion-button href="#">
|
||||||
<ion-icon name="star" slot="end"></ion-icon>
|
<ion-icon name="star" slot="end"></ion-icon>
|
||||||
Right Icon
|
Right Icon
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button href="./">
|
<ion-button href="#">
|
||||||
<ion-icon name="flag" slot="icon-only"></ion-icon>
|
<ion-icon name="flag" slot="icon-only"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button size="large" href="./">
|
<ion-button size="large" href="#">
|
||||||
<ion-icon name="help-circle" slot="start"></ion-icon>
|
<ion-icon name="help-circle" slot="start"></ion-icon>
|
||||||
Left, Large
|
Left, Large
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button size="large" href="./">
|
<ion-button size="large" href="#">
|
||||||
<ion-icon name="settings" slot="end"></ion-icon>
|
<ion-icon name="settings" slot="end"></ion-icon>
|
||||||
Right, Large
|
Right, Large
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button size="large" href="./">
|
<ion-button size="large" href="#">
|
||||||
<ion-icon name="heart" slot="icon-only"></ion-icon>
|
<ion-icon name="heart" slot="icon-only"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button size="small" href="./">
|
<ion-button size="small" href="#">
|
||||||
<ion-icon name="checkmark" slot="start"></ion-icon>
|
<ion-icon name="checkmark" slot="start"></ion-icon>
|
||||||
Left, Small
|
Left, Small
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@ -103,7 +103,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button size="small" href="./">
|
<ion-button size="small" href="#">
|
||||||
<ion-icon name="arrow-forward" slot="end"></ion-icon>
|
<ion-icon name="arrow-forward" slot="end"></ion-icon>
|
||||||
Right, Small
|
Right, Small
|
||||||
</ion-button>
|
</ion-button>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<ion-button size="small" href="./">
|
<ion-button size="small" href="#">
|
||||||
<ion-icon name="search" slot="icon-only"></ion-icon>
|
<ion-icon name="search" slot="icon-only"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user