Skip to content

Commit

Permalink
frontend test stability
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Oct 22, 2023
1 parent cb21fa9 commit bc4726f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
5 changes: 0 additions & 5 deletions frontend/components/welcome/Featured.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,8 @@ export const Featured = ({ sources, direct_html_links }) => {
set_waited_too_long(false)
set_source_data({})

// Start downloading the sources

const ids = Array.from(new Set(sources.map(get_id)))

console.log(ids)
console.log("123123123213123")

const promises = ids.map((id) => {
const sources_for_id = sources.filter((source) => get_id(source) === id)

Expand Down
4 changes: 2 additions & 2 deletions frontend/components/welcome/Recent.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const Recent = ({ client, connected, remote_notebooks, CustomRecent, on_s

let recents =
combined_notebooks == null
? html`<li><em>Loading...</em></li>`
? html`<li class="not_yet_ready"><em>Loading...</em></li>`
: combined_notebooks.map((nb) => {
const running = nb.entry != null
return html`<li
Expand Down Expand Up @@ -221,7 +221,7 @@ export const Recent = ({ client, connected, remote_notebooks, CustomRecent, on_s
if (CustomRecent == null) {
return html`
<h2>My work</h2>
<ul id="recent" class="show-scrollbar">
<ul id="recent" class="show_scrollbar">
<li class="new">
<a
href="new"
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h1>welcome to <img src="img/logo.svg"></h1>
<section id="mywork">
<div>
<h2>My work</h2>
<ul id="recent">
<ul id="recent" class="not_yet_ready">
<li class="new"><a href="new"><button><span class="ionicon"></span></button>Create a <strong>new notebook</strong></a></li>
<li><em>Loading...</em></li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions frontend/welcome.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,18 @@ a#github {
right: 0.5rem;
}

.show-scrollbar::-webkit-scrollbar {
.show_scrollbar::-webkit-scrollbar {
width: 10px;
opacity: 0.1;
}
.show-scrollbar::-webkit-scrollbar-track {
.show_scrollbar::-webkit-scrollbar-track {
}
.show-scrollbar::-webkit-scrollbar-thumb {
.show_scrollbar::-webkit-scrollbar-thumb {
/* height: 11px; */
background-color: var(--black);
opacity: 0.6;
border-radius: 1000px;
}
.show-scrollbar::-webkit-scrollbar-thumb:hover {
.show_scrollbar::-webkit-scrollbar-thumb:hover {
opacity: 1;
}
2 changes: 2 additions & 0 deletions test/frontend/helpers/pluto.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export const importNotebook = async (page, notebookName, { permissionToRunCode =
* @param {string} path_or_url
*/
export const openPathOrURLNotebook = async (page, path_or_url, { permissionToRunCode = true } = {}) => {
await page.waitForFunction(() => document.querySelector(`.not_yet_ready`) == null)

const openFileInputSelector = "pluto-filepicker"
await writeSingleLineInPlutoInput(page, openFileInputSelector, path_or_url)
// await writeSingleLineInPlutoInput(page, openFileInputSelector, notebookPath)
Expand Down

0 comments on commit bc4726f

Please sign in to comment.