Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 10 additions & 4 deletions dwds/test/fixtures/context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ class TestContext {
Stream<BuildResults> buildResults;
RequireStrategy requireStrategy;
String basePath = '';
String index = project.filePathToServe;

_port = await findUnusedPort();
switch (compilationMode) {
Expand Down Expand Up @@ -279,7 +280,12 @@ class TestContext {
break;
case CompilationMode.frontendServer:
{
_logger.info('Index: ${project.filePathToServe}');
index = webCompatiblePath([
project.directoryToServe,
project.filePathToServe,
]);

_logger.info('Index: $index');

final entry = p.toUri(
p.join(project.webAssetsPath, project.dartEntryFileName),
Expand Down Expand Up @@ -311,7 +317,7 @@ class TestContext {
fileSystem,
hostname,
assetServerPort,
p.join(project.directoryToServe, project.filePathToServe),
index,
);

if (enableExpressionEvaluation) {
Expand Down Expand Up @@ -393,8 +399,8 @@ class TestContext {
);

_appUrl = basePath.isEmpty
? 'http://localhost:$port/${project.filePathToServe}'
: 'http://localhost:$port/$basePath/${project.filePathToServe}';
? 'http://localhost:$port/$index'
: 'http://localhost:$port/$basePath/$index';

if (launchChrome) {
await _webDriver?.get(appUrl);
Expand Down
Loading