File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 94
94
title =" Timed Documentation Of This Page"
95
95
href ={{ this.docs.docsEndpoint }}
96
96
target =" _blank"
97
+ data-test-docs-link
97
98
>
98
99
<FaIcon @icon =" info-circle" @prefix =" fa" />
99
100
Docs
Original file line number Diff line number Diff line change
1
+ import { visit } from "@ember/test-helpers" ;
2
+ import { setupMirage } from "ember-cli-mirage/test-support" ;
3
+ import { setupApplicationTest } from "ember-qunit" ;
4
+ import { authenticateSession } from "ember-simple-auth/test-support" ;
5
+ import { module , test } from "qunit" ;
6
+
7
+ import config from "timed/config/environment" ;
8
+
9
+ module ( "Acceptance | docs" , function ( hooks ) {
10
+ setupApplicationTest ( hooks ) ;
11
+ setupMirage ( hooks ) ;
12
+
13
+ hooks . beforeEach ( async function ( ) {
14
+ const user = this . server . create ( "user" , { tourDone : true } ) ;
15
+
16
+ await authenticateSession ( { user_id : user . id } ) ;
17
+ } ) ;
18
+
19
+ test ( "Each route render link to the documentation of the open page" , async function ( assert ) {
20
+ await visit ( "/" ) ;
21
+ assert . dom ( "[data-test-docs-link]" ) . exists ( ) ;
22
+
23
+ assert . strictEqual (
24
+ document . querySelector ( "[data-test-docs-link]" ) . href ,
25
+ config . docsBaseUrl + "tracking/activities" ,
26
+ ) ;
27
+
28
+ await visit ( "/analysis" ) ;
29
+
30
+ assert . strictEqual (
31
+ document . querySelector ( "[data-test-docs-link]" ) . href ,
32
+ config . docsBaseUrl + "analysis" ,
33
+ ) ;
34
+ } ) ;
35
+ } ) ;
You can’t perform that action at this time.
0 commit comments