Skip to content

Commit c62e0b6

Browse files
committed
Improve demo
- Added app base url at the end of sharing tweet message
1 parent 1f62940 commit c62e0b6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

website/src/scripts/components/demo/demo.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import '@glorious/demo/dist/gdemo.min.css';
33
import 'prismjs/themes/prism-tomorrow.css';
44
import GDemo from '@glorious/demo';
55
import Prism from 'prismjs';
6+
import ENV from '@environment';
67
import githubButtonWidget from '@scripts/components/github-button-widget/github-button-widget';
78
import row from '@scripts/components/row/row';
89
import rowItem from '@scripts/components/row-item/row-item';
@@ -19,7 +20,7 @@ export default {
1920
},
2021
data(){
2122
return {
22-
tweet: 'Consulte endereços postais da maneira mais fácil que você já viu!'
23+
tweet: `Consulte endereços postais da maneira mais fácil que você já viu! ${ENV.APP.BASE_URL}`
2324
};
2425
},
2526
mounted(){

website/src/scripts/components/demo/demo.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ describe('Demo', () => {
3030
expect(wrapper.classes()).toEqual(['demo']);
3131
});
3232

33+
it('should contain a tweet sharing message', () => {
34+
const wrapper = mountComponent();
35+
expect(wrapper.vm.tweet).toEqual('Consulte endereços postais da maneira mais fácil que você já viu! http://localhost:7000');
36+
});
37+
3338
it('should contain container attribute', () => {
3439
const wrapper = mountComponent();
3540
const container = wrapper.element;

0 commit comments

Comments
 (0)