Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
384
Merge Requests
62
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
2ae89295
Commit
2ae89295
authored
39 minutes ago
by
Ben Hayward
Browse files
Options
Download
Changing spec test periods to 24h so tests pass - may need to revert
parent
bcc64ec5
fix/hashtag-pipes-2361
1 merge request
!762
Updated URL regex for hashtags to disregard hashes used mid-sentence. #2361
Pipeline
#115011741
running with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
src/app/common/pipes/tags.spec.ts
View file @
2ae89295
...
...
@@ -27,7 +27,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring#name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
);
});
...
...
@@ -35,7 +35,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring #name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
);
});
...
...
@@ -43,7 +43,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring [#name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
);
});
...
...
@@ -51,7 +51,7 @@ describe('TagPipe', () => {
const
string
=
'
textstring (#name)
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
);
});
...
...
@@ -59,7 +59,7 @@ describe('TagPipe', () => {
const
string
=
'
textString #NaMe
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=name;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=name;period=
24h
'
);
});
...
...
@@ -67,10 +67,10 @@ describe('TagPipe', () => {
const
string
=
'
#hash #hashlonger
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=hash;period=
24h
'
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hashlonger;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=hashlonger;period=
24h
'
);
});
...
...
@@ -188,13 +188,13 @@ describe('TagPipe', () => {
expect
(
transformedString
).
toContain
(
'
<a class="tag" href="/name"
'
);
expect
(
transformedString
).
toContain
(
'
<a class="tag" href="/name1"
'
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash1;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=hash1;period=
24h
'
);
expect
(
transformedString
).
not
.
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash2;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=hash2;period=
24h
'
);
expect
(
transformedString
).
toContain
(
'
<a href="/newsfeed/global/top;hashtag=hash3;period=
7d
'
'
<a href="/newsfeed/global/top;hashtag=hash3;period=
24h
'
);
expect
(
transformedString
).
toContain
(
'
<a href="ftp://s.com"
'
);
expect
(
transformedString
).
toContain
(
'
<a href="mailto:name@mail.com"
'
);
...
...
This diff is collapsed.
Please
register
or
sign in
to comment