Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headed test title improvements #105

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions src/server/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#d2l-test-controls #run {
display: flex;
gap: 0.65em;
flex-wrap: wrap;
align-items: center;
}

Expand All @@ -60,13 +59,31 @@
box-shadow: none;
}

#d2l-test-controls #test-name {
font-size: 0.9em;
#d2l-test-controls #title {
flex: 1;
text-align: left;
white-space: nowrap;
margin: 0 0.5em;
overflow: hidden;
}

#d2l-test-controls #test-name .title-sep {
-webkit-user-select: none;
user-select: none;
}

#d2l-test-controls #root-name {
font-size: .7em;
overflow: hidden;
text-overflow: ellipsis;
color: #999;
line-height: 1;
}

#d2l-test-controls #test-name {
font-size: 0.9em;
overflow: hidden;
text-overflow: ellipsis;
text-align: left;
}

#d2l-test-controls button {
Expand Down Expand Up @@ -129,7 +146,10 @@
</div>
<div id="run" hidden>
<button id="run-button" class="primary">Run</button>
<span id="test-name"></span>
<div id="title">
<div id="root-name"></div>
<div id="test-name"></div>
</div>
<button id="skip-button" class="subtle">Skip</button>
<button id="run-all-button">Run All</button>
</div>
Expand All @@ -153,6 +173,7 @@
runBtn.addEventListener('click', run);

const testName = document.querySelector('#test-name');
const rootName = document.querySelector('#root-name');

/* eslint-disable no-undef, no-invalid-this */
let currentTest, focusEl = runBtn;
Expand All @@ -166,7 +187,9 @@
setTimeout(async() => {
await fixture;

testName.innerText = currentTest.fullTitle();
const titlePath = currentTest.titlePath();
testName.innerHTML = testName.title = titlePath.slice(1).join('<span class="title-sep"> ></span> ')

Check failure on line 191 in src/server/pause.js

View workflow job for this annotation

GitHub Actions / Test

Missing semicolon
bearfriend marked this conversation as resolved.
Show resolved Hide resolved
rootName.innerText = titlePath[0];

if (test.pause) {
runBtn.disabled = false;
Expand Down
Loading