feat(feeds): add optional sandboxed in-tab article preview
This commit is contained in:
1 parent
ea1ca432c5
commit
f4869c7c8b
10 files changed
+68
-5
No files matched your search
@@ -536,6 +536,7 @@ func TestFeedsChromium(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
prefs.WikiPrefix = "/notes/{YYYY}/{MM}/{DD}/{Subject}"
|
||||
prefs.RSSLinkMode = "embedded"
|
||||
if _, err = s.store.SaveTaskPreferences(context.Background(), domain, actor, prefs, time.Now()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -590,6 +591,11 @@ func TestFeedsChromium(t *testing.T) {
|
||||
web := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
r.Host = "localhost"
|
||||
r.Header.Set("Authorization", "Bearer "+token)
|
||||
if r.URL.Path == "/fixture/embedded" {
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
io.WriteString(w, `<h1>Isolated external article fixture</h1><script>parent.postMessage('rss-external-fixture-loaded','*')</script>`)
|
||||
return
|
||||
}
|
||||
if r.URL.Path == "/fixture/run-feed-actions" && r.Method == "POST" {
|
||||
fake := &feedRemoteFake{id: "catalog-b"}
|
||||
if e := s.syncFeedActions(r.Context(), fake.client(t)); e != nil {
|
||||
|
||||
Reference in new issue
Block a user