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

added text-wrap mixin so it fixes long URLs in Session->ILMs #7936

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,36 @@ module('Acceptance | Session - Learning Materials', function (hooks) {
copyrightPermission: false,
copyrightRationale: 'reason is thus',
filename: 'filename',
absoluteFileUri: 'http://example.com/file',
title: 'http://example.com/subdir1/subdir2/long_file_name.pdf',
absoluteFileUri: 'http://example.com/subdir1/subdir2/long_file_name.pdf',
uploadDate: DateTime.fromObject({ year: 2011, month: 3, day: 14, hour: 8 }).toJSDate(),
});
this.server.create('learning-material', {
originalAuthor: 'Hunter Pence',
link: 'www.example.com',
statusId: 1,
owningUserId: this.user.id,
statusId: 1,
userRoleId: 1,
link: 'www.example.com',
uploadDate: today.toJSDate(),
});
this.server.create('learning-material', {
originalAuthor: 'Willie Mays',
citation: 'a citation',
owningUserId: this.user.id,
statusId: 1,
userRoleId: 1,
owningUserId: this.user.id,
citation: 'a citation',
uploadDate: DateTime.fromObject({ year: 2016, month: 12, day: 12, hour: 8 }).toJSDate(),
});
this.server.create('learning-material', {
title: 'Letter to Doc Brown',
this.server.create('learningMaterial', {
originalAuthor: 'Marty McFly',
owningUserId: this.user.id,
statusId: 1,
userRoleId: 1,
copyrightPermission: true,
uploadDate: DateTime.fromObject({ year: 2016, month: 3, day: 3, hour: 8 }).toJSDate(),
filename: 'letter.txt',
title: 'Letter to Doc Brown',
absoluteFileUri: 'http://bttf.com/letter.txt',
copyrightPermission: true,
uploadDate: DateTime.fromObject({ year: 2016, month: 3, day: 3, hour: 8 }).toJSDate(),
});
const course = this.server.create('course', {
year: 2013,
Expand Down Expand Up @@ -130,7 +131,10 @@ module('Acceptance | Session - Learning Materials', function (hooks) {
);
assert.strictEqual(page.details.learningMaterials.current[0].status, 'status 0');

assert.strictEqual(page.details.learningMaterials.current[1].title, 'learning material 1');
assert.strictEqual(
page.details.learningMaterials.current[1].title,
'http://example.com/subdir1/subdir2/long_file_name.pdf',
);
assert.strictEqual(
page.details.learningMaterials.current[1].userNameInfo.fullName,
'Clem Chowder',
Expand Down Expand Up @@ -298,7 +302,10 @@ module('Acceptance | Session - Learning Materials', function (hooks) {
assert.strictEqual(page.details.learningMaterials.current.length, 4);
await page.details.learningMaterials.current[1].details();

assert.strictEqual(page.details.learningMaterials.manager.nameValue, 'learning material 1');
assert.strictEqual(
page.details.learningMaterials.manager.nameValue,
'http://example.com/subdir1/subdir2/long_file_name.pdf',
);
assert.strictEqual(page.details.learningMaterials.manager.author, 'Jennifer Johnson');
assert.strictEqual(
page.details.learningMaterials.manager.description.value,
Expand All @@ -320,7 +327,10 @@ module('Acceptance | Session - Learning Materials', function (hooks) {
assert.strictEqual(page.details.learningMaterials.current.length, 4);
await page.details.learningMaterials.current[1].details();

assert.strictEqual(page.details.learningMaterials.manager.nameValue, 'learning material 1');
assert.strictEqual(
page.details.learningMaterials.manager.nameValue,
'http://example.com/subdir1/subdir2/long_file_name.pdf',
);
assert.strictEqual(page.details.learningMaterials.manager.author, 'Jennifer Johnson');
assert.strictEqual(
page.details.learningMaterials.manager.description.value,
Expand All @@ -331,7 +341,7 @@ module('Acceptance | Session - Learning Materials', function (hooks) {
assert.strictEqual(page.details.learningMaterials.manager.downloadText, 'filename');
assert.strictEqual(
page.details.learningMaterials.manager.downloadUrl,
'http://example.com/file',
'http://example.com/subdir1/subdir2/long_file_name.pdf',
);
assert.notOk(page.details.learningMaterials.manager.hasLink);
assert.notOk(page.details.learningMaterials.manager.hasCitation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
}
.lm-title {
@include m.ilios-link-button;
@include m.text-wrap;
}
}

Expand Down